MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
LTIMultiResFilter Class Reference

add resolutions to the image More...

#include <lti_multiresFilter.h>

Inheritance diagram for LTIMultiResFilter:
LTIOverrideDimensions< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > > > > LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > > > LTIOverrideDimensionsData LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > > LTIOverrideGeoCoordData LTIOverrideStripHeight< LTIImageFilter > LTIOverrideMagnificationData LTIImageFilter LTIOverrideStripHeightData LTIImageStage LTIImage LTIReferenceCountedObject

List of all members.

Public Member Functions

LT_STATUS initialize (LTIImageStage *srcImage)
 initializer
LT_STATUS initialize (LTIImageStage *srcImage, lt_int8 scaleFactor)
 initializer (for compatibly with the old LTIStaticZoomFilter)
LT_STATUS initialize (LTIImageStage *srcImage, double deltaMag, double minMag, double maxMag)
LT_STATUS getDimsAtMag (double mag, lt_uint32 &width, lt_uint32 &height) const
 get image width and height at given magnification
lt_int64 getEncodingCost (const LTIScene &scene) const
 get the cost to encode this scene
bool getReaderScene (const LTIScene &decodeScene, LTIScene &readerScene) const
 get the underlying scene to be used
virtual lt_uint32 getModifications (const LTIScene &scene) const
 get the modification bitfield for this image
bool getPipelineInfo (LTIPipelineInfo info) const
LT_STATUS setResampleMethod (LTIResampleMethod resampleMethod)
 Set resampling method.
LT_STATUS setResamplePixelCenter (bool usePixelCenter)
void setMagSnapThreshold (double threshold)
void setDeltaMagXY (double deltaMagX, double deltaMagY)

Static Public Member Functions

static LTIMultiResFiltercreate (void)
static double magForIcon (const LTIImage &image, lt_uint32 iconSize)
static double magForIcon (lt_uint32 width, lt_uint32 height, lt_uint32 iconSize)
static LT_STATUS push (LTIImageStage *&pipeline, const LTIScene &dstScene, LTIResampleMethod method=LTI_RESAMPLE_NEAREST)
static LT_STATUS push (LTIImageStage *&pipeline, double mag, LTIResampleMethod method=LTI_RESAMPLE_NEAREST)

Protected Types

enum  Mode {
  MODE_INVALID, MODE_RESAMPLE, MODE_PASSTHROUGH, MODE_DOWNSAMPLE_FULLREAD,
  MODE_ALL_AT_ONCE
}
enum  { kMaxMagnification = 512 }

Protected Member Functions

 LTIMultiResFilter (void)
virtual ~LTIMultiResFilter (void)
LT_STATUS decodeBegin (const LTIPixel &pixelProps, const LTIScene &fullScene)
 start strip-based read
LT_STATUS decodeStrip (LTISceneBuffer &stripBuffer, const LTIScene &stripScene)
 read a strip from the image
LT_STATUS decodeEnd (void)
 finish strip-based read
bool getChildScene (const LTIScene &scene, Mode &mode, double &xScale, double &yScale, LTIScene &childScene) const

Detailed Description

Extends the magnification range of an image, to allow decodes at different resolutions than the image stage would normally allow.

Note that this class is not the same as at the LTIStaticZoomFilter class, which scales the magnification statically for the pipeline when initially constructed. This class allows for the zoom level to be extended for an individual decode operation.

Definition at line 39 of file lti_multiresFilter.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
kMaxMagnification 

Definition at line 143 of file lti_multiresFilter.h.

enum LTIMultiResFilter::Mode [protected]
Enumerator:
MODE_INVALID 
MODE_RESAMPLE 
MODE_PASSTHROUGH 
MODE_DOWNSAMPLE_FULLREAD 
MODE_ALL_AT_ONCE 

Definition at line 128 of file lti_multiresFilter.h.


Constructor & Destructor Documentation

LTIMultiResFilter::LTIMultiResFilter ( void  ) [protected]
virtual LTIMultiResFilter::~LTIMultiResFilter ( void  ) [protected, virtual]

Member Function Documentation

static LTIMultiResFilter* LTIMultiResFilter::create ( void  ) [static]
LT_STATUS LTIMultiResFilter::decodeBegin ( const LTIPixel pixelProps,
const LTIScene fullScene 
) [protected, virtual]

This function is called by readBegin() to start the actual class-specific work for decoding a scene.

Derived classes must implement this function.

This function should never be called directly.

Parameters:
pixelPropsthe band selection
fullScenethe full scene to be read
Returns:
status code indicating success or failure

Reimplemented from LTIImageFilter.

LT_STATUS LTIMultiResFilter::decodeEnd ( void  ) [protected, virtual]

This function is called by readEnd() to complete the actual class-specific work for decoding a scene.

Derived classes must implement this function.

This function should never be called directly.

Returns:
status code indicating success or failure

Reimplemented from LTIImageFilter.

LT_STATUS LTIMultiResFilter::decodeStrip ( LTISceneBuffer stripBuffer,
const LTIScene stripScene 
) [protected, virtual]

This function is called by readStrip() to implement the actual class-specific work for decoding a strip of the scene.

Derived classes must implement this function.

This function should never be called directly.

Parameters:
stripBufferthe buffer to read the pixels into
stripScenethe scene for this strip being decoded
Returns:
status code indicating success or failure

Reimplemented from LTIImageFilter.

bool LTIMultiResFilter::getChildScene ( const LTIScene scene,
Mode mode,
double &  xScale,
double &  yScale,
LTIScene childScene 
) const [protected]
LT_STATUS LTIMultiResFilter::getDimsAtMag ( double  mag,
lt_uint32 width,
lt_uint32 height 
) const [virtual]

This function returns the width and height of the image, in pixels, relative to the given magnification.

Parameters:
magmagnification to determine width at
widththe image width at the magnification
heightthe image height at the magnification
Returns:
status code indicating success or failure

Reimplemented from LTIImageFilter.

lt_int64 LTIMultiResFilter::getEncodingCost ( const LTIScene scene) const [virtual]

Returns the "cost" to encode this scene, for use by those image writers which have usage metering enabled. The typical cost is equal to the nominal image size (width * height * numBands * bytesPerSample), but this is overridden for special situations, e.g. the mosaic filter.

Parameters:
scenethe scene to be charged for
Returns:
the cost to encode the given scene

Reimplemented from LTIImageFilter.

virtual lt_uint32 LTIMultiResFilter::getModifications ( const LTIScene scene) const [virtual]

This function returns a bitfield describing what kinds of modifications have been made to the image during and since its initial encoding.

Parameters:
scenethe area pertaining to this request
Returns:
a bitfield itemizing the encoding modifications

Reimplemented from LTIImageFilter.

bool LTIMultiResFilter::getPipelineInfo ( LTIPipelineInfo  info) const [virtual]

Reimplemented from LTIImageFilter.

bool LTIMultiResFilter::getReaderScene ( const LTIScene decodeScene,
LTIScene readerScene 
) const [virtual]

Get the scene that will be sent to the underlying LTIImageReader. This is useful in some complex pipelines.

Parameters:
decodeScenethe scene that would be given to read()
readerScenethe scene that is the actual scene passed the underlying image reader
Returns:
true if readerScene is not empty

Reimplemented from LTIImageFilter.

Creates an image stage which can be decoded at arbitrary magnifications.

Normally image stages will only support a limited set of magnification values for the LTIScene passed to LTIImageStage::read() -- often, only 1.0. This class will perform any needed resampling on the fly so that arbitrary (power-of-two) magnifications are supported.

Parameters:
srcImagethe base image
LT_STATUS LTIMultiResFilter::initialize ( LTIImageStage srcImage,
lt_int8  scaleFactor 
)

Magnifies the image by the scale factor given. The image width, height, geographic resolution, etc, are all updated accordingly.

A positive scale factor performs a "res-up" operation, while a negative scale factor will reduce the image. That is, a scale factor of 2 will double the image size, e.g. from a magnification of 1.0 to 2.0, while a scale factor of -2 will halve the image size, e.g. from a magnification of 1.0 to 0.5.

Parameters:
srcImagethe base image
scaleFactorthe integer scale factor
LT_STATUS LTIMultiResFilter::initialize ( LTIImageStage srcImage,
double  deltaMag,
double  minMag,
double  maxMag 
)
static double LTIMultiResFilter::magForIcon ( const LTIImage image,
lt_uint32  iconSize 
) [static]
static double LTIMultiResFilter::magForIcon ( lt_uint32  width,
lt_uint32  height,
lt_uint32  iconSize 
) [static]
static LT_STATUS LTIMultiResFilter::push ( LTIImageStage *&  pipeline,
const LTIScene dstScene,
LTIResampleMethod  method = LTI_RESAMPLE_NEAREST 
) [static]
static LT_STATUS LTIMultiResFilter::push ( LTIImageStage *&  pipeline,
double  mag,
LTIResampleMethod  method = LTI_RESAMPLE_NEAREST 
) [static]
void LTIMultiResFilter::setDeltaMagXY ( double  deltaMagX,
double  deltaMagY 
)
void LTIMultiResFilter::setMagSnapThreshold ( double  threshold)
Parameters:
resampleMethodresampling method See LTIResampleMethod

The documentation for this class was generated from the following file: