MrSID Decode SDK for Raster Reference Manual 9.5.5.5244
LTISceneBuffer Class Reference

class to hold data passed between image stages More...

#include <lti_sceneBuffer.h>

Public Member Functions

Constructors and destructor
 ~LTISceneBuffer ()
 destructor More...
 
 LTISceneBuffer ()
 destructor More...
 
 LTISceneBuffer (const LTIPixel &pixelProps, lt_uint32 numCols, lt_uint32 numRows, void **bsqData, lt_uint32 totalNumCols=0)
 constructor with default window More...
 
LT_STATUS initialize (const LTIPixel &pixelProps, lt_uint32 numCols, lt_uint32 numRows, void **bsqData, lt_uint32 totalNumCols=0)
 destructor More...
 
 LTISceneBuffer (const LTIPixel &pixelProps, lt_uint32 totalNumCols, lt_uint32 totalNumRows, lt_uint32 colOffset, lt_uint32 rowOffset, lt_uint32 numCols, lt_uint32 numRows, void **bsqData)
 constructor with explicit window More...
 
LT_STATUS initialize (const LTIPixel &pixelProps, lt_uint32 totalNumCols, lt_uint32 totalNumRows, lt_uint32 colOffset, lt_uint32 rowOffset, lt_uint32 numCols, lt_uint32 numRows, void **bsqData)
 destructor More...
 
 LTISceneBuffer (const LTISceneBuffer &original, lt_uint32 colOffset, lt_uint32 rowOffset, lt_uint32 numCols, lt_uint32 numRows)
 constructor to overlay existing LTISceneBuffer More...
 
LT_STATUS initialize (const LTISceneBuffer &original, lt_uint32 colOffset, lt_uint32 rowOffset, lt_uint32 numCols, lt_uint32 numRows)
 destructor More...
 
Buffer property accessors
lt_int32 getNumCols () const
 get width of buffer More...
 
lt_int32 getNumRows () const
 get height of buffer More...
 
lt_int32 getTotalNumCols () const
 get width of (entire) buffer More...
 
lt_int32 getNumPixels () const
 get size of exposed window More...
 
const LTIPixel & getPixelProps () const
 get pixel type of buffer More...
 
lt_uint16 getNumBands () const
 get number of bands More...
 
lt_uint16 getSourceBandIndex (lt_uint16 dstBand) const
 get width of buffer More...
 
int getDestinationBandIndex (lt_uint16 srcBand) const
 get width of buffer More...
 
Data buffer accessors
void ** getBSQData () const
 get pointer to data (for all bands) More...
 
void * getBandData (lt_uint16 band) const
 get pointer to data (for 1 band) More...
 
void * getSample (lt_uint32 x, lt_uint32 y, lt_uint16 band) const
 get pointer to sample More...
 
Import functions

These functions provide an easy way to copy data from a variety of layouts into an LTISceneBuffer object, in an efficient manner.

The copying is performed relative to the exposed window of the buffer.

LT_STATUS importData (const LTISceneBuffer &sourceData)
 import from another LTISceneBuffer More...
 
LT_STATUS importDataBand (lt_uint16 dstBand, const LTISceneBuffer &sourceData, lt_uint16 srcBand)
 import one band from another LTISceneBuffer More...
 
LT_STATUS mergeData (LTIPixelFillMethod fillMethod, const LTISceneBuffer &srcBuf, const LTIPixel *srcNodata, const LTIPixel *dstNodata, double mag, double fuzzyThreshold, bool blend, float scaleAlpha)
 Merge pixels from another LTISceneBuffer, observing transparency. More...
 
LT_STATUS importDataBSQ (void **data)
 import from memory (BSQ) More...
 
LT_STATUS importDataBSQ (void *data)
 import from memory (BSQ) More...
 
LT_STATUS importDataBIP (void *data)
 import from memory (BIP) More...
 
LT_STATUS importDataBIP (void *data, lt_uint16 firstNumBands)
 import from another LTISceneBuffer More...
 
LT_STATUS importDataBSQ (LTIOStreamInf &stream)
 import from stream (BSQ) More...
 
LT_STATUS importDataBIP (LTIOStreamInf &stream)
 import from stream (BIP) More...
 
LT_STATUS importData (const LTIMask *binaryMask, const LTISceneBuffer &sourceData, bool blend, float scaleAlpha)
 import from another LTISceneBuffer More...
 
LT_STATUS importDataBand (lt_uint16 dstBand, const LTISceneBuffer &sourceData, lt_uint16 srcBand, const LTIMask *binaryMask)
 import from another LTISceneBuffer More...
 
LT_STATUS mergeData (LTIPixelFillMethod fillMethod, const LTISceneBuffer &srcBuf, const LTIPixel *srcNodata, const LTIPixel *dstNodata, LTIMaskSource *mask, const LTIScene &scene, double fuzzyThreshold, bool blend, float scaleAlpha)
 import from another LTISceneBuffer More...
 

Static Public Attributes

static const double DefaultFuzzyThreshold
 

Export functions

These functions provide an easy way to copy data from an LTISceneBuffer object to a variety of layouts, in an efficient manner.

The copying is performed relative to the exposed window of the buffer.

lt_uint32 y
 export to memory (BSQ) More...
 
lt_uint32 lt_uint16 band const { return getSample(x, y, band)
 export to memory (BSQ) More...
 
lt_int32 y const { return (x < getNumCols() && y < getNumRows())
 export to memory (BSQ) More...
 
LT_STATUS exportDataBSQ (void **&data) const
 export to memory (BSQ) More...
 
LT_STATUS exportDataBSQ (void *&data) const
 export to memory (BSQ) More...
 
LT_STATUS exportDataBIP (void *&data) const
 export to memory (BIP) More...
 
LT_STATUS exportDataBIP (void *data, lt_uint16 fistNumBands) const
 export to memory (BSQ) More...
 
LT_STATUS exportDataBSQ (LTIOStreamInf &stream) const
 export to stream (BSQ) More...
 
LT_STATUS exportDataBIP (LTIOStreamInf &stream) const
 export to stream (BIP) More...
 
LT_STATUS exportData (void *data, lt_uint32 pixelBytes, lt_uint32 rowBytes, lt_uint32 bandBytes) const
 export to (arbitrary) memory More...
 
void byteSwap ()
 export to memory (BSQ) More...
 
LT_STATUS applyMask (const LTIMask &mask, const LTIPixel &color)
 export to memory (BSQ) More...
 
void applyMask (const LTIMask &mask, const LTIPixel &color, lt_uint16 band)
 export to memory (BSQ) More...
 
LT_STATUS fill (const LTIPixel &color)
 export to memory (BSQ) More...
 
void fill (const LTIPixel &color, lt_uint16 band)
 export to memory (BSQ) More...
 
void zero (void)
 export to memory (BSQ) More...
 
void zero (lt_uint16 band)
 export to memory (BSQ) More...
 
LT_STATUS calculateMask (LTIPixelFillMethod fillMethod, double mag, double fuzzyThreshold, bool blend, const LTIPixel *srcNodata, LTIMask &mask) const
 export to memory (BSQ) More...
 
LT_STATUS realloc (lt_uint32 numCols, lt_uint32 numRows)
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getNumRows()) lt_int32 getTotalNumRows() const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (0) lt_int32 getWindowColOffset() const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (0) lt_int32 getWindowRowOffset() const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getNumCols()) lt_int32 getWindowNumCols() const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getNumRows()) lt_int32 getWindowNumRows() const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getNumPixels()) lt_int32 getTotalNumPixels() const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getNumPixels()) lt_int32 getWindowNumPixels() const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getBSQData()) void **getTotalBSQData() const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getBandData(band)) void *getTotalBandData(lt_uint16 band) const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getBSQData()) void **getWindowBSQData() const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getBandData(band)) void *getWindowBandData(lt_uint16 band) const
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getSample(x, y, band)) void *getTotalSample(lt_uint32 x
 export to memory (BSQ) More...
 
 LT_DEPRECATED (getSample(x, y, band)) void *getWindowSample(lt_uint32 x
 export to memory (BSQ) More...
 
 LT_DEPRECATED ((x< getNumCols() &&y< getNumRows())) bool inWindow(lt_int32 x
 export to memory (BSQ) More...
 
static lt_uint32 addAlignment (lt_uint32 value, lt_uint32 byteAlignment)
 compute alignment constraint More...
 
static LT_STATUS buildMask (LTIPixelFillMethod fillMethod, double mag, double fuzzyThreshold, bool blend, const LTISceneBuffer &dstBuffer, const LTIPixel *dstNodata, const LTISceneBuffer &srcBuffer, const LTIPixel *srcNodata, LTIMask &binaryMask)
 export to memory (BSQ) More...
 
static void shiftNoDataValue (LTIPixelFillMethod fillMethod, double fuzzyThreshold, double mag, const LTIPixel &dstMin, const LTIPixel &dstMax, const LTIPixel &dstNoData, LTIPixel &shiftedValue)
 export to memory (BSQ) More...
 
LT_STATUS checkImpedance (const LTIPixel &p) const
 verify that a buffer with the given pixel props could be imported More...
 

Detailed Description

This class holds a buffer of data which is used as the target of decode operations in LTIImageStage.

The data within the buffer is always represented as an array of bytes in BSQ (band-sequential) format. Each band is stored separately, so that the underlying data is an array of N pointers, each array element being a buffer for one band of the image.

The dimensions of the buffer are set in the constructor. The total number of rows and columns represents the actual extent of the data array in memory. However, it is often desirable to only expose a subset of the full rectangle, e.g. to access a large buffer in a stripwise fashion or to overlay a small image into a large buffer. This window may also be set via the constructor, by providing a second set of row/column dimensions and giving an offset for the upper-left position of the window.

If the data pointer passed to the constructor is nullptr, the class will internally allocate the required memory (and retain ownership of it).

Functions are provided to access that data within the buffer in a variety of ways, relative to both the total buffer and the exposed window within it. You may also construct a buffer which is relative to another buffer.

For convenience, a number of functions are also provided which allow the user to copy data to and from an LTISceneBuffer object, using a variety of formats. For example, there are functions to import and export the data in the buffer to BIP (band-interleaved) format.

Note
The pixel properties of the LTISceneBuffer must exactly match the pixel properties of the image being decoded.
Examples
DecodeJP2ToMemory.cpp, DecodeMrSIDBandSelection.cpp, DecodeMrSIDToMemory.cpp, DerivedImageFilter.cpp, DerivedImageReader.cpp, DerivedImageWriter.cpp, InterruptDelegate.cpp, ProgressDelegate.cpp, and SceneBuffer.cpp.

Definition at line 53 of file lti_sceneBuffer.h.

Constructor & Destructor Documentation

◆ ~LTISceneBuffer()

LTISceneBuffer::~LTISceneBuffer ( )

◆ LTISceneBuffer() [1/4]

LTISceneBuffer::LTISceneBuffer ( )

◆ LTISceneBuffer() [2/4]

LTISceneBuffer::LTISceneBuffer ( const LTIPixel &  pixelProps,
lt_uint32  numCols,
lt_uint32  numRows,
void **  bsqData,
lt_uint32  totalNumCols = 0 
)

Constructs an LTISceneBuffer with the window set to the total region of the buffer.

The data parameter may be nullptr, in which case the memory will be allocated internally.

Parameters
pixelPropspixel type to be used in the buffer
numColswidth of the buffer
numRowsheight of the buffer
bsqDatapointer to the data array (may be nullptr)
totalNumColsrowBytes = sizeof(datatype) * totalNumCols

◆ LTISceneBuffer() [3/4]

LTISceneBuffer::LTISceneBuffer ( const LTIPixel &  pixelProps,
lt_uint32  totalNumCols,
lt_uint32  totalNumRows,
lt_uint32  colOffset,
lt_uint32  rowOffset,
lt_uint32  numCols,
lt_uint32  numRows,
void **  bsqData 
)

Constructs an LTISceneBuffer with the window set to the given size and positioned at the given offset. The offset is given relative to the total region, and the window must lie entirely within the region.

The data parameter may be nullptr, in which case the memory will be allocated internally.

Parameters
pixelPropspixel type to be used in the buffer
totalNumColswidth of the buffer
totalNumRowsheight of the buffer
colOffsetx-position of the window
rowOffsety-position of the window
windowNumColswidth of the window
windowNumRowsheight of the window
datapointer to the data array (may be nullptr)

◆ LTISceneBuffer() [4/4]

LTISceneBuffer::LTISceneBuffer ( const LTISceneBuffer &  original,
lt_uint32  colOffset,
lt_uint32  rowOffset,
lt_uint32  numCols,
lt_uint32  numRows 
)

Constructs an LTISceneBuffer which is a window into the given existing LTISceneBuffer object. The window of the new buffer is set to start at the given offset (which is relative to the window of the original buffer). The dimensions of the new window are passed in, and the new window must not extend beyond the dimensions of the original buffer.

Parameters
originalthe existing buffer, to be overlaid
colOffsetx-position of the new window
rowOffsety-position of the new window
windowNumColswidth of the window
windowNumRowsheight of the window

Member Function Documentation

◆ addAlignment()

static lt_uint32 LTISceneBuffer::addAlignment ( lt_uint32  value,
lt_uint32  byteAlignment 
)
static

This utility function returns a value which is equal to or greater than the given value, when aligned to the given constraint. This is useful for determining proper row widths for certain applications.

For example, given the value 99 and an alignment of 4, the function will return 100. Given a value of 128 and an alignment of 8, the function will return 128.

Parameters
valuethe nominal buffer width
byteAlignmentthe alignment required
Returns
the aligned width

◆ applyMask() [1/2]

LT_STATUS LTISceneBuffer::applyMask ( const LTIMask &  mask,
const LTIPixel &  color 
)

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ applyMask() [2/2]

void LTISceneBuffer::applyMask ( const LTIMask &  mask,
const LTIPixel &  color,
lt_uint16  band 
)

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ buildMask()

static LT_STATUS LTISceneBuffer::buildMask ( LTIPixelFillMethod  fillMethod,
double  mag,
double  fuzzyThreshold,
bool  blend,
const LTISceneBuffer &  dstBuffer,
const LTIPixel *  dstNodata,
const LTISceneBuffer &  srcBuffer,
const LTIPixel *  srcNodata,
LTIMask &  binaryMask 
)
static

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ byteSwap()

void LTISceneBuffer::byteSwap ( )

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure
Examples
DerivedImageReader.cpp, and DerivedImageWriter.cpp.

◆ calculateMask()

LT_STATUS LTISceneBuffer::calculateMask ( LTIPixelFillMethod  fillMethod,
double  mag,
double  fuzzyThreshold,
bool  blend,
const LTIPixel *  srcNodata,
LTIMask &  mask 
) const

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ checkImpedance()

LT_STATUS LTISceneBuffer::checkImpedance ( const LTIPixel &  p) const
protected

◆ exportData()

LT_STATUS LTISceneBuffer::exportData ( void *  data,
lt_uint32  pixelBytes,
lt_uint32  rowBytes,
lt_uint32  bandBytes 
) const

This function copies data to a buffer. The layout of the destination is determined by the input parameters.

For example, assuming RGB/uint8 data and WxH pixels:

  • BIP format: pixelBytes=3, rowBytes=W*3, bandBytes=1
  • BIL: pixelBytes=1, rowBytes=W*3, bandBytes=W*1
  • BSQ: pixelBytes=1, rowBytes=W*1, bandBytes=W*H*1
Parameters
datathe destination buffer (may not be nullptr)
pixelByteswidth of pixel, in bytes (e.g. distance from "red" to "red")
rowByteswidth of buffer, in bytes
bandBytesdistance from sample to the next, in bytes (e.g. distance from "red" to "blue")
Returns
status code indicating success or failure

◆ exportDataBIP() [1/3]

LT_STATUS LTISceneBuffer::exportDataBIP ( LTIOStreamInf &  stream) const

This function copies data to a stream. The destination is organized as one large buffer in BIP format.

Parameters
streamthe destination stream
Returns
status code indicating success or failure

◆ exportDataBIP() [2/3]

LT_STATUS LTISceneBuffer::exportDataBIP ( void *&  data) const

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as one large buffer in BIP format.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate the buffer using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ exportDataBIP() [3/3]

LT_STATUS LTISceneBuffer::exportDataBIP ( void *  data,
lt_uint16  fistNumBands 
) const

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ exportDataBSQ() [1/3]

LT_STATUS LTISceneBuffer::exportDataBSQ ( LTIOStreamInf &  stream) const

This function copies data to a stream. The destination is organized as one large buffer in BSQ format.

Parameters
streamthe destination stream
Returns
status code indicating success or failure

◆ exportDataBSQ() [2/3]

LT_STATUS LTISceneBuffer::exportDataBSQ ( void *&  data) const

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as one large buffer in BSQ format.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate the buffer using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ exportDataBSQ() [3/3]

LT_STATUS LTISceneBuffer::exportDataBSQ ( void **&  data) const

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ fill() [1/2]

LT_STATUS LTISceneBuffer::fill ( const LTIPixel &  color)

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ fill() [2/2]

void LTISceneBuffer::fill ( const LTIPixel &  color,
lt_uint16  band 
)

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ getBandData()

void * LTISceneBuffer::getBandData ( lt_uint16  band) const

This function returns a pointer to the data buffer for the given band.

Parameters
bandthe band to access
Returns
a pointer to the array of data buffers
Examples
DerivedImageFilter.cpp, DerivedImageReader.cpp, and DerivedImageWriter.cpp.

◆ getBSQData()

void ** LTISceneBuffer::getBSQData ( ) const

This function returns a pointer to the array of data buffers, one per band.

Returns
a pointer to the array of data buffers

◆ getDestinationBandIndex()

int LTISceneBuffer::getDestinationBandIndex ( lt_uint16  srcBand) const

Returns the width of the buffer.

Returns
the width, in pixels

◆ getNumBands()

lt_uint16 LTISceneBuffer::getNumBands ( ) const

Returns the number of bands of the pixel of the imager.

This is the same as calling getPixelProps().getNumBands().

Returns
the number of bands
Examples
DerivedImageReader.cpp, and DerivedImageWriter.cpp.

◆ getNumCols()

lt_int32 LTISceneBuffer::getNumCols ( ) const

Returns the width of the buffer.

Returns
the width, in pixels

◆ getNumPixels()

lt_int32 LTISceneBuffer::getNumPixels ( ) const

Returns the total size of the window of the buffer, in pixels.

This is equal to getNumCols() * getNumRows().

Returns
size of exposed in buffer

◆ getNumRows()

lt_int32 LTISceneBuffer::getNumRows ( ) const

Returns the height of the buffer.

Returns
the height, in pixels

◆ getPixelProps()

const LTIPixel & LTISceneBuffer::getPixelProps ( ) const

Returns the pixel type of the buffer.

Returns
the pixel type
Examples
DerivedImageReader.cpp, and DerivedImageWriter.cpp.

◆ getSample()

void * LTISceneBuffer::getSample ( lt_uint32  x,
lt_uint32  y,
lt_uint16  band 
) const

This function returns a pointer to the data for the given band of the specified pixel.

Parameters
xthe x-position of the pixel
ythe y-position of the pixel
bandthe band to access
Returns
a pointer to the sample

◆ getSourceBandIndex()

lt_uint16 LTISceneBuffer::getSourceBandIndex ( lt_uint16  dstBand) const

Returns the width of the buffer.

Returns
the width, in pixels

◆ getTotalNumCols()

lt_int32 LTISceneBuffer::getTotalNumCols ( ) const

Returns the total width of the buffer. RowBytes equals TotalNumCols * sizeof(DataType).

Returns
the total width, in pixels
Examples
DerivedImageFilter.cpp, DerivedImageReader.cpp, and DerivedImageWriter.cpp.

◆ importData() [1/2]

LT_STATUS LTISceneBuffer::importData ( const LTIMask *  binaryMask,
const LTISceneBuffer &  sourceData,
bool  blend,
float  scaleAlpha 
)

This function copies data from one source LTISceneBuffer object into another destination LTISceneBuffer object.

Parameters
sourceDatathe data to be imported
Returns
status code indicating success or failure

◆ importData() [2/2]

LT_STATUS LTISceneBuffer::importData ( const LTISceneBuffer &  sourceData)

This function copies data from one source LTISceneBuffer object into another destination LTISceneBuffer object.

Parameters
sourceDatathe data to be imported
Returns
status code indicating success or failure

◆ importDataBand() [1/2]

LT_STATUS LTISceneBuffer::importDataBand ( lt_uint16  dstBand,
const LTISceneBuffer &  sourceData,
lt_uint16  srcBand 
)

This function copies just one band of data from one source LTISceneBuffer object into another destination LTISceneBuffer object.

Parameters
dstBandthe band number of this buffer to be written to
sourceDatathe data to be imported
srcBandthe band number of sourceData to be read from
Returns
status code indicating success or failure

◆ importDataBand() [2/2]

LT_STATUS LTISceneBuffer::importDataBand ( lt_uint16  dstBand,
const LTISceneBuffer &  sourceData,
lt_uint16  srcBand,
const LTIMask *  binaryMask 
)

This function copies data from one source LTISceneBuffer object into another destination LTISceneBuffer object.

Parameters
sourceDatathe data to be imported
Returns
status code indicating success or failure

◆ importDataBIP() [1/3]

LT_STATUS LTISceneBuffer::importDataBIP ( LTIOStreamInf &  stream)

This function copies data from a buffer contained in the given stream. The data is assumed to be organized as one large buffer in BIP format.

Parameters
streamthe source data
Returns
status code indicating success or failure

◆ importDataBIP() [2/3]

LT_STATUS LTISceneBuffer::importDataBIP ( void *  data)

This function copies data from a buffer in memory. The source pointer is assumed to be organized as one large buffer in BIP format.

Parameters
datathe source data
Returns
status code indicating success or failure

◆ importDataBIP() [3/3]

LT_STATUS LTISceneBuffer::importDataBIP ( void *  data,
lt_uint16  firstNumBands 
)

This function copies data from one source LTISceneBuffer object into another destination LTISceneBuffer object.

Parameters
sourceDatathe data to be imported
Returns
status code indicating success or failure

◆ importDataBSQ() [1/3]

LT_STATUS LTISceneBuffer::importDataBSQ ( LTIOStreamInf &  stream)

This function copies data from a buffer contained in the given stream. The data is assumed to be organized as one large buffer in BSQ format.

Parameters
streamthe source data
Returns
status code indicating success or failure

◆ importDataBSQ() [2/3]

LT_STATUS LTISceneBuffer::importDataBSQ ( void **  data)

This function copies data from a buffer in memory. The source pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

Parameters
datathe source data
Returns
status code indicating success or failure

◆ importDataBSQ() [3/3]

LT_STATUS LTISceneBuffer::importDataBSQ ( void *  data)

This function copies data from a buffer in memory. The source pointer is assumed to be organized as one large buffer in BSQ format.

Parameters
datathe source data
Returns
status code indicating success or failure

◆ initialize() [1/3]

LT_STATUS LTISceneBuffer::initialize ( const LTIPixel &  pixelProps,
lt_uint32  numCols,
lt_uint32  numRows,
void **  bsqData,
lt_uint32  totalNumCols = 0 
)

◆ initialize() [2/3]

LT_STATUS LTISceneBuffer::initialize ( const LTIPixel &  pixelProps,
lt_uint32  totalNumCols,
lt_uint32  totalNumRows,
lt_uint32  colOffset,
lt_uint32  rowOffset,
lt_uint32  numCols,
lt_uint32  numRows,
void **  bsqData 
)

◆ initialize() [3/3]

LT_STATUS LTISceneBuffer::initialize ( const LTISceneBuffer &  original,
lt_uint32  colOffset,
lt_uint32  rowOffset,
lt_uint32  numCols,
lt_uint32  numRows 
)

◆ LT_DEPRECATED() [1/14]

LTISceneBuffer::LT_DEPRECATED ( (x< getNumCols() &&y< getNumRows())  )

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ LT_DEPRECATED() [2/14]

LTISceneBuffer::LT_DEPRECATED ( 0  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 609 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [3/14]

LTISceneBuffer::LT_DEPRECATED ( 0  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 610 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [4/14]

LTISceneBuffer::LT_DEPRECATED ( getBandData(band)  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 616 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [5/14]

LTISceneBuffer::LT_DEPRECATED ( getBandData(band)  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 618 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [6/14]

LTISceneBuffer::LT_DEPRECATED ( getBSQData()  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 615 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [7/14]

LTISceneBuffer::LT_DEPRECATED ( getBSQData()  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 617 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [8/14]

LTISceneBuffer::LT_DEPRECATED ( getNumCols()  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 611 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [9/14]

LTISceneBuffer::LT_DEPRECATED ( getNumPixels()  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 613 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [10/14]

LTISceneBuffer::LT_DEPRECATED ( getNumPixels()  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 614 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [11/14]

LTISceneBuffer::LT_DEPRECATED ( getNumRows()  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 608 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [12/14]

LTISceneBuffer::LT_DEPRECATED ( getNumRows()  ) const
inline

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 612 of file lti_sceneBuffer.h.

◆ LT_DEPRECATED() [13/14]

LTISceneBuffer::LT_DEPRECATED ( getSample(x, y, band)  )

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ LT_DEPRECATED() [14/14]

LTISceneBuffer::LT_DEPRECATED ( getSample(x, y, band)  )

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ mergeData() [1/2]

LT_STATUS LTISceneBuffer::mergeData ( LTIPixelFillMethod  fillMethod,
const LTISceneBuffer &  srcBuf,
const LTIPixel *  srcNodata,
const LTIPixel *  dstNodata,
double  mag,
double  fuzzyThreshold,
bool  blend,
float  scaleAlpha 
)

This function copies pixel data from one LTISceneBuffer into another, observing pixel transparency and possibly applying heuristics to help achieve a good mosaicking result. The source and destination nodata values, as well as any available alpha channel, will be used together to determine pixel transparency.

Parameters
fillMethodspecifies the heuristic to use in merging the data
srcBufthe buffer containing data to be imported
srcNodatatransparency sentinel pixel for the source buffer (may be nullptr)
dstNodatatransparency sentinel pixel for the destination buffer (may be nullptr)
magscene magnification, used in merging heuristics
fuzzyThresholdthe threshold used when doing fuzzy no-data merging
blendin presence of alpha channel, use alpha blending
scaleAlphawhen alpha blending multiply imported alpha by this value
Returns
status code indicating success or failure

◆ mergeData() [2/2]

LT_STATUS LTISceneBuffer::mergeData ( LTIPixelFillMethod  fillMethod,
const LTISceneBuffer &  srcBuf,
const LTIPixel *  srcNodata,
const LTIPixel *  dstNodata,
LTIMaskSource *  mask,
const LTIScene &  scene,
double  fuzzyThreshold,
bool  blend,
float  scaleAlpha 
)

This function copies data from one source LTISceneBuffer object into another destination LTISceneBuffer object.

Parameters
sourceDatathe data to be imported
Returns
status code indicating success or failure

◆ realloc()

LT_STATUS LTISceneBuffer::realloc ( lt_uint32  numCols,
lt_uint32  numRows 
)

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ shiftNoDataValue()

static void LTISceneBuffer::shiftNoDataValue ( LTIPixelFillMethod  fillMethod,
double  fuzzyThreshold,
double  mag,
const LTIPixel &  dstMin,
const LTIPixel &  dstMax,
const LTIPixel &  dstNoData,
LTIPixel &  shiftedValue 
)
static

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ zero() [1/2]

void LTISceneBuffer::zero ( lt_uint16  band)

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

◆ zero() [2/2]

void LTISceneBuffer::zero ( void  )

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Member Data Documentation

◆ const [1/2]

lt_uint32 lt_uint16 band LTISceneBuffer::const { return getSample(x, y, band)

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 619 of file lti_sceneBuffer.h.

◆ const [2/2]

lt_int32 y LTISceneBuffer::const { return (x < getNumCols() && y < getNumRows())

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 621 of file lti_sceneBuffer.h.

◆ DefaultFuzzyThreshold

const double LTISceneBuffer::DefaultFuzzyThreshold
static

Definition at line 63 of file lti_sceneBuffer.h.

◆ y

lt_uint32 LTISceneBuffer::y

This function copies data to a buffer in memory. The destination pointer is assumed to be organized as an array of pointers to BSQ buffers, one per band.

If the data parameter is nullptr, the function will allocate it (but not retain ownership). In this case it is the caller's responsibility to deallocate each band using the delete[] operator.

Parameters
datathe destination data (may be nullptr) [in/out]
Returns
status code indicating success or failure

Definition at line 619 of file lti_sceneBuffer.h.


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

Extensis