OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ossimRpfImageDescriptionSubheader Class Reference

#include <ossimRpfImageDescriptionSubheader.h>

Public Member Functions

 ossimRpfImageDescriptionSubheader ()
 
 ~ossimRpfImageDescriptionSubheader ()
 
ossimErrorCode parseStream (std::istream &in, ossimByteOrder byteOrder)
 
ossim_uint32 getStartOffset () const
 
ossim_uint32 getEndOffset () const
 
bool isSubframeMaskTableOffsetNull () const
 
bool isTransparencyMaskTableOffsetNull () const
 
ossim_uint16 getNumberOfSpectralGroups () const
 
ossim_uint16 getNumberOfSubframeTables () const
 
ossim_uint16 getNumberOfSpectralBandTables () const
 
ossim_uint16 getNumberOfSpectralBandLinesPerImageRow () const
 
ossim_uint16 getNumberOfSubframesHorizontal () const
 
ossim_uint16 getNumberOfSubframesVertical () const
 
ossim_uint32 getNumberOfOutputColumnsPerSubframe () const
 
ossim_uint32 getNumberOfOutputRowsPerSubframe () const
 
ossim_uint32 getSubframeMaskTableOffset () const
 
ossim_uint32 getTransparencyMaskTableOffset () const
 
std::ostream & print (std::ostream &out, const std::string &prefix=std::string()) const
 print method that outputs a key/value type format adding prefix to keys. More...
 

Private Member Functions

void clearFields ()
 

Private Attributes

ossim_uint32 theStartOffset
 
ossim_uint32 theEndOffset
 
ossim_uint16 theNumberOfSpectralGroups
 
ossim_uint16 theNumberOfSubframeTables
 
ossim_uint16 theNumberOfSpectralBandTables
 
ossim_uint16 theNumberOfSpectralBandLinesPerImageRow
 
ossim_uint16 theNumberOfSubframesHorizontal
 
ossim_uint16 theNumberOfSubframesVertical
 
ossim_uint32 theNumberOfOutputColumnsPerSubframe
 
ossim_uint32 theNumberOfOutputRowsPerSubframe
 
ossim_uint32 theSubframeMaskTableOffset
 
ossim_uint32 theTransparencyMaskTableOffset
 

Friends

std::ostream & operator<< (std::ostream &out, const ossimRpfImageDescriptionSubheader &data)
 

Detailed Description

Definition at line 22 of file ossimRpfImageDescriptionSubheader.h.

Constructor & Destructor Documentation

◆ ossimRpfImageDescriptionSubheader()

ossimRpfImageDescriptionSubheader::ossimRpfImageDescriptionSubheader ( )

◆ ~ossimRpfImageDescriptionSubheader()

ossimRpfImageDescriptionSubheader::~ossimRpfImageDescriptionSubheader ( )
inline

Definition at line 29 of file ossimRpfImageDescriptionSubheader.h.

29 {}

Member Function Documentation

◆ clearFields()

void ossimRpfImageDescriptionSubheader::clearFields ( )
private

Definition at line 99 of file ossimRpfImageDescriptionSubheader.cpp.

References theEndOffset, theNumberOfOutputColumnsPerSubframe, theNumberOfOutputRowsPerSubframe, theNumberOfSpectralBandLinesPerImageRow, theNumberOfSpectralBandTables, theNumberOfSpectralGroups, theNumberOfSubframesHorizontal, theNumberOfSubframesVertical, theNumberOfSubframeTables, theStartOffset, theSubframeMaskTableOffset, and theTransparencyMaskTableOffset.

Referenced by ossimRpfImageDescriptionSubheader().

100 {
101  theStartOffset = 0;
102  theEndOffset = 0;
103 
114 }

◆ getEndOffset()

ossim_uint32 ossimRpfImageDescriptionSubheader::getEndOffset ( ) const
inline

◆ getNumberOfOutputColumnsPerSubframe()

ossim_uint32 ossimRpfImageDescriptionSubheader::getNumberOfOutputColumnsPerSubframe ( ) const
inline

◆ getNumberOfOutputRowsPerSubframe()

ossim_uint32 ossimRpfImageDescriptionSubheader::getNumberOfOutputRowsPerSubframe ( ) const
inline

◆ getNumberOfSpectralBandLinesPerImageRow()

ossim_uint16 ossimRpfImageDescriptionSubheader::getNumberOfSpectralBandLinesPerImageRow ( ) const
inline

◆ getNumberOfSpectralBandTables()

ossim_uint16 ossimRpfImageDescriptionSubheader::getNumberOfSpectralBandTables ( ) const
inline

◆ getNumberOfSpectralGroups()

ossim_uint16 ossimRpfImageDescriptionSubheader::getNumberOfSpectralGroups ( ) const
inline

◆ getNumberOfSubframesHorizontal()

ossim_uint16 ossimRpfImageDescriptionSubheader::getNumberOfSubframesHorizontal ( ) const
inline

◆ getNumberOfSubframesVertical()

ossim_uint16 ossimRpfImageDescriptionSubheader::getNumberOfSubframesVertical ( ) const
inline

◆ getNumberOfSubframeTables()

ossim_uint16 ossimRpfImageDescriptionSubheader::getNumberOfSubframeTables ( ) const
inline

◆ getStartOffset()

ossim_uint32 ossimRpfImageDescriptionSubheader::getStartOffset ( ) const
inline

◆ getSubframeMaskTableOffset()

ossim_uint32 ossimRpfImageDescriptionSubheader::getSubframeMaskTableOffset ( ) const
inline

◆ getTransparencyMaskTableOffset()

ossim_uint32 ossimRpfImageDescriptionSubheader::getTransparencyMaskTableOffset ( ) const
inline

◆ isSubframeMaskTableOffsetNull()

bool ossimRpfImageDescriptionSubheader::isSubframeMaskTableOffsetNull ( ) const
inline

◆ isTransparencyMaskTableOffsetNull()

bool ossimRpfImageDescriptionSubheader::isTransparencyMaskTableOffsetNull ( ) const
inline

◆ parseStream()

ossimErrorCode ossimRpfImageDescriptionSubheader::parseStream ( std::istream &  in,
ossimByteOrder  byteOrder 
)

Definition at line 31 of file ossimRpfImageDescriptionSubheader.cpp.

References ossim::byteOrder(), ossimEndian::getSystemEndianType(), ossimErrorCodes::OSSIM_ERROR, ossimErrorCodes::OSSIM_OK, ossimEndian::swap(), theEndOffset, theNumberOfOutputColumnsPerSubframe, theNumberOfOutputRowsPerSubframe, theNumberOfSpectralBandLinesPerImageRow, theNumberOfSpectralBandTables, theNumberOfSpectralGroups, theNumberOfSubframesHorizontal, theNumberOfSubframesVertical, theNumberOfSubframeTables, theStartOffset, theSubframeMaskTableOffset, and theTransparencyMaskTableOffset.

Referenced by ossimRpfHeader::getNewImageDescriptionSubheader().

33 {
34  if(in)
35  {
36  theStartOffset = in.tellg();
37  in.read((char*)&theNumberOfSpectralGroups, 2);
38  in.read((char*)&theNumberOfSubframeTables, 2);
39  in.read((char*)&theNumberOfSpectralBandTables, 2);
40  in.read((char*)&theNumberOfSpectralBandLinesPerImageRow, 2);
41  in.read((char*)&theNumberOfSubframesHorizontal, 2);
42  in.read((char*)&theNumberOfSubframesVertical, 2);
43  in.read((char*)&theNumberOfOutputColumnsPerSubframe, 4);
44  in.read((char*)&theNumberOfOutputRowsPerSubframe, 4);
45  in.read((char*)&theSubframeMaskTableOffset, 4);
46  in.read((char*)&theTransparencyMaskTableOffset, 4);
47 
48  theEndOffset = in.tellg();
49  ossimEndian anEndian;
50 
51  if(anEndian.getSystemEndianType() != byteOrder)
52  {
63  }
64  }
65  else
66  {
68  }
69 
71 }
static const ossimErrorCode OSSIM_OK
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
static const ossimErrorCode OSSIM_ERROR
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

◆ print()

std::ostream & ossimRpfImageDescriptionSubheader::print ( std::ostream &  out,
const std::string &  prefix = std::string() 
) const

print method that outputs a key/value type format adding prefix to keys.

Parameters
outString to output to.
prefixThis will be prepended to key. e.g. Where prefix = "nitf." and key is "file_name" key becomes: "nitf.file_name:"
Returns
output stream.

Definition at line 73 of file ossimRpfImageDescriptionSubheader.cpp.

References theNumberOfOutputColumnsPerSubframe, theNumberOfOutputRowsPerSubframe, theNumberOfSpectralBandLinesPerImageRow, theNumberOfSpectralBandTables, theNumberOfSpectralGroups, theNumberOfSubframesHorizontal, theNumberOfSubframesVertical, theNumberOfSubframeTables, theSubframeMaskTableOffset, and theTransparencyMaskTableOffset.

Referenced by operator<<().

75 {
76  out << prefix << "NumberOfSpectralGroups: "
77  << theNumberOfSpectralGroups << "\n"
78  << prefix << "NumberOfSubframeTables: "
79  << theNumberOfSubframeTables << "\n"
80  << prefix << "NumberOfSpectralBandTables: "
82  << prefix << "NumberOfSpectralBandLinesPerImageRow: "
84  << prefix << "NumberOfSubframesHorizontal: "
86  << prefix << "NumberOfSubframesVertical: "
88  << prefix << "NumberOfOutputColumnsPerSubframe: "
90  << prefix << "NumberOfOutputRowsPerSubframe: "
92  << prefix << "SubframeMaskTableOffset: "
94  << prefix << "TransparencyMaskTableOffset: "
95  << theTransparencyMaskTableOffset << std::endl;
96  return out;
97 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const ossimRpfImageDescriptionSubheader data 
)
friend

Definition at line 20 of file ossimRpfImageDescriptionSubheader.cpp.

22 {
23  return data.print(out);
24 }
std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
print method that outputs a key/value type format adding prefix to keys.

Member Data Documentation

◆ theEndOffset

ossim_uint32 ossimRpfImageDescriptionSubheader::theEndOffset
private

Definition at line 101 of file ossimRpfImageDescriptionSubheader.h.

Referenced by clearFields(), getEndOffset(), and parseStream().

◆ theNumberOfOutputColumnsPerSubframe

ossim_uint32 ossimRpfImageDescriptionSubheader::theNumberOfOutputColumnsPerSubframe
private

◆ theNumberOfOutputRowsPerSubframe

ossim_uint32 ossimRpfImageDescriptionSubheader::theNumberOfOutputRowsPerSubframe
private

◆ theNumberOfSpectralBandLinesPerImageRow

ossim_uint16 ossimRpfImageDescriptionSubheader::theNumberOfSpectralBandLinesPerImageRow
private

◆ theNumberOfSpectralBandTables

ossim_uint16 ossimRpfImageDescriptionSubheader::theNumberOfSpectralBandTables
private

◆ theNumberOfSpectralGroups

ossim_uint16 ossimRpfImageDescriptionSubheader::theNumberOfSpectralGroups
private

◆ theNumberOfSubframesHorizontal

ossim_uint16 ossimRpfImageDescriptionSubheader::theNumberOfSubframesHorizontal
private

Each frame file could be divided into sub frames. This identifies the number of subframes in the horizontal direction.

Definition at line 113 of file ossimRpfImageDescriptionSubheader.h.

Referenced by clearFields(), getNumberOfSubframesHorizontal(), parseStream(), and print().

◆ theNumberOfSubframesVertical

ossim_uint16 ossimRpfImageDescriptionSubheader::theNumberOfSubframesVertical
private

Each frame file could be divided into sub frames. This identifies the number of subframes in the vertical direction.

Definition at line 120 of file ossimRpfImageDescriptionSubheader.h.

Referenced by clearFields(), getNumberOfSubframesVertical(), parseStream(), and print().

◆ theNumberOfSubframeTables

ossim_uint16 ossimRpfImageDescriptionSubheader::theNumberOfSubframeTables
private

◆ theStartOffset

ossim_uint32 ossimRpfImageDescriptionSubheader::theStartOffset
private

Definition at line 100 of file ossimRpfImageDescriptionSubheader.h.

Referenced by clearFields(), getStartOffset(), and parseStream().

◆ theSubframeMaskTableOffset

ossim_uint32 ossimRpfImageDescriptionSubheader::theSubframeMaskTableOffset
private

◆ theTransparencyMaskTableOffset

ossim_uint32 ossimRpfImageDescriptionSubheader::theTransparencyMaskTableOffset
private

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