MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
LizardTech::NITFReaderManager Class Reference

class for reading an NITF file More...

`#include <NITFReaderManager.h>`

Inheritance diagram for LizardTech::NITFReaderManager:
[legend]
Collaboration diagram for LizardTech::NITFReaderManager:
[legend]

## Public Member Functions
LT_STATUS | initialize (const LTFileSpec &fileSpec, bool useWorldFile=true)
| initialization Creates an NITFReaderManager object from the given file. More...
LT_STATUS | initialize (LTIOStreamInf *stream)
| initialization Creates an NITFReaderManager object from the given stream. More...
LT_STATUS | createReader (Nitf::ImageReader *&reader, lt_uint32 idx)
| creates a reader for a single segment More...
LT_STATUS | createImageStage (lt_uint32 imageNumber, LTIImageStage *&imageStage)
| creates a reader for a single element, band mapped according to irep More...
void | setCompat_2500B_N2 (bool use2500B)
| COMRAT compliance control. More...
bool | getCompat_2500B_N2 () const
| COMRAT compliance setting. More...
lt_int64 | getFileSize () const
const Nitf::FileHeader * | getFileHeader () const
| returns FileHeader metadata More...
lt_uint32 | getNumImageSegments () const
| returns number of image segments More...
const Nitf::ImageSegment * | getImageSegment (lt_uint32 num) const
| returns an image segment More...
const char * | getImageSegmentIID1 (lt_uint32 num) const
| returns the IID1 field of the given image segment More...
lt_uint32 | getNumGraphicSegments () const
| returns the number of graphic segments More...
const Nitf::GraphicSegment * | getGraphicSegment (lt_uint32 num) const
| returns a graphic segment More...
lt_uint32 | getNumLabelSegments () const
| returns the number of label segments More...
const Nitf::LabelSegment * | getLabelSegment (lt_uint32 num) const
| returns a label segment More...
lt_uint32 | getNumTextSegments () const
| returns the number of text segments More...
const Nitf::TextSegment * | getTextSegment (lt_uint32 num) const
| returns a text segment More...
lt_uint32 | getNumDataSegments () const
| returns the number of data segments More...
const Nitf::DataSegment * | getDataSegment (lt_uint32 num) const
| returns a data segment More...
lt_uint32 | getNumResSegments () const
| returns the number of RES segments More...
const Nitf::ReservedSegment * | getResSegment (lt_uint32 num) const
| returns a RES segment More...
const char * | getVersionString () const
| returns NITF version information More...
const Nitf::FileMetadata * | getFileMetadata () const
| returns the file-level metadata More...
const Nitf::SecurityMetadata * | getSecurityMetadata () const
| returns file-level security metadata More...
LTFileSpec * | getFileSpec () const
Public Member Functions inherited from LTIImageStageManager
virtual LT_STATUS | createImageProps (lt_uint32 imageNumber, LTIImage *&imageProps)
| create an image properties More...
virtual LTIImageStage * | createImageStage (lt_uint32 imageNumber)
lt_uint32 | getNumImages (void) const
| get the number of images the object is managing More...
virtual LT_STATUS | createOverviewImageStage (LTIImageStage *&imageStage)
| create an image stage that can be used as an overview of all other images. More...
Public Member Functions inherited from LTIReferenceCountedObject
virtual void | retain (void) const
| increment reference counter More...
virtual void | release (void) const
| decrement the reference counter and delete the object when the counter is zero More...

## Static Public Member Functions
static NITFReaderManager * | create (void)

## Protected Member Functions
| NITFReaderManager (void)
virtual | ~NITFReaderManager (void)
Protected Member Functions inherited from LTIImageStageManager
| LTIImageStageManager (void)
virtual | ~LTIImageStageManager (void)
virtual void | setNumImages (lt_uint32 numImages)
| The derived class needs to call this. More...
Protected Member Functions inherited from LTIReferenceCountedObject
| LTIReferenceCountedObject (void)
virtual | ~LTIReferenceCountedObject (void)

## Detailed Description

This class is the main entry point for reading from an NITF file. You should initially construct a NITFReaderManager, then use the functions it provides to access the segments in the image, such as getImageSegment() or getTextSegment.

To extract pixels from an image, you need to createReader() for the image segment desired. This will return an object derived from LTIImageReader which can be used for decode requests.

Definition at line 53 of file NITFReaderManager.h.

## Constructor & Destructor Documentation

LizardTech::NITFReaderManager::NITFReaderManager | ( | void | ) |  |
| protected

virtual LizardTech::NITFReaderManager::~NITFReaderManager | ( | void | ) |  |
| protected virtual

## Member Function Documentation

static NITFReaderManager* LizardTech::NITFReaderManager::create | ( | void | ) |  |
| static

LT_STATUS LizardTech::NITFReaderManager::createImageStage | ( | lt_uint32 | imageNumber,
|  | LTIImageStage *& | imageStage
| ) |  |
| virtual

This function is used to create an LTIImageStage pipeline including the reader itself fronted by a bandmap filter accommodating images that are not in RGB band order.

Note: the index used is zero-based for consistency with this virtual method, in contrast to the createReader() method which uses a one-based segment index.

Parameters

  imageNumber | index of the image segment (zero-based index)
  imageStage | the created band-mapped reader pipeline

Returns
  status code

Reimplemented from LTIImageStageManager.

LT_STATUS LizardTech::NITFReaderManager::createReader | ( | Nitf::ImageReader *& | reader,
|  | lt_uint32 | idx
| ) |  |

This function is used to create an ImageReader for a single given image segment, specified by number.

The reader is allocated and initialized by this function, but the caller has ownership of the object.

Parameters

  reader | the created segment reader
  idx | index of the image segment (one-based index)

Returns
  status code

bool LizardTech::NITFReaderManager::getCompat_2500B_N2 | ( | ) |  | const

Returns the 2500B compatability setting; see the setCompat_2500B_N2() function for details.

Returns
  true iff 200B / Note 2 formatting is being used

const Nitf::DataSegment* LizardTech::NITFReaderManager::getDataSegment | ( | lt_uint32 | num) |  | const

This function returns an object representing a data segment.

Parameters

  num | the index of the segment to return (numbered starting with 1)

Returns
  the segment object

const Nitf::FileHeader* LizardTech::NITFReaderManager::getFileHeader | ( | ) |  | const

const Nitf::FileMetadata* LizardTech::NITFReaderManager::getFileMetadata | ( | ) |  | const

lt_int64 LizardTech::NITFReaderManager::getFileSize | ( | ) |  | const

LTFileSpec* LizardTech::NITFReaderManager::getFileSpec | ( | ) |  | const

const Nitf::GraphicSegment* LizardTech::NITFReaderManager::getGraphicSegment | ( | lt_uint32 | num) |  | const

This function returns an object representing a graphic segment.

Parameters

  num | the index of the segment to return (numbered starting with 1)

Returns
  the segment object

const Nitf::ImageSegment* LizardTech::NITFReaderManager::getImageSegment | ( | lt_uint32 | num) |  | const

This function returns an object representing an image segment. (Note this object does not support accessing the pixel data; use createReader() for that.)

Parameters

  num | the index of the segment to return (numbered starting with 1)

Returns
  the segment object

const char* LizardTech::NITFReaderManager::getImageSegmentIID1 | ( | lt_uint32 | num) |  | const

const Nitf::LabelSegment* LizardTech::NITFReaderManager::getLabelSegment | ( | lt_uint32 | num) |  | const

This function returns an object representing a label segment.

Parameters

  num | the index of the segment to return (numbered starting with 1)

Returns
  the segment object

lt_uint32 LizardTech::NITFReaderManager::getNumDataSegments | ( | ) |  | const

lt_uint32 LizardTech::NITFReaderManager::getNumGraphicSegments | ( | ) |  | const

lt_uint32 LizardTech::NITFReaderManager::getNumImageSegments | ( | ) |  | const

lt_uint32 LizardTech::NITFReaderManager::getNumLabelSegments | ( | ) |  | const

lt_uint32 LizardTech::NITFReaderManager::getNumResSegments | ( | ) |  | const

lt_uint32 LizardTech::NITFReaderManager::getNumTextSegments | ( | ) |  | const

const Nitf::ReservedSegment* LizardTech::NITFReaderManager::getResSegment | ( | lt_uint32 | num) |  | const

This function returns an object representing a RES segment.

Parameters

  num | the index of the segment to return (numbered starting with 1)

Returns
  the segment object

const Nitf::SecurityMetadata* LizardTech::NITFReaderManager::getSecurityMetadata | ( | ) |  | const

const Nitf::TextSegment* LizardTech::NITFReaderManager::getTextSegment | ( | lt_uint32 | num) |  | const

This function returns an object representing a text segment.

Parameters

  num | the index of the segment to return (numbered starting with 1)

Returns
  the segment object

const char* LizardTech::NITFReaderManager::getVersionString | ( | ) |  | const

LT_STATUS LizardTech::NITFReaderManager::initialize | ( | const LTFileSpec & | fileSpec,
|  | bool | useWorldFile = `true`
| ) |  |

Parameters

  fileSpec | the NITF file to be opened
  useWorldFile | indicates world file to be used for geo coords (applies to the first image segment only)

Returns
  success or failure

LT_STATUS LizardTech::NITFReaderManager::initialize | ( | LTIOStreamInf * | stream) |  |

Parameters

  stream | the NITF stream to be opened

Returns
  success or failure

void LizardTech::NITFReaderManager::setCompat_2500B_N2 | ( | bool | use2500B) |  |

This function is used to control whether or not the COMRAT field is to be read. The 2500C specification requires this field be present; the 2500B Note 2 specification does not. This function is used to indicate which version of the specification this file adheres to.

The default is false, i.e. 2500C formatting.

This function must be called prior to initialize().

Parameters

  use2500B | set to true for 2500B/Note2 formatting

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

- NITFReaderManager.h

LizardTech