OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimJ2kTlmRecord.h>
Public Member Functions | |
ossimJ2kTlmRecord () | |
default constructor More... | |
~ossimJ2kTlmRecord () | |
destructor More... | |
void | parseStream (ossim::istream &in) |
Parse method. More... | |
void | writeStream (std::ostream &out) |
Write method. More... | |
ossim_uint8 | getZtlm () const |
ossim_uint8 | getSt () const |
Get the ST portion of STLM field( bits 5 and 6). More... | |
bool | setSt (ossim_uint8 bits) |
Set the ST bits of STLM field. More... | |
ossim_uint8 | getSp () const |
bool | setSp (ossim_uint8 bit) |
Set the SP bit of Stlm field. More... | |
ossim_uint16 | getTileCount () const |
bool | getTileLength (ossim_int32 index, ossim_uint32 &length) const |
Get the tile length for tile at index from ptlm array. More... | |
bool | setTileLength (ossim_int32 index, ossim_uint32 length) |
Sets the tile length for tile at x,y in ptlm array. More... | |
bool | accumulate (ossim_int32 first, ossim_int32 last, std::streampos &init) const |
Adds Ptlm array from first to last. More... | |
bool | initPtlmArray (ossim_uint8 spBit, ossim_uint16 count) |
Sets SP bit, initializes ptlm array, and ltlm(size). 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... | |
Private Member Functions | |
void | clear () |
Deletes m_Ttlm and m_Ptlm arrays. More... | |
void | clearTtlm () |
Deletes m_Ttlm array. More... | |
void | clearPtlm () |
Deletes m_Ptlm array. More... | |
ossim_uint16 | computeLength (ossim_uint16 tileCount) const |
Computes length of this segment minus marker itself. More... | |
Private Attributes | |
ossim_uint16 | m_Ltlm |
NOTE: tml segmet marker 0xff55 not stored. More... | |
ossim_uint8 | m_Ztlm |
Index of marker segment relative to all other TLM marker segments present in the current header. More... | |
ossim_uint8 | m_Stlm |
Indicator for Ttlm and Ptlm field sizes. More... | |
void * | m_Ttlm |
Tile index for tile-parts. More... | |
void * | m_Ptlm |
The length, in bytes, from the beginning of the SOT marker of the tile-part to the end of the codestream data for that tile-part. More... | |
Friends | |
OSSIM_DLL std::ostream & | operator<< (std::ostream &out, const ossimJ2kTlmRecord &obj) |
operator<< More... | |
Definition at line 20 of file ossimJ2kTlmRecord.h.
ossimJ2kTlmRecord::ossimJ2kTlmRecord | ( | ) |
default constructor
Definition at line 24 of file ossimJ2kTlmRecord.cpp.
ossimJ2kTlmRecord::~ossimJ2kTlmRecord | ( | ) |
destructor
Definition at line 34 of file ossimJ2kTlmRecord.cpp.
References clear().
bool ossimJ2kTlmRecord::accumulate | ( | ossim_int32 | first, |
ossim_int32 | last, | ||
std::streampos & | init | ||
) | const |
Adds Ptlm array from first to last.
The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last.
first | array index |
last | array index |
init | Initialized by this. This is added to so whatever it starts with you get that plus the accumlated indexes. |
Definition at line 426 of file ossimJ2kTlmRecord.cpp.
References getSp(), getTileCount(), m_Ptlm, and status.
|
private |
Deletes m_Ttlm and m_Ptlm arrays.
Definition at line 39 of file ossimJ2kTlmRecord.cpp.
References clearPtlm(), and clearTtlm().
Referenced by parseStream(), and ~ossimJ2kTlmRecord().
|
private |
Deletes m_Ptlm array.
Definition at line 64 of file ossimJ2kTlmRecord.cpp.
References getSp(), and m_Ptlm.
Referenced by clear(), and initPtlmArray().
|
private |
Deletes m_Ttlm array.
Definition at line 45 of file ossimJ2kTlmRecord.cpp.
References getSt(), and m_Ttlm.
Referenced by clear().
|
private |
Computes length of this segment minus marker itself.
Definition at line 455 of file ossimJ2kTlmRecord.cpp.
References getSp(), and getSt().
Referenced by initPtlmArray().
ossim_uint8 ossimJ2kTlmRecord::getSp | ( | ) | const |
Definition at line 312 of file ossimJ2kTlmRecord.cpp.
References m_Stlm.
Referenced by accumulate(), clearPtlm(), computeLength(), getTileCount(), getTileLength(), parseStream(), print(), setTileLength(), and writeStream().
ossim_uint8 ossimJ2kTlmRecord::getSt | ( | ) | const |
Get the ST portion of STLM field( bits 5 and 6).
Definition at line 273 of file ossimJ2kTlmRecord.cpp.
References m_Stlm.
Referenced by clearTtlm(), computeLength(), getTileCount(), parseStream(), print(), and writeStream().
ossim_uint16 ossimJ2kTlmRecord::getTileCount | ( | ) | const |
Definition at line 362 of file ossimJ2kTlmRecord.cpp.
References getSp(), getSt(), m_Ltlm, and x.
Referenced by accumulate(), getTileLength(), parseStream(), print(), setTileLength(), and writeStream().
bool ossimJ2kTlmRecord::getTileLength | ( | ossim_int32 | index, |
ossim_uint32 & | length | ||
) | const |
Get the tile length for tile at index from ptlm array.
index | |
length | Initialized by this to of tile legnth or 0 out of array bounds. |
Definition at line 379 of file ossimJ2kTlmRecord.cpp.
References getSp(), getTileCount(), m_Ptlm, and status.
ossim_uint8 ossimJ2kTlmRecord::getZtlm | ( | ) | const |
Definition at line 307 of file ossimJ2kTlmRecord.cpp.
References m_Ztlm.
bool ossimJ2kTlmRecord::initPtlmArray | ( | ossim_uint8 | spBit, |
ossim_uint16 | count | ||
) |
Sets SP bit, initializes ptlm array, and ltlm(size).
Note: Ptlm array is cleared on this call.
spBit | 0 = 16 bit Ptlm parameter, 1 = 32 bit Ptlm parameter. |
count | of ptlm array or tiles. |
Definition at line 340 of file ossimJ2kTlmRecord.cpp.
References clearPtlm(), computeLength(), m_Ltlm, m_Ptlm, and setSp().
void ossimJ2kTlmRecord::parseStream | ( | ossim::istream & | in | ) |
Parse method.
Performs byte swapping as needed.
in | Stream to parse. |
Definition at line 83 of file ossimJ2kTlmRecord.cpp.
References ossim::byteOrder(), clear(), getSp(), getSt(), getTileCount(), m_Ltlm, m_Ptlm, m_Stlm, m_Ttlm, m_Ztlm, OSSIM_LITTLE_ENDIAN, ossimNotify(), ossimNotifyLevel_WARN, and ossimEndian::swap().
Referenced by ossimKakaduNitfReader::dumpTiles().
std::ostream & ossimJ2kTlmRecord::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 460 of file ossimJ2kTlmRecord.cpp.
References getSp(), getSt(), getTileCount(), m_Ltlm, m_Ptlm, m_Stlm, m_Ttlm, and m_Ztlm.
Referenced by ossimKakaduNitfReader::dumpTiles(), and operator<<().
bool ossimJ2kTlmRecord::setSp | ( | ossim_uint8 | bit | ) |
Set the SP bit of Stlm field.
bit | Either 0 or 1. |
0 = Ptlm parameter 16 bits 1 = Ptlm parameter 32 bits
Definition at line 318 of file ossimJ2kTlmRecord.cpp.
References m_Stlm.
Referenced by initPtlmArray().
bool ossimJ2kTlmRecord::setSt | ( | ossim_uint8 | bits | ) |
Set the ST bits of STLM field.
bits | Either 0, 1, or 2. |
0 = Ttlm parameter is not present. Tiles are in order. 1 = Ttlm parameter 8 bits. 2 = Ttlm parameter 16 bits.
Definition at line 279 of file ossimJ2kTlmRecord.cpp.
References m_Stlm.
bool ossimJ2kTlmRecord::setTileLength | ( | ossim_int32 | index, |
ossim_uint32 | length | ||
) |
Sets the tile length for tile at x,y in ptlm array.
index | |
length | of tile |
Definition at line 402 of file ossimJ2kTlmRecord.cpp.
References getSp(), getTileCount(), m_Ptlm, and status.
void ossimJ2kTlmRecord::writeStream | ( | std::ostream & | out | ) |
Write method.
Note: Write include two marker bytes.
out | Stream to write to. |
Definition at line 188 of file ossimJ2kTlmRecord.cpp.
References ossim::byteOrder(), getSp(), getSt(), getTileCount(), m_Ltlm, m_Ptlm, m_Stlm, m_Ttlm, m_Ztlm, OSSIM_LITTLE_ENDIAN, and ossimEndian::swap().
|
friend |
operator<<
Definition at line 531 of file ossimJ2kTlmRecord.cpp.
|
private |
NOTE: tml segmet marker 0xff55 not stored.
Length of segment minus marker.
Definition at line 172 of file ossimJ2kTlmRecord.h.
Referenced by getTileCount(), initPtlmArray(), parseStream(), print(), and writeStream().
|
private |
The length, in bytes, from the beginning of the SOT marker of the tile-part to the end of the codestream data for that tile-part.
There should be one Ptlm for every tile-part.
16 bits if SP = 0, range 14 - 65535 32 bits if SP = 1, range 14 - (2^32-1)
Definition at line 213 of file ossimJ2kTlmRecord.h.
Referenced by accumulate(), clearPtlm(), getTileLength(), initPtlmArray(), parseStream(), print(), setTileLength(), and writeStream().
|
private |
Indicator for Ttlm and Ptlm field sizes.
Two variable in one byte.
ST Ttlm is lower order bytes.
0 = Ttlm size = 0 bits, tiles in order. Ttlm size = 0 bits 1 = Ttlm size = 8 bits, range 0 - 254 2 = Ttlm size = 16 bits, range 0 - 65535
SP Ptlm is upper order bytes.
16 bits if SP = 0, range 14 - 65535 32 bits if SP = 1, range 14 - (2^31-1)
Definition at line 194 of file ossimJ2kTlmRecord.h.
Referenced by getSp(), getSt(), parseStream(), print(), setSp(), setSt(), and writeStream().
|
private |
Tile index for tile-parts.
Either none or one value for every tile-part. 0 bits if ST = 0 8 bits if ST = 1, range 0 - 254 16 bits if ST = 2, range 0 - 65534
Definition at line 202 of file ossimJ2kTlmRecord.h.
Referenced by clearTtlm(), parseStream(), print(), and writeStream().
|
private |
Index of marker segment relative to all other TLM marker segments present in the current header.
0 - 255
Definition at line 178 of file ossimJ2kTlmRecord.h.
Referenced by getZtlm(), parseStream(), print(), and writeStream().