OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Types | Public Member Functions | Protected Attributes | List of all members
ossimNitfHistoaTag Class Reference

#include <ossimNitfHistoaTag.h>

Inheritance diagram for ossimNitfHistoaTag:
ossimNitfRegisteredTag ossimObject ossimPropertyInterface ossimReferenced

Public Types

enum  {
  SYSTYPE_SIZE = 20, PC_SIZE = 12, PE_SIZE = 4, REMAP_FLAG_SIZE = 1,
  LUTID_SIZE = 2, NEVENTS_SIZE = 2
}
 

Public Member Functions

 ossimNitfHistoaTag ()
 
virtual void parseStream (std::istream &in)
 This will allow the user defined data to parse the stream. More...
 
virtual void writeStream (std::ostream &out)
 
virtual ossim_uint32 getSizeInBytes () const
 Returns the length in bytes of the tag from the CEL or REL field. More...
 
virtual 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...
 
virtual void clearFields ()
 
- Public Member Functions inherited from ossimNitfRegisteredTag
 ossimNitfRegisteredTag ()
 default constructor More...
 
 ossimNitfRegisteredTag (const std::string &tagName, ossim_uint32 tagLength)
 Constructor that takes name and size. More...
 
virtual ~ossimNitfRegisteredTag ()
 destructor More...
 
virtual std::string getRegisterTagName () const
 This will return the name of the registered tag for this user defined header. More...
 
virtual const std::string & getTagName () const
 This will return the name of the registered tag for this user defined header. More...
 
virtual void setTagName (const std::string &tagName)
 
virtual ossim_uint32 getTagLength () const
 Returns the length in bytes of the tag from the CEL or REL field. More...
 
virtual void setTagLength (ossim_uint32 length)
 Set the tag length. More...
 
virtual void parseStream (ossim::istream &in)=0
 This will allow the user defined data to parse the stream. More...
 
virtual void writeStream (ossim::ostream &out)=0
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual void getMetadata (ossimKeywordlist &kwl, const char *prefix=0) const
 Default interface to populate keyword list with metadata. More...
 
virtual bool saveState (ossimKeywordlist &kwl, const ossimString &prefix) const
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 

Protected Attributes

char m_systype [SYSTYPE_SIZE+1]
 Field: SYSTYPE. More...
 
char m_pc [PC_SIZE+1]
 Field: PC. More...
 
char m_pe [PE_SIZE+1]
 Field: PE. More...
 
char m_remapFlag [REMAP_FLAG_SIZE+1]
 Field: REMAP_FLAG. More...
 
char m_lutid [LUTID_SIZE+1]
 Field: LUTID. More...
 
char m_nEvents [NEVENTS_SIZE+1]
 Field: NEVENTS. More...
 
std::vector< ossimNitfHistoaProcessingEventm_eventList
 
- Protected Attributes inherited from ossimNitfRegisteredTag
std::string m_tagName
 
ossim_uint32 m_tagLength
 

Additional Inherited Members

- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Detailed Description

Definition at line 516 of file ossimNitfHistoaTag.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SYSTYPE_SIZE 
PC_SIZE 
PE_SIZE 
REMAP_FLAG_SIZE 
LUTID_SIZE 
NEVENTS_SIZE 

Definition at line 519 of file ossimNitfHistoaTag.h.

Constructor & Destructor Documentation

◆ ossimNitfHistoaTag()

ossimNitfHistoaTag::ossimNitfHistoaTag ( )

Definition at line 360 of file ossimNitfHistoaTag.cpp.

361  : ossimNitfRegisteredTag( std::string("HISTOA"), 0 )
362 {
363 }
ossimNitfRegisteredTag()
default constructor

Member Function Documentation

◆ clearFields()

void ossimNitfHistoaTag::clearFields ( )
virtual

Definition at line 424 of file ossimNitfHistoaTag.cpp.

References LUTID_SIZE, m_eventList, m_lutid, m_nEvents, m_pc, m_pe, m_remapFlag, m_systype, NEVENTS_SIZE, PC_SIZE, PE_SIZE, REMAP_FLAG_SIZE, ossimNitfRegisteredTag::setTagLength(), and SYSTYPE_SIZE.

Referenced by parseStream().

425 {
426  memset(m_systype, ' ', SYSTYPE_SIZE);
427  memset(m_pc, ' ', PC_SIZE);
428  memset(m_pe, ' ', PE_SIZE);
429  memset(m_remapFlag, ' ', REMAP_FLAG_SIZE);
430  memset(m_lutid, '0', LUTID_SIZE);
431  memset(m_nEvents, '0', NEVENTS_SIZE);
432 
433  m_systype[SYSTYPE_SIZE] = '\0';
434  m_pc[PC_SIZE] = '\0';
435  m_pe[PE_SIZE] = '\0';
437  m_lutid[LUTID_SIZE] = '\0';
438  m_nEvents[NEVENTS_SIZE] = '\0';
439  m_eventList.clear();
440 
441  // Clear the tag length in base.
442  setTagLength(0);
443 }
char m_remapFlag[REMAP_FLAG_SIZE+1]
Field: REMAP_FLAG.
std::vector< ossimNitfHistoaProcessingEvent > m_eventList
char m_pe[PE_SIZE+1]
Field: PE.
char m_nEvents[NEVENTS_SIZE+1]
Field: NEVENTS.
virtual void setTagLength(ossim_uint32 length)
Set the tag length.
char m_pc[PC_SIZE+1]
Field: PC.
char m_lutid[LUTID_SIZE+1]
Field: LUTID.
char m_systype[SYSTYPE_SIZE+1]
Field: SYSTYPE.

◆ getSizeInBytes()

ossim_uint32 ossimNitfHistoaTag::getSizeInBytes ( ) const
virtual

Returns the length in bytes of the tag from the CEL or REL field.

Note
Depricated use: getTagLength()

The entire TRE length is 11 plus this(the size of the CEL or REL field).

Returns
Length of REDATA or CEDATA.

Reimplemented from ossimNitfRegisteredTag.

Definition at line 410 of file ossimNitfHistoaTag.cpp.

References LUTID_SIZE, m_eventList, NEVENTS_SIZE, PC_SIZE, PE_SIZE, REMAP_FLAG_SIZE, and SYSTYPE_SIZE.

Referenced by parseStream(), and print().

411 {
412  // Make this dynamic for constructed HISTOA tags instead of using theTagLength.
413  ossim_uint32 sizeInBytes = (SYSTYPE_SIZE + PC_SIZE + PE_SIZE +
415 
416  for ( ossim_uint32 idx = 0; idx < m_eventList.size(); ++idx)
417  {
418  sizeInBytes += m_eventList[idx].getSizeInBytes();
419  }
420 
421  return sizeInBytes;
422 }
std::vector< ossimNitfHistoaProcessingEvent > m_eventList
unsigned int ossim_uint32

◆ parseStream()

void ossimNitfHistoaTag::parseStream ( std::istream &  in)
virtual

This will allow the user defined data to parse the stream.

Definition at line 365 of file ossimNitfHistoaTag.cpp.

References clearFields(), getSizeInBytes(), LUTID_SIZE, m_eventList, m_lutid, m_nEvents, m_pc, m_pe, m_remapFlag, m_systype, NEVENTS_SIZE, ossimNitfHistoaProcessingEvent::parseStream(), PC_SIZE, PE_SIZE, REMAP_FLAG_SIZE, ossimNitfRegisteredTag::setTagLength(), SYSTYPE_SIZE, and ossimString::toUInt32().

366 {
367  clearFields();
368 
369  in.read(m_systype, SYSTYPE_SIZE);
370  in.read(m_pc, PC_SIZE);
371  in.read(m_pe, PE_SIZE);
372  in.read(m_remapFlag, REMAP_FLAG_SIZE);
373  in.read(m_lutid, LUTID_SIZE);
374  in.read(m_nEvents, NEVENTS_SIZE);
375 
377  if(nEvents < 100)
378  {
379  for(ossim_uint32 idx = 0; idx < nEvents; ++idx)
380  {
382  evt.parseStream(in);
383  m_eventList.push_back(evt);
384  }
385  }
386 
387  // Set the tag length in base for the getTagLenth method.
389 }
char m_remapFlag[REMAP_FLAG_SIZE+1]
Field: REMAP_FLAG.
void parseStream(std::istream &in)
std::vector< ossimNitfHistoaProcessingEvent > m_eventList
char m_pe[PE_SIZE+1]
Field: PE.
char m_nEvents[NEVENTS_SIZE+1]
Field: NEVENTS.
ossim_uint32 toUInt32() const
virtual void setTagLength(ossim_uint32 length)
Set the tag length.
virtual ossim_uint32 getSizeInBytes() const
Returns the length in bytes of the tag from the CEL or REL field.
virtual void clearFields()
unsigned int ossim_uint32
All comments in this document were taken from the online resource found at:
char m_pc[PC_SIZE+1]
Field: PC.
char m_lutid[LUTID_SIZE+1]
Field: LUTID.
char m_systype[SYSTYPE_SIZE+1]
Field: SYSTYPE.

◆ print()

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

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

Parameters
outStream to output to.
prefixPrefix added to key like "image0.";

Reimplemented from ossimNitfRegisteredTag.

Definition at line 445 of file ossimNitfHistoaTag.cpp.

References getSizeInBytes(), ossimNitfRegisteredTag::getTagName(), m_eventList, m_lutid, m_nEvents, m_pc, m_pe, m_remapFlag, m_systype, and ossimString::toString().

447 {
448  std::string pfx = prefix;
449  pfx += getTagName();
450  pfx += ".";
451 
452  out << setiosflags(std::ios::left)
453  << pfx << std::setw(24) << "CETAG:"
454  << getTagName() << "\n"
455  << pfx << std::setw(24) << "CEL:"
456  << getSizeInBytes() << "\n"
457  << pfx << std::setw(24) << "SYSTYPE:" << m_systype << "\n"
458  << pfx << std::setw(24) << "PC:" << m_pc << "\n"
459  << pfx << std::setw(24) << "PE:" << m_pe << "\n"
460  << pfx << std::setw(24) << "REMAP_FLAG:" << m_remapFlag << "\n"
461  << pfx << std::setw(24) << "LUTID:" << m_lutid << "\n"
462  << pfx << std::setw(24) << "NEVENTS:" << m_nEvents << "\n";
463  for ( ossim_uint32 idx = 0; idx < m_eventList.size(); ++idx )
464  {
465  m_eventList[idx].print(out, pfx+"EVENT"+ossimString::toString(idx));
466  }
467 
468  return out;
469 }
char m_remapFlag[REMAP_FLAG_SIZE+1]
Field: REMAP_FLAG.
virtual const std::string & getTagName() const
This will return the name of the registered tag for this user defined header.
std::vector< ossimNitfHistoaProcessingEvent > m_eventList
static ossimString toString(bool aValue)
Numeric to string methods.
char m_pe[PE_SIZE+1]
Field: PE.
char m_nEvents[NEVENTS_SIZE+1]
Field: NEVENTS.
virtual ossim_uint32 getSizeInBytes() const
Returns the length in bytes of the tag from the CEL or REL field.
unsigned int ossim_uint32
char m_pc[PC_SIZE+1]
Field: PC.
char m_lutid[LUTID_SIZE+1]
Field: LUTID.
char m_systype[SYSTYPE_SIZE+1]
Field: SYSTYPE.

◆ writeStream()

void ossimNitfHistoaTag::writeStream ( std::ostream &  out)
virtual

Definition at line 391 of file ossimNitfHistoaTag.cpp.

References LUTID_SIZE, m_eventList, m_lutid, m_nEvents, m_pc, m_pe, m_remapFlag, m_systype, NEVENTS_SIZE, PC_SIZE, PE_SIZE, REMAP_FLAG_SIZE, SYSTYPE_SIZE, and ossimString::toUInt32().

392 {
393  out.write(m_systype, SYSTYPE_SIZE);
394  out.write(m_pc, PC_SIZE);
395  out.write(m_pe, PE_SIZE);
396  out.write(m_remapFlag, REMAP_FLAG_SIZE);
397  out.write(m_lutid, LUTID_SIZE);
398  out.write(m_nEvents, NEVENTS_SIZE);
399  ossim_uint32 idx = 0;
401  if(nEvents < 100)
402  {
403  for(;idx < nEvents; ++idx)
404  {
405  m_eventList[idx].writeStream(out);
406  }
407  }
408 }
char m_remapFlag[REMAP_FLAG_SIZE+1]
Field: REMAP_FLAG.
std::vector< ossimNitfHistoaProcessingEvent > m_eventList
char m_pe[PE_SIZE+1]
Field: PE.
char m_nEvents[NEVENTS_SIZE+1]
Field: NEVENTS.
ossim_uint32 toUInt32() const
unsigned int ossim_uint32
char m_pc[PC_SIZE+1]
Field: PC.
char m_lutid[LUTID_SIZE+1]
Field: LUTID.
char m_systype[SYSTYPE_SIZE+1]
Field: SYSTYPE.

Member Data Documentation

◆ m_eventList

std::vector<ossimNitfHistoaProcessingEvent> ossimNitfHistoaTag::m_eventList
protected

Definition at line 709 of file ossimNitfHistoaTag.h.

Referenced by clearFields(), getSizeInBytes(), parseStream(), print(), and writeStream().

◆ m_lutid

char ossimNitfHistoaTag::m_lutid[LUTID_SIZE+1]
protected

Field: LUTID.

This field shall contain the DMID (Data Mapping ID) for Systems B and D imagery. The DMID is contained in IMDAT records 97 and 98 in the ESD (Exploitation Support Data). This information is also referenced in IF200EAA. The valid field codes are 07, 08, and 12 – 64. A value of 07 and 08 indicates that the image is PEDF (Piecewise Extended Density Format). A value between 12 and 64 indicates that the image is a Linlog formatted image. Numbers between 01 and 06, 09, 10, and 11 are reserved and should not be used at this time. There are no valid DMID values greater than 64. NSIF users to help determine what type of processing should be applied to the image can use this field. For all other systems, this field should be filled with 00.

Definition at line 692 of file ossimNitfHistoaTag.h.

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

◆ m_nEvents

char ossimNitfHistoaTag::m_nEvents[NEVENTS_SIZE+1]
protected

Field: NEVENTS.

This field shall contain the number of processing events associated with the image. The tag is designed to record up to 99 separate processing events. The valid field codes are 01 to 99. The processing events are listed in chronological order, starting with the first event and ending with the most recent processing event. At a minimum, the first processing event shall be the processing immediately following the generation of the NSIF formatted image; however, if practical, the originator of the NSIF image can create the HISTOA TRE earlier - with the creation of the NSIF formatted image. In that instance, the first processing event would be the creation of the NSIF formatted image. Each successive processing event is to record what transformations have been applied to the image, once the image has been processed and saved.

Definition at line 707 of file ossimNitfHistoaTag.h.

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

◆ m_pc

char ossimNitfHistoaTag::m_pc[PC_SIZE+1]
protected

Field: PC.

This field shall contain an alphanumeric string that indicates if bandwidth compression/expansion was applied to the image prior to NITF image creation. This field should be used in conjunction with the PE field to determine the state of the image prior to NITF formation. The valid field codes for the PC field is 4 byte character strings. The first two characters indicate the type of compression such as DCT or DPCM. The next two characters indicate either the bit rate or the quality level. The types of compression are indicated by the following codes: Value Definition DP43 DPCM (Differential Pulse Coded Modulation) – 4.3 bpp DC13 DCT (Discrete Cosine Transform –1.3 bpp DC23 DCT (Discrete Cosine Transform) – 2.3 bpp NJNL NSIF JPEG – Lossless NJQ0 NSIF JPEG – Quality Level 0 NJQ1 NSIF JPEG – Quality Level 1 NJQ2 NSIF JPEG – Quality Level 2 C11D NSIF Bi-level – 1D C12S NSIF Bi-level – 2DS C12H NSIF Bi-level – 2DH M11D NSIF Bi-level – 1D M12S NSIF Bi-level with masked blocks – 2DS M12H NSIF Bi-level with masked blocks – 2DH C207 NITF ARIDPCM – 0.75 bpp C214 NITF ARIDPCM – 1.40 bpp C223 NITF ARIDPCM – 2.30 bpp C245 NITF ARIDPCM – 4.50 bpp C3Q0 NSIF Lossy JPEG – Q0 Custom Tables C3Q1 NSIF Lossy JPEG – Q1 Default Tables C3Q2 NSIF Lossy JPEG – Q2 Default Tables C3Q3 NSIF Lossy JPEG – Q2 Default Tables C3Q4 NSIF Lossy JPEG – Q4 Default Tables C3Q5 NSIF Lossy JPEG – Q5 Default Tables M3Q0 NSIF Lossy JPEG with masked blocks – Q0 Custom M3Q1 NSIF Lossy JPEG with masked blocks – Q1 Default M3Q2 NSIF Lossy JPEG with masked blocks – Q2 Default M3Q3 NSIF Lossy JPEG with masked blocks – Q3 Default M3Q4 NSIF Lossy JPEG with masked blocks – Q4 Default M3Q5 NSIF Lossy JPEG with masked blocks – Q5 Default C4LO NSIF Vector Quantization – Lossy M4LO NSIF Vector Quantization with masked blocks C5NL NSIF Lossless JPEG M5NL NSIF Lossless JPEG with masked blocks NC00 NSIF uncompressed NM00 NSIF with masked blocks uncompressed I1Q1 NSIF Downsample JPEG – Q1 I1Q2 NSIF Downsample JPEG – Q2 I1Q3 NSIF Downsample JPEG – Q3 I1Q4 NSIF Downsample JPEG – Q4 I1Q5 NSIF Downsample JPEG – Q5 WVLO Wavelet Lossy WVNL Wavelet Lossless JP20 JPEG 2000 NONE No Compression UNKC Unknown Compression The entire PC field is 12 bytes long to allow for the concatenation of up to 3 compression algorithms. Consecutive 4 byte character strings shall indicate the application of two or three compression algorithms in succession. If only one compression algorithm is applied then the last eight characters are zero. If the NSIF creator does not know where the image came from or what processing has been applied to it, then the code for unknown compression (UNKC) shall be used. Examples of valid codes for the PC field are shown below. The DP43DC130000 code indicates that a concatenation of the 4.3 DPCM and the 1.3 DCT compression and expansion was applied to the image prior to its NSIF formation. The NONE00000000 code indicates that no compression was applied to the image prior to its NSIF formation.

Definition at line 644 of file ossimNitfHistoaTag.h.

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

◆ m_pe

char ossimNitfHistoaTag::m_pe[PE_SIZE+1]
protected

Field: PE.

This field shall contain an alphanumeric string that indicates if any enhancements were applied to the image prior to NSIF image creation. This field should be used in conjunction with the PC field to determine the state of the image prior to NSIF formation. The valid field codes for the PC field are given below EH08 Enhanced 8 bpp from IDEX EH11 Enhanced 11 bpp from IDEX UE08 8 bpp data with DRA but no enhancements from IDEX EU11 Unenhanced 22 bpp from IDEX DGHC Digitized Hardcopy UNKP Unknown Processing NONE No prior processing The first four codes explicitly define the types of ODS (Output Data Server) products that are available for NSIF formation. Additional codes may be added for airborne systems. If the NSIF creator does not know where the image came from or what processing has been applied to it, then the code for unknown processing (UNKP) shall be used.

Definition at line 665 of file ossimNitfHistoaTag.h.

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

◆ m_remapFlag

char ossimNitfHistoaTag::m_remapFlag[REMAP_FLAG_SIZE+1]
protected

Field: REMAP_FLAG.

This field shall indicate whether or not a system specific remap has been applied to the image. The valid field codes are 0 – 9, and a blank (BCS 0x20), but 2 – 9 are reserved for future use. A value of 0 means that no systems specific remap has been applied. A value of 1 means that the System C specific 16 – 12 bit remap has been applied to the System C image. If the image is not a System C image, this field does not apply at this time and should be filled with a blank. Values from 2 – 9 are reserved for future use and shall not be used at this time.

Definition at line 677 of file ossimNitfHistoaTag.h.

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

◆ m_systype

char ossimNitfHistoaTag::m_systype[SYSTYPE_SIZE+1]
protected

Field: SYSTYPE.

This field shall contain the name of the sensor from which the original image was collected. For national imagery, the valid field codes are SystemA, SystemB, SystemC, and SystemD. These codes shall not be used to indicate any other airborne or commercial systems and are reserved solely for the National systems. The codes in the SYSTYPE field shall be left justified and the remainder of the field filled with blanks to 20 characters. The NTB has requested that this tag be able to handle other types of airborne and commercial imagery currently supported by NITF. Additional valid field codes are listed below: ASARS-2 ASARS System GHR Global Hawk Radar SYERS-EO SYERS Electro-Optical System SYERS-MSI SYERS Multispectral System SYERS-IR SYERS Infrared System DSR Dark Star Radar TSAR TESAR TBD Other

Definition at line 574 of file ossimNitfHistoaTag.h.

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


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