change dynamic range or datatype of the samples of the image More...
#include <lti_dynamicRangeFilter.h>
Public Member Functions | |
LT_STATUS | initialize (LTIImageStage *srcImage, const LTIPixel *srcDRMin=NULL, const LTIPixel *srcDRMax=NULL, LTIDataType dstDataType=LTI_DATATYPE_INVALID) |
initializer | |
LT_STATUS | initialize (LTIImageStage *srcImage, LTIDataType dstDataType) |
initializer (for compatibly with LTIDataTypeTransformer) | |
LT_STATUS | initialize (LTIImageStage *srcImage, const LTIPixel *srcMin, const LTIPixel *srcMax, const LTIPixel &dstMin, const LTIPixel &dstMax) |
initializer | |
virtual lt_int64 | getEncodingCost (const LTIScene &scene) const |
get the cost to encode this scene | |
virtual lt_uint32 | getModifications (const LTIScene &scene) const |
get the modification bitfield for this image | |
const LTIPixel & | getSrcMin () const |
const LTIPixel & | getSrcMax () const |
LT_STATUS | setSrcMinMax (const LTIPixel &srcMin, const LTIPixel &srcMax) |
LT_STATUS | setDstMinMax (const LTIPixel &srcMin, const LTIPixel &srcMax) |
void | setPixelFillMethod (LTIPixelFillMethod method, double fuzzyThreshold) |
LT_STATUS | reinit (void) |
Static Public Member Functions | |
static LT_STATUS | push (LTIImageStage *&pipeline, const LTIPixel &pixelProps, bool applyDynamicRange) |
static LT_STATUS | transformBuffer (const LTIPixel &srcMin, const LTIPixel &srcMax, const LTISceneBuffer &srcBuffer, const LTIPixel &dstMin, const LTIPixel &dstMax, LTISceneBuffer &dstBuffer, lt_uint32 numCols, lt_uint32 numRows) |
static LT_STATUS | transformPixel (const LTIPixel &srcMin, const LTIPixel &srcMax, const LTIPixel &srcPixel, const LTIPixel &dstMin, const LTIPixel &dstMax, LTIPixel &dstPixel) |
Protected Member Functions | |
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 |
Adjusts the sample values to fit the given dynamic range and datatype.
Definition at line 33 of file lti_dynamicRangeFilter.h.
LT_STATUS LTIDynamicRangeFilter::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 LTIDynamicRangeFilter::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 LTIDynamicRangeFilter::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.
virtual lt_int64 LTIDynamicRangeFilter::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 LTIDynamicRangeFilter::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.
const LTIPixel& LTIDynamicRangeFilter::getSrcMax | ( | ) | const [inline] |
Definition at line 99 of file lti_dynamicRangeFilter.h.
const LTIPixel& LTIDynamicRangeFilter::getSrcMin | ( | ) | const [inline] |
Definition at line 98 of file lti_dynamicRangeFilter.h.
LT_STATUS LTIDynamicRangeFilter::initialize | ( | LTIImageStage * | srcImage, | |
const LTIPixel * | srcMin, | |||
const LTIPixel * | srcMax, | |||
const LTIPixel & | dstMin, | |||
const LTIPixel & | dstMax | |||
) |
Adjusts the sample data of the source image by scaling it from the given source and destination dynamic range pixels. Samples falling outside of the given source range will be clipped to the range.
srcImage | the base image | |
srcMin | minimum of the dynamic range present in the source | |
srcMax | maximum of the dynamic range present in the source | |
dstMin | minimum bound of desired output dynamic range | |
dstMax | maximum bound of desired output dynamic range |
LT_STATUS LTIDynamicRangeFilter::initialize | ( | LTIImageStage * | srcImage, | |
LTIDataType | dstDataType | |||
) |
This initializer will cause the filter to do a straight datatype conversion of the source image. Advertised dynamic range in the source image will be translated to the appropriate value for the new datatype.
srcImage | the base image | |
dstDataType | the datatype of the new image stage |
LT_STATUS LTIDynamicRangeFilter::initialize | ( | LTIImageStage * | srcImage, | |
const LTIPixel * | srcDRMin = NULL , |
|||
const LTIPixel * | srcDRMax = NULL , |
|||
LTIDataType | dstDataType = LTI_DATATYPE_INVALID | |||
) |
Creates an image stage with the sample data adjusted from the given dynamic range values to the full dynamic range of the given datatype. If not specified, the target datatype will be that of the source image. If not specified, the filter will get the dynamic range from the source image (i.e., it will use whatever is in the image metadata).
srcImage | the base image | |
srcDRMin | the minimum dynamic range value of the source data | |
srcDRMax | the maximum dynamic range value of the source data | |
dstDataType | the datatype of the new image stage |
static LT_STATUS LTIDynamicRangeFilter::push | ( | LTIImageStage *& | pipeline, | |
const LTIPixel & | pixelProps, | |||
bool | applyDynamicRange | |||
) | [static] |
LT_STATUS LTIDynamicRangeFilter::reinit | ( | void | ) |
void LTIDynamicRangeFilter::setPixelFillMethod | ( | LTIPixelFillMethod | method, | |
double | fuzzyThreshold | |||
) |
static LT_STATUS LTIDynamicRangeFilter::transformBuffer | ( | const LTIPixel & | srcMin, | |
const LTIPixel & | srcMax, | |||
const LTISceneBuffer & | srcBuffer, | |||
const LTIPixel & | dstMin, | |||
const LTIPixel & | dstMax, | |||
LTISceneBuffer & | dstBuffer, | |||
lt_uint32 | numCols, | |||
lt_uint32 | numRows | |||
) | [static] |
static LT_STATUS LTIDynamicRangeFilter::transformPixel | ( | const LTIPixel & | srcMin, | |
const LTIPixel & | srcMax, | |||
const LTIPixel & | srcPixel, | |||
const LTIPixel & | dstMin, | |||
const LTIPixel & | dstMax, | |||
LTIPixel & | dstPixel | |||
) | [static] |
LizardTech |