LTIDynamicRangeFilter Class Reference

change dynamic range or datatype of the samples of the image More...

#include <lti_dynamicRangeFilter.h>

Inheritance diagram for LTIDynamicRangeFilter:

LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIImageFilter > > LTIOverrideBackgroundPixel< LTIImageFilter > LTIOverridePixelPropsData LTIImageFilter LTIOverrideBackgroundPixelData LTIImageStage LTIImage LTIReferenceCountedObject

List of all members.

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
LT_STATUS setSrcMinMax (const LTIPixel &srcMin, const LTIPixel &srcMax)
LT_STATUS setDstMinMax (const LTIPixel &srcMin, const LTIPixel &srcMax)

Static Public Member Functions

static LTIDynamicRangeFiltercreate (void)
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

 LTIDynamicRangeFilter (void)
virtual ~LTIDynamicRangeFilter (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


Detailed Description

Adjusts the sample values to fit the given dynamic range and datatype.

Definition at line 33 of file lti_dynamicRangeFilter.h.


Constructor & Destructor Documentation

LTIDynamicRangeFilter::LTIDynamicRangeFilter ( void   )  [protected]

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


Member Function Documentation

static LTIDynamicRangeFilter* LTIDynamicRangeFilter::create ( void   )  [static]

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).

Note:
the filter will stretch dynamic range on a per-band basis
Parameters:
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

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.

Parameters:
srcImage the base image
dstDataType the datatype of the new image stage

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.

Note:
the filter will stretch dynamic range on a per-band basis
Parameters:
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

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.

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

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.

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

Reimplemented from LTIImageFilter.

LT_STATUS LTIDynamicRangeFilter::setSrcMinMax ( const LTIPixel srcMin,
const LTIPixel srcMax 
)

LT_STATUS LTIDynamicRangeFilter::setDstMinMax ( const LTIPixel srcMin,
const LTIPixel srcMax 
)

static LT_STATUS LTIDynamicRangeFilter::push ( LTIImageStage *&  pipeline,
const LTIPixel pixelProps,
bool  applyDynamicRange 
) [static]

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]

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.

Parameters:
pixelProps the band selection
fullScene the full scene to be read
Returns:
status code indicating success or failure

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.

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

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.

Returns:
status code indicating success or failure

Reimplemented from LTIImageFilter.


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

LizardTech