MrSID Decode SDK for Raster Reference Manual  9.5.5.5244
LTIRawImageReader Class Reference

class for reading RAW files More...

#include <lti_rawImageReader.h>

Inheritance diagram for LTIRawImageReader:
LTIGeoImageReader LTIImageReader LTIOverrideDimensions< LTIOverridePixelProps< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > > LTIOverridePixelProps< BASE > LTIOverrideDimensionsData LTIOverridePixelPropsData LTIBBBImageReader

Public Member Functions

LT_STATUS initialize (LTIOStreamInf *stream, const LTIPixel &pixelProps, lt_uint32 width, lt_uint32 height, bool useWorldFile=true)
 initialize (stream) More...
 
LT_STATUS initialize (const LTFileSpec &fileSpec, const LTIPixel &pixelProps, lt_uint32 width, lt_uint32 height, bool useWorldFile=true)
 initialize (FileSpec) More...
 
LT_STATUS initialize (const char *file, const LTIPixel &pixelProps, lt_uint32 width, lt_uint32 height, bool useWorldFile=true)
 initialize (char*) More...
 
- Public Member Functions inherited from LTIImageReader
LT_STATUS getDimsAtMag (double mag, lt_uint32 &width, lt_uint32 &height) const
 
lt_uint32 getModifications (const LTIScene &scene) const
 
LTIMaskSource * getMask () const
 
bool getPipelineInfo (LTIPipelineInfo info) const
 
LTIImageStage * getPreviousStage (void) const
 
lt_int64 getEncodingCost (const LTIScene &scene) const
 
bool getReaderScene (const LTIScene &decodeScene, LTIScene &readerScene) const
 
LT_STATUS readBegin (const LTIPixel &pixelProps, const LTIScene &fullScene)
 
LT_STATUS readStrip (LTISceneBuffer &buffer, const LTIScene &stripScene)
 
LT_STATUS readEnd (void)
 
- Public Member Functions inherited from LTIOverrideDimensions< LTIOverridePixelProps< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > >
lt_uint32 getWidth () const
 
lt_uint32 getHeight () const
 
- Public Member Functions inherited from LTIOverridePixelProps< BASE >
const LTIPixel & getPixelProps () const
 
const LTIPixel & getMinDynamicRange () const
 
const LTIPixel & getMaxDynamicRange () const
 
LT_STATUS overridePixelBPS (lt_uint8 bps)
 
LT_STATUS overrideColorSpace (LTIColorSpace colorspace)
 
LT_STATUS overrideDynamicRange (const LTIPixel &drmin, const LTIPixel &drmax)
 
const LTIPixel * getBackgroundPixel () const
 
const LTIPixel * getNoDataPixel () const
 
LT_STATUS overrideBackgroundPixel (const LTIPixel *backgroundPixel)
 
LT_STATUS overrideNoDataPixel (const LTIPixel *nodataPixel)
 

Static Public Member Functions

static LTIRawImageReader * create (void)
 

Protected Member Functions

 LTIRawImageReader (void)
 
virtual ~ LTIRawImageReader (void)
 
- Protected Member Functions inherited from LTIGeoImageReader
 LTIGeoImageReader (bool supportBandSelection)
 
LT_STATUS init (bool useWorldFile)
 
bool getUseWorldFile () const
 
LT_STATUS readWorldFile (const LTFileSpec &file, bool &changed, bool doUseWorldFileTest=true)
 
LT_STATUS readWorldFile (LTIOStreamInf &stream, bool &changed, bool doUseWorldFileTest=true)
 
- Protected Member Functions inherited from LTIImageReader
 LTIImageReader (bool supportBandSelection)
 
LT_STATUS init (const LTIImage *image=nullptr)
 
LT_STATUS loadMetadataIntoObjects (const LTIMetadataDatabase &fileMetadata, LTIPixel &pixelProps, bool updatePixelProps, bool updateGeoCoord)
 
- Protected Member Functions inherited from LTIOverridePixelPropsData
 LTIOverridePixelPropsData ()
 
 ~LTIOverridePixelPropsData ()
 
LT_STATUS setPixelProps (const LTIPixel &pixelProps)
 set pixel properties of the image More...
 
LT_STATUS setPixelBPS (lt_uint8 bps)
 
LT_STATUS setColorSpace (LTIColorSpace colorspace)
 
LT_STATUS setDynamicRange (const LTIPixel &drmin, const LTIPixel &drmax)
 set the dynamic range of the image More...
 
LT_STATUS setDefaultDynamicRange (void)
 set the dynamic range of the image More...
 
LT_STATUS setBackgroundPixel (const LTIPixel *backgroundPixel)
 set the background color of the image More...
 
LT_STATUS setNoDataPixel (const LTIPixel *nodataPixel)
 set the "no data" (transparency) color of the image More...
 
- Protected Member Functions inherited from LTIOverrideDimensionsData
 LTIOverrideDimensionsData ()
 
LT_STATUS setDimensions (lt_uint32 width, lt_uint32 height)
 set width and height of the image More...
 

Properties of the RAW image

These must be called prior to calling initialize(), unlike most other SDK objects.

LTFileSpec * m_fileSpec
 set stream ownership More...
 
LT_STATUS decodeBegin (const LTIPixel &pixelProps, const LTIScene &fullScene)
 set stream ownership More...
 
LT_STATUS decodeStrip (LTISceneBuffer &stripBuffer, const LTIScene &stripScene)
 set stream ownership More...
 
LT_STATUS decodeEnd (void)
 set stream ownership More...
 
const char * getSourceName (void) const
 set stream ownership More...
 
void setStreamOwnership (bool takeOwnership)
 set stream ownership More...
 
void setRowBytes (lt_uint32 rowBytes)
 sets the number of bytes in each row More...
 
void setLayout (LTILayout layout)
 sets the layout or organization of the raw data More...
 
void setSkipBytes (lt_int64 leadingBytes, lt_int64 trailingBytes=0)
 sets the number of bytes to skip at the beginning and end of the file More...
 
void setByteOrder (LTIEndian byteOrder)
 sets endianness of input file More...
 

Additional Inherited Members

- Protected Attributes inherited from LTIImageReader
const bool m_supportBandSelection
 
- Protected Attributes inherited from LTIOverridePixelPropsData
LTIPixel * m_pixelProps
 
LTIPixel * m_drminPixel
 
LTIPixel * m_drmaxPixel
 
LTIPixel * m_backgroundPixel
 
LTIPixel * m_nodataPixel
 
- Protected Attributes inherited from LTIOverrideDimensionsData
lt_uint32 m_width
 
lt_uint32 m_height
 

Detailed Description

This class reads a RAW image.

The RAW format used is simple packed BIP form.

Examples
Pipeline.cpp.

Definition at line 25 of file lti_rawImageReader.h.

Constructor & Destructor Documentation

◆ LTIRawImageReader()

LTIRawImageReader::LTIRawImageReader ( void  )
protected

◆ ~ LTIRawImageReader()

virtual LTIRawImageReader::~ LTIRawImageReader ( void  )
protectedvirtual

Member Function Documentation

◆ create()

static LTIRawImageReader* LTIRawImageReader::create ( void  )
static
Examples
Pipeline.cpp.

◆ decodeBegin()

LT_STATUS LTIRawImageReader::decodeBegin ( const LTIPixel &  pixelProps,
const LTIScene &  fullScene 
)
protected

Sets the ownership of the stream, to indicate responsibility for deleting the stream when done. This only pertains to objects which were passed a stream in the ctor.

If not set, the default is for the object to not take ownership of the stream.

Note
This must be called prior to calling initialize().
Parameters
takeOwnershipset to true to have the reader delete the stream

◆ decodeEnd()

LT_STATUS LTIRawImageReader::decodeEnd ( void  )
protected

Sets the ownership of the stream, to indicate responsibility for deleting the stream when done. This only pertains to objects which were passed a stream in the ctor.

If not set, the default is for the object to not take ownership of the stream.

Note
This must be called prior to calling initialize().
Parameters
takeOwnershipset to true to have the reader delete the stream

◆ decodeStrip()

LT_STATUS LTIRawImageReader::decodeStrip ( LTISceneBuffer &  stripBuffer,
const LTIScene &  stripScene 
)
protected

Sets the ownership of the stream, to indicate responsibility for deleting the stream when done. This only pertains to objects which were passed a stream in the ctor.

If not set, the default is for the object to not take ownership of the stream.

Note
This must be called prior to calling initialize().
Parameters
takeOwnershipset to true to have the reader delete the stream

◆ getSourceName()

const char* LTIRawImageReader::getSourceName ( void  ) const
protectedvirtual

Sets the ownership of the stream, to indicate responsibility for deleting the stream when done. This only pertains to objects which were passed a stream in the ctor.

If not set, the default is for the object to not take ownership of the stream.

Note
This must be called prior to calling initialize().
Parameters
takeOwnershipset to true to have the reader delete the stream

Implements LTIImageReader.

◆ initialize() [1/3]

LT_STATUS LTIRawImageReader::initialize ( const char *  file,
const LTIPixel &  pixelProps,
lt_uint32  width,
lt_uint32  height,
bool  useWorldFile = true 
)

This function constructs an LTIImageReader using the data in the stream with the image properties specified. The input taken from a stream, and the background and nodata pixels may be specified.

Parameters
filefile containing the RAW image data (may not be nullptr)
pixelPropsthe pixel properties of the image (colorspace, datatype, etc)
widththe width of the image
heightthe height of the image
useWorldFileuse world file information if available

◆ initialize() [2/3]

LT_STATUS LTIRawImageReader::initialize ( const LTFileSpec &  fileSpec,
const LTIPixel &  pixelProps,
lt_uint32  width,
lt_uint32  height,
bool  useWorldFile = true 
)

This function constructs an LTIImageReader using the data in the stream with the image properties specified. The input taken from a stream, and the background and nodata pixels may be specified.

Parameters
fileSpecfile containing the RAW image data
pixelPropsthe pixel properties of the image (colorspace, datatype, etc)
widththe width of the image
heightthe height of the image
useWorldFileuse world file information if available

◆ initialize() [3/3]

LT_STATUS LTIRawImageReader::initialize ( LTIOStreamInf *  stream,
const LTIPixel &  pixelProps,
lt_uint32  width,
lt_uint32  height,
bool  useWorldFile = true 
)

This function constructs an LTIImageReader using the data in the stream with the image properties specified. The input taken from a stream.

Parameters
streamstream containing the RAW image data (may not be nullptr)
pixelPropsthe pixel properties of the image (colorspace, datatype, etc)
widththe width of the image
heightthe height of the image
useWorldFileuse world file information if available
Examples
Pipeline.cpp.

◆ setByteOrder()

void LTIRawImageReader::setByteOrder ( LTIEndian  byteOrder)

Sets the byte order or endianness of the input file.

Note
This must be called prior to calling initialize().
Parameters
byteOrderthe endian setting to use

◆ setLayout()

void LTIRawImageReader::setLayout ( LTILayout  layout)

Sets the layout or organization of the raw data.

If not set, the default is BIP format.

Note
This must be called prior to calling initialize().
Parameters
layoutthe layout of the raw data

◆ setRowBytes()

void LTIRawImageReader::setRowBytes ( lt_uint32  rowBytes)

Sets the number of bytes in each row.

If not set, the bytes per row is simply the number of data items per row times the size of a data item. (Note that a "data item" in this case may be either a pixel or a sample, depending on the layout being used.)

Note
This must be called prior to calling initialize().
Parameters
rowBytesthe number of bytes per row

◆ setSkipBytes()

void LTIRawImageReader::setSkipBytes ( lt_int64  leadingBytes,
lt_int64  trailingBytes = 0 
)

Sets the number of bytes to skip at the beginning of the file and the end of the file. (The "ending skip bytes" property is sometimes required because LTIRawImageReader::initialize() does a sanity check to make sure the number of data bytes in the file is equal to the number of bytes needed for the given width, height, etc.

Note
This must be called prior to calling initialize().
Parameters
leadingBytesthe number of bytes to skip at the top
trailingBytesthe number of bytes to skip at the bottom

◆ setStreamOwnership()

void LTIRawImageReader::setStreamOwnership ( bool  takeOwnership)

Sets the ownership of the stream, to indicate responsibility for deleting the stream when done. This only pertains to objects which were passed a stream in the ctor.

If not set, the default is for the object to not take ownership of the stream.

Note
This must be called prior to calling initialize().
Parameters
takeOwnershipset to true to have the reader delete the stream

Member Data Documentation

◆ m_fileSpec

LTFileSpec* LTIRawImageReader::m_fileSpec
protected

Sets the ownership of the stream, to indicate responsibility for deleting the stream when done. This only pertains to objects which were passed a stream in the ctor.

If not set, the default is for the object to not take ownership of the stream.

Note
This must be called prior to calling initialize().
Parameters
takeOwnershipset to true to have the reader delete the stream

Definition at line 179 of file lti_rawImageReader.h.


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

Extensis