MrSID Decode SDK for Raster Reference Manual
9.5.4.4709
|
add resolutions to the image More...
#include <lti_multiresFilter.h>
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 LTIMultiResFilter * | create (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 |
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.
anonymous enum [protected] |
Definition at line 143 of file lti_multiresFilter.h.
enum LTIMultiResFilter::Mode [protected] |
Definition at line 128 of file lti_multiresFilter.h.
LTIMultiResFilter::LTIMultiResFilter | ( | void | ) | [protected] |
virtual LTIMultiResFilter::~LTIMultiResFilter | ( | void | ) | [protected, virtual] |
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.
pixelProps | the band selection |
fullScene | the full scene to be read |
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.
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.
stripBuffer | the buffer to read the pixels into |
stripScene | the scene for this strip being decoded |
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.
mag | magnification to determine width at |
width | the image width at the magnification |
height | the image height at the magnification |
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.
scene | the scene to be charged for |
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.
scene | the area pertaining to this request |
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.
decodeScene | the scene that would be given to read() |
readerScene | the scene that is the actual scene passed the underlying image reader |
Reimplemented from LTIImageFilter.
LT_STATUS LTIMultiResFilter::initialize | ( | LTIImageStage * | srcImage | ) |
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.
srcImage | the 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.
srcImage | the base image |
scaleFactor | the 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 | ) |
LT_STATUS LTIMultiResFilter::setResampleMethod | ( | LTIResampleMethod | resampleMethod | ) |
resampleMethod | resampling method See LTIResampleMethod |
LT_STATUS LTIMultiResFilter::setResamplePixelCenter | ( | bool | usePixelCenter | ) |