OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimRpfLocationSection.h>
Public Member Functions | |
ossimRpfLocationSection () | |
virtual | ~ossimRpfLocationSection () |
virtual ossimErrorCode | parseStream (std::istream &in, ossimByteOrder endianOrder) |
void | writeStream (std::ostream &out) |
Write method. More... | |
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... | |
bool | hasComponent (ossimRpfComponentId componentId) const |
bool | getComponent (ossimRpfComponentId componentId, ossimRpfComponentLocationRecord &result) const |
void | addComponentRecord (const ossimRpfComponentLocationRecord &record) |
Method to add a component location record. More... | |
void | setLocationSectionLength (ossim_uint16 length) |
void | setLocationTableOffset (ossim_uint32 offset) |
void | setNumberOfComponentLocationRecords (ossim_uint16 count) |
void | setLocationRecordLength (ossim_uint16 length) |
void | setComponentAggregateLength (ossim_uint32 length) |
void | clearFields () |
Clears records and fields. More... | |
std::vector< ossimRpfComponentLocationRecord > & | getLocationRecordList () |
Brief Direct access to the list of records. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const ossimRpfLocationSection &data) |
Definition at line 81 of file ossimRpfLocationSection.h.
ossimRpfLocationSection::ossimRpfLocationSection | ( | ) |
Definition at line 127 of file ossimRpfLocationSection.cpp.
References clearFields().
|
inlinevirtual |
Definition at line 87 of file ossimRpfLocationSection.h.
void ossimRpfLocationSection::addComponentRecord | ( | const ossimRpfComponentLocationRecord & | record | ) |
Method to add a component location record.
This will push the record onto the back of theComponentLocationList array.
record | Record to add to array. |
Definition at line 271 of file ossimRpfLocationSection.cpp.
References m_componentLocationList.
void ossimRpfLocationSection::clearFields | ( | ) |
Clears records and fields.
Public interface to clearFields.
Definition at line 301 of file ossimRpfLocationSection.cpp.
References m_componentAggregateLength, m_componentLocationList, m_locationRecordLength, m_locationSectionLength, m_locationTableOffset, and m_numberOfComponentLocationRecords.
Referenced by ossimRpfLocationSection(), and parseStream().
bool ossimRpfLocationSection::getComponent | ( | ossimRpfComponentId | componentId, |
ossimRpfComponentLocationRecord & | result | ||
) | const |
Definition at line 251 of file ossimRpfLocationSection.cpp.
References m_componentLocationList.
Referenced by ossimRpfFrame::fillSubFrameBuffer(), ossimRpfHeader::getNewAttributeSectionSubheader(), ossimRpfHeader::getNewBoundaryRectSectSubheader(), ossimRpfHeader::getNewBoundaryRectTable(), ossimRpfHeader::getNewColorGrayscaleSubheader(), ossimRpfHeader::getNewCompressionSection(), ossimRpfHeader::getNewCompressionSectionSubheader(), ossimRpfHeader::getNewCoverageSection(), ossimRpfHeader::getNewFileIndexSubsection(), ossimRpfHeader::getNewFrameFileIndexSectionSubheader(), ossimRpfHeader::getNewImageDescriptionSubheader(), ossimRpfHeader::getNewImageDisplayParameterSubheader(), ossimRpfHeader::getNewMaskSubsection(), hasComponent(), ossimRpfFrame::populateColorGrayscaleSection(), ossimRpfFrame::populateMasks(), and ossimRpfFrame::populateReplaceUpdateTable().
std::vector< ossimRpfComponentLocationRecord > & ossimRpfLocationSection::getLocationRecordList | ( | ) |
Brief Direct access to the list of records.
Definition at line 312 of file ossimRpfLocationSection.cpp.
References m_componentLocationList.
bool ossimRpfLocationSection::hasComponent | ( | ossimRpfComponentId | componentId | ) | const |
Will let you know if a component exists within the location section. these component Ids' are defined in the MIL-STD-2411-1 standards doc. the ossimRpfComponentId is in ossimRpfConstants.h
Definition at line 244 of file ossimRpfLocationSection.cpp.
References getComponent().
Referenced by ossimRpfHeader::hasComponent(), and ossimRpfFrame::populateReplaceUpdateTable().
|
virtual |
Definition at line 132 of file ossimRpfLocationSection.cpp.
References ossim::byteOrder(), clearFields(), m_componentAggregateLength, m_locationRecordLength, m_locationSectionLength, m_locationTableOffset, m_numberOfComponentLocationRecords, ossimErrorCodes::OSSIM_OK, and ossimEndian::swap().
Referenced by ossimRpfHeader::parseStream().
std::ostream & ossimRpfLocationSection::print | ( | std::ostream & | out, |
const std::string & | prefix = std::string() |
||
) | const |
print method that outputs a key/value type format adding prefix to keys.
out | String to output to. |
prefix | This will be prepended to key. e.g. Where prefix = "nitf." and key is "file_name" key becomes: "nitf.file_name:" |
Definition at line 217 of file ossimRpfLocationSection.cpp.
References m_componentAggregateLength, m_componentLocationList, m_locationRecordLength, m_locationSectionLength, m_locationTableOffset, and m_numberOfComponentLocationRecords.
Referenced by operator<<().
void ossimRpfLocationSection::setComponentAggregateLength | ( | ossim_uint32 | length | ) |
Definition at line 296 of file ossimRpfLocationSection.cpp.
References m_componentAggregateLength.
void ossimRpfLocationSection::setLocationRecordLength | ( | ossim_uint16 | length | ) |
Definition at line 291 of file ossimRpfLocationSection.cpp.
References m_locationRecordLength.
void ossimRpfLocationSection::setLocationSectionLength | ( | ossim_uint16 | length | ) |
Definition at line 276 of file ossimRpfLocationSection.cpp.
References m_locationSectionLength.
void ossimRpfLocationSection::setLocationTableOffset | ( | ossim_uint32 | offset | ) |
Definition at line 281 of file ossimRpfLocationSection.cpp.
References m_locationTableOffset.
void ossimRpfLocationSection::setNumberOfComponentLocationRecords | ( | ossim_uint16 | count | ) |
Definition at line 286 of file ossimRpfLocationSection.cpp.
References m_numberOfComponentLocationRecords.
void ossimRpfLocationSection::writeStream | ( | std::ostream & | out | ) |
Write method.
out | Stream to write to. |
Definition at line 181 of file ossimRpfLocationSection.cpp.
References ossim::byteOrder(), m_componentAggregateLength, m_componentLocationList, m_locationRecordLength, m_locationSectionLength, m_locationTableOffset, m_numberOfComponentLocationRecords, OSSIM_BIG_ENDIAN, and ossimEndian::swap().
Referenced by ossimRpfHeader::writeStream().
|
friend |
Definition at line 72 of file ossimRpfLocationSection.cpp.
|
private |
Definition at line 156 of file ossimRpfLocationSection.h.
Referenced by clearFields(), parseStream(), print(), setComponentAggregateLength(), and writeStream().
|
private |
Since there are not very many components within an Rpf file it would be overkill to sort these components into an stl map. We will just use an array (stl vector) and do linear searches for components when we need to.
Definition at line 164 of file ossimRpfLocationSection.h.
Referenced by addComponentRecord(), clearFields(), getComponent(), getLocationRecordList(), print(), and writeStream().
|
private |
Definition at line 154 of file ossimRpfLocationSection.h.
Referenced by clearFields(), parseStream(), print(), setLocationRecordLength(), and writeStream().
|
private |
This is a 2 byte unsigned short >= 34 indicatin the length in bytes of the entire location section
Definition at line 148 of file ossimRpfLocationSection.h.
Referenced by clearFields(), parseStream(), print(), setLocationSectionLength(), and writeStream().
|
private |
Definition at line 150 of file ossimRpfLocationSection.h.
Referenced by clearFields(), parseStream(), print(), setLocationTableOffset(), and writeStream().
|
private |
Definition at line 152 of file ossimRpfLocationSection.h.
Referenced by clearFields(), parseStream(), print(), setNumberOfComponentLocationRecords(), and writeStream().