MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
LTIRawImageReader Class Reference

class for reading RAW files More...

#include <lti_rawImageReader.h>

Inheritance diagram for LTIRawImageReader:
LTIGeoImageReader LTIImageReader LTIOverrideDimensions< LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > > > LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > > LTIOverrideDimensionsData LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > LTIOverridePixelPropsData LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > LTIOverrideBackgroundPixelData LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > LTIOverrideGeoCoordData LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > LTIOverrideMagnificationData LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > LTIOverrideIsSelectiveData LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > LTIOverrideStripHeightData LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > LTIOverrideDelegatesData LTIOverrideMetadata< LTIImageStage > LTIOverridePixelLookupTablesData LTIImageStage LTIOverrideMetadataData LTIImage LTIReferenceCountedObject LTIBBBImageReader

List of all members.

Public Member Functions

LT_STATUS initialize (LTIOStreamInf *stream, const LTIPixel &pixelProps, lt_uint32 width, lt_uint32 height, bool useWorldFile=true)
 initialize (stream)
LT_STATUS initialize (const LTFileSpec &fileSpec, const LTIPixel &pixelProps, lt_uint32 width, lt_uint32 height, bool useWorldFile=true)
 initialize (FileSpec)
LT_STATUS initialize (const char *file, const LTIPixel &pixelProps, lt_uint32 width, lt_uint32 height, bool useWorldFile=true)
 initialize (char*)
Properties of the RAW image

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

void setStreamOwnership (bool takeOwnership)
 set stream ownership
void setRowBytes (lt_uint32 rowBytes)
 sets the number of bytes in each row
void setLayout (LTILayout layout)
 sets the layout or organization of the raw data
void setSkipBytes (lt_int64 leadingBytes, lt_int64 trailingBytes=0)
 sets the number of bytes to skip at the beginning and end of the file
void setByteOrder (LTIEndian byteOrder)
 sets endianness of input file

Static Public Member Functions

static LTIRawImageReadercreate (void)

Protected Member Functions

 LTIRawImageReader (void)
virtual ~LTIRawImageReader (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
const char * getSourceName (void) const

Protected Attributes

LTFileSpecm_fileSpec

Detailed Description

This class reads a RAW image.

The RAW format used is simple packed BIP form.

Examples:
Pipeline.cpp.

Definition at line 30 of file lti_rawImageReader.h.


Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented in LTIBBBImageReader.

Examples:
Pipeline.cpp.
LT_STATUS LTIRawImageReader::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:
pixelPropsthe band selection
fullScenethe full scene to be read
Returns:
status code indicating success or failure

Implements LTIImageStage.

LT_STATUS LTIRawImageReader::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

Implements LTIImageStage.

LT_STATUS LTIRawImageReader::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:
stripBufferthe buffer to read the pixels into
stripScenethe scene for this strip being decoded
Returns:
status code indicating success or failure

Implements LTIImageStage.

const char* LTIRawImageReader::getSourceName ( void  ) const [protected, virtual]

Implements LTIImageReader.

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

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

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

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

Definition at line 184 of file lti_rawImageReader.h.


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