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

#include <ossimNitfFileHeaderV2_1.h>

Inheritance diagram for ossimNitfFileHeaderV2_1:
ossimNitfFileHeaderV2_X ossimNitfFileHeader ossimObject ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimNitfFileHeaderV2_1 ()
 
virtual ~ossimNitfFileHeaderV2_1 ()
 
virtual void parseStream (ossim::istream &in)
 
virtual void writeStream (ossim::ostream &out)
 
virtual bool isEncrypted () const
 
virtual ossim_int32 getNumberOfImages () const
 
virtual ossim_int32 getNumberOfLabels () const
 
virtual ossim_int32 getNumberOfSymbols () const
 
virtual ossim_int32 getNumberOfGraphics () const
 
virtual ossim_int32 getNumberOfTextSegments () const
 
virtual ossim_int32 getNumberOfDataExtSegments () const
 
virtual ossim_int32 getNumberOfReservedExtSegments () const
 
virtual ossim_int32 getHeaderSize () const
 
virtual ossim_int64 getFileSize () const
 
virtual const char * getVersion () const
 
virtual const char * getDateTime () const
 
virtual ossimDrect getImageRect () const
 
virtual void addImageInfoRecord (const ossimNitfImageInfoRecordV2_1 &recordInfo)
 
virtual void deleteLastImageInfoRecord ()
 
virtual void deleteLastDataExtSegInfoRecord ()
 
virtual void addTextInfoRecord (const ossimNitfTextFileInfoRecordV2_1 &recordInfo)
 
virtual void addDataExtSegInfoRecord (const ossimNitfDataExtSegInfoRecordV2_1 &recordInfo)
 
virtual void replaceImageInfoRecord (int i, const ossimNitfImageInfoRecordV2_1 &recordInfo)
 
virtual ossimNitfImageHeadergetNewImageHeader (ossim_uint32 imageNumber, ossim::istream &in) const
 
virtual ossimNitfSymbolHeadergetNewSymbolHeader (ossim_uint32 symbolNumber, ossim::istream &in) const
 
virtual ossimNitfLabelHeadergetNewLabelHeader (ossim_uint32 labelNumber, ossim::istream &in) const
 
virtual ossimNitfTextHeadergetNewTextHeader (ossim_uint32 textNumber, ossim::istream &in) const
 
virtual ossimNitfDataExtensionSegmentgetNewDataExtensionSegment (ossim_int32 dataExtNumber, ossim::istream &in) const
 
virtual ossimNitfImageHeaderallocateImageHeader () const
 
virtual ossimNitfSymbolHeaderallocateSymbolHeader () const
 
virtual ossimNitfLabelHeaderallocateLabelHeader () const
 
virtual ossimNitfTextHeaderallocateTextHeader () const
 
virtual ossimNitfDataExtensionSegmentallocateDataExtSegment () const
 
virtual ossimString getSecurityClassificationSys () const
 
virtual ossimString getCodeWords () const
 
virtual ossimString getControlAndHandling () const
 
virtual ossimString getReleasingInstructions () const
 
virtual ossimString getDeclassificationType () const
 
virtual ossimString getDeclassificationDate () const
 
virtual ossimString getDeclassificationExemption () const
 
virtual ossimString getDowngrade () const
 
virtual ossimString getDowngradingDate () const
 
virtual ossimString getClassificationText () const
 
virtual ossimString getClassificationAuthorityType () const
 
virtual ossimString getClassificationAuthority () const
 
virtual ossimString getClassificationReason () const
 
virtual ossimString getSecuritySourceDate () const
 
virtual ossimString getSecurityControlNumber () const
 
virtual void getBackgroundColor (ossim_uint8 &r, ossim_uint8 &g, ossim_uint8 &b) const
 
virtual ossimString getOriginatorsName () const
 
virtual ossimString getOriginatorsPhone () const
 
virtual void setFileLength (ossim_uint64 fileLength)
 Sets file length (FL) field. More...
 
virtual void setHeaderLength (ossim_uint64 headerLength)
 Sets header length (HL) field. More...
 
virtual void setSecurityClassificationSys (const ossimString &value)
 
virtual void setCodeWords (const ossimString &codeWords)
 
virtual void setControlAndHandling (const ossimString &controlAndHandling)
 
virtual void setReleasingInstructions (const ossimString &releasingInstructions)
 
virtual void setDeclassificationType (const ossimString &declassType)
 
virtual void setDeclassificationDate (const ossimLocalTm &declassDate)
 
virtual void setDeclassificationDate (const ossimString &declassDate)
 
virtual void setDeclassificationExemption (const ossimString &exemption)
 
virtual void setDowngrade (const ossimString &downgrade)
 
virtual void setDowngradingDate (const ossimLocalTm &date)
 
virtual void setDowngradingDate (const ossimString &date)
 
virtual void setClassificationText (const ossimString &classificationText)
 
virtual void setClassificationAuthorityType (const ossimString &authorityType)
 
virtual void setClassificationAuthority (const ossimString &authorityType)
 
virtual void setClassificationReason (const ossimString &reason)
 
virtual void setSecuritySourceDate (const ossimLocalTm &date)
 
virtual void setSecuritySourceDate (const ossimString &date)
 
virtual void setSecurityControlNumber (const ossimString &number)
 
virtual void setFileBackgroundColor (ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
 
virtual void setOriginatorsName (const ossimString &name)
 
virtual void setOriginatorsPhone (const ossimString &phone)
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool isValid () const
 isValid will test if the fields are valid and will return true or false. More...
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to set fields from a keyword list. More...
 
virtual bool saveState (ossimKeywordlist &kwl, const ossimString &prefix="") const
 
void clearFields ()
 
void addTag (ossimNitfTagInformation tag, bool unique=true)
 
void removeTag (const ossimString &tagName)
 
bool takeOverflowTags (std::vector< ossimNitfTagInformation > &overflowTags, ossim_uint32 potentialDesIndex, bool userDefinedTags=false)
 
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...
 
- Public Member Functions inherited from ossimNitfFileHeaderV2_X
 ossimNitfFileHeaderV2_X ()
 
virtual ossimString getSecurityClassification () const
 
void setComplexityLevel (const ossimString &level)
 
void setSystemType (const ossimString &systemType)
 
void setOriginatingStationId (const ossimString &originationId)
 
void setDate (const ossimLocalTm &d)
 Sets field FDT. More...
 
void setDate (const ossimString &d)
 Sets field FDT. More...
 
virtual void setDate ()
 Sets field FDT to current time converted to GMT(ZULU). More...
 
void setTitle (const ossimString &title)
 
void setFileSecurityClassification (const ossimString &securityClassification)
 
void setCopyNumber (const ossimString &copyNumber)
 
void setNumberOfCopies (const ossimString &numberOfCopies)
 
void setEncryption (const ossimString &encryption)
 
ossimString getComplexityLevel () const
 
ossimString getSystemType () const
 
ossimString getOriginatingStationId () const
 
ossimString getDate () const
 
ossimString getTitle () const
 
ossimString getCopyNumber () const
 
ossimString getNumberOfCopies () const
 
ossimString getEncryption () const
 
bool saveState (ossimKeywordlist &kwl, const ossimString &prefix="") const
 
- Public Member Functions inherited from ossimNitfFileHeader
 ossimNitfFileHeader ()
 
virtual ~ossimNitfFileHeader ()
 
void addTag (const ossimNitfTagInformation &tag, bool unique=true)
 
virtual bool getTagInformation (ossimNitfTagInformation &tag, int idx) const
 
virtual std::vector< ossimNitfTagInformationgetAllTags ()
 
virtual void setAllTags (std::vector< ossimNitfTagInformation > tagList)
 
virtual int getNumberOfTags () const
 
virtual bool getTag (ossimNitfTagInformation &tagInfo, const ossimString &tagName) const
 
bool hasImages () const
 
bool hasSymbols () const
 
bool hasGraphics () const
 
bool hasText () const
 
bool hasLabels () const
 
bool hasDataExtSegments () const
 
virtual ossim_uint32 getTotalTagLength () const
 
virtual std::ostream & printTags (std::ostream &out, const std::string &prefix=std::string()) const
 print tags method that outputs a key/value type format adding prefix to keys. More...
 
- 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 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)
 

Static Public Attributes

static const ossimString FSCLSY_KW
 Properties of a NITF 2.1 Header file. More...
 
static const ossimString FSDCTP_KW
 
static const ossimString FSDCDT_KW = "FSDCDT"
 
static const ossimString FSDCXM_KW = "FSDCXM"
 
static const ossimString FSDG_KW = "FSDG"
 
static const ossimString FSDGDT_KW = "FSDGDT"
 
static const ossimString FSCLTX_KW = "FSCLTX"
 
static const ossimString FSCATP_KW = "FSCATP"
 
static const ossimString FSCRSN_KW = "FSCRSN"
 
static const ossimString FSSRDT_KW = "FSSRDT"
 
static const ossimString FBKGC_KW = "FBKGC"
 
- Static Public Attributes inherited from ossimNitfFileHeaderV2_X
static const ossimString FILE_TYPE_KW = "FILE_TYPE"
 Properties of a NITF 2.x Header file. More...
 
static const ossimString FHDR_KW = "FHDR"
 
static const ossimString VERSION_KW = "VERSION"
 
static const ossimString CLEVEL_KW = "CLEVEL"
 
static const ossimString STYPE_KW = "STYPE"
 
static const ossimString OSTAID_KW = "OSTAID"
 
static const ossimString FDT_KW = "FDT"
 
static const ossimString FTITLE_KW = "FTITLE"
 
static const ossimString FSCLAS_KW = "FSCLAS"
 
static const ossimString FSCODE_KW = "FSCODE"
 
static const ossimString FSCTLH_KW = "FSCTLH"
 
static const ossimString FSREL_KW = "FSREL"
 
static const ossimString FSCAUT_KW = "FSCAUT"
 
static const ossimString FSCTLN_KW = "FSCTLN"
 
static const ossimString FSCOP_KW = "FSCOP"
 
static const ossimString FSCPYS_KW = "FSCPYS"
 
static const ossimString ENCRYP_KW = "ENCRYP"
 
static const ossimString ONAME_KW = "ONAME"
 
static const ossimString OPHONE_KW = "OPHONE"
 

Private Member Functions

void setNumberOfImageInfoRecords (ossim_uint64 num)
 Sets the number of image records in the NITF 2.1 File Header. More...
 
void setNumberOfTextInfoRecords (ossim_uint64 num)
 
void setNumberOfGraphicInfoRecords (ossim_uint64 num)
 
void setNumberOfDataExtSegInfoRecords (ossim_uint64 num)
 
void readImageInfoRecords (ossim::istream &in)
 
void readGraphicInfoRecords (ossim::istream &in)
 
void readTextFileInfoRecords (ossim::istream &in)
 
void readDataExtSegInfoRecords (ossim::istream &in)
 
void readResExtSegInfoRecords (ossim::istream &in)
 
void initializeAllOffsets ()
 If the header was parsed this method will initialize the offsets to whare all data resides within the file. More...
 
void readOverflowTags (ossim::istream &in)
 If the header was parsed and the offsets have been initialized, this method will parse all overflow tags and put them into theTagList. More...
 
void readDes (std::istream &in)
 

Private Attributes

ossim_uint32 theHeaderSize
 This is not part of the NITF file header. More...
 
ossimDrect theImageRect
 This will be pre-computed when the header file is opened. More...
 
std::vector< ossimNitfImageOffsetInformationtheImageOffsetList
 This will hold pre-computed offsets to the start of all image headers and start to their data. More...
 
std::vector< ossimNitfGraphicOffsetInformationtheGraphicOffsetList
 
std::vector< ossimNitfTextOffsetInformationtheTextFileOffsetList
 
std::vector< ossimNitfDataExtSegOffsetInformationtheDataExtSegOffsetList
 
char theSecurityClassificationSys [3]
 Field: FSCLSY. More...
 
char theCodewords [12]
 Field: FSCODE. More...
 
char theControlAndHandling [3]
 Field: FSCTLH. More...
 
char theReleasingInstructions [21]
 Field: FSREL. More...
 
char theDeclassificationType [3]
 Field: FSDCTP. More...
 
char theDeclassificationDate [9]
 Field: FSDCDT. More...
 
char theDeclassificationExemption [5]
 Field: FSDCXM. More...
 
char theDowngrade [2]
 Field: FSDG. More...
 
char theDowngradingDate [9]
 Field: FSDGDT. More...
 
char theClassificationText [44]
 Field: FSCLTX. More...
 
char theClassificationAuthorityType [2]
 Field: FSCATP. More...
 
char theClassificationAuthority [41]
 Field: FSCAUT. More...
 
char theClassificationReason [2]
 Field: FSCRSN. More...
 
char theSecuritySourceDate [9]
 Field: FSSRDT. More...
 
char theSecurityControlNumber [16]
 Field: FSCTLN. More...
 
ossim_uint8 theFileBackgroundColor [3]
 Field: FBKGC. More...
 
char theOriginatorsName [25]
 Field: ONAME. More...
 
char theOriginatorsPhone [19]
 Field: OPHONE. More...
 
char theFileLength [13]
 Field: FL. More...
 
char theHeaderLength [7]
 Field: HL. More...
 
char theNumberOfImageInfoRecords [4]
 Field: NUMI. More...
 
std::vector< ossimNitfImageInfoRecordV2_1theNitfImageInfoRecords
 This information is conditional on the number of image info records field. More...
 
char theNumberOfGraphicInfoRecords [4]
 Field: NUMS. More...
 
std::vector< ossimNitfGraphicInfoRecordV2_1theNitfGraphicInfoRecords
 This is an optional field and will depend on theNumberOfGraphicInfoRecords. More...
 
char theReservedForFutureUse1 [4]
 Field: NUMX. More...
 
char theNumberOfTextFileInfoRecords [4]
 Field: NUMT. More...
 
std::vector< ossimNitfTextFileInfoRecordV2_1theNitfTextFileInfoRecords
 This information is conditional on the number of text file info records field. More...
 
char theNumberOfDataExtSegInfoRecords [4]
 Field: NUMDES. More...
 
std::vector< ossimNitfDataExtSegInfoRecordV2_1theNitfDataExtSegInfoRecords
 This information is conditional on the number of info records field. More...
 
char theNumberOfResExtSegInfoRecords [4]
 Field: NUMRES. More...
 
std::vector< ossimNitfResExtSegInfoRecordV2_1theNitfResExtSegInfoRecords
 This information is conditional on the number of Res Ext Seg info records field. More...
 
char theUserDefinedHeaderDataLength [6]
 Field: UDHDL. More...
 
char theUserDefinedHeaderOverflow [4]
 Field: UDHOFL. More...
 
char theExtendedHeaderDataLength [6]
 Field: XHDL. More...
 
char theExtendedHeaderDataOverflow [4]
 Field: XHDLOFL. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ossimNitfFileHeaderV2_X
static ossimString formatDate (const ossimString &version, const ossimLocalTm &d)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Attributes inherited from ossimNitfFileHeaderV2_X
char theFileTypeVersion [10]
 Field: FHDR Required field for NITF and is a 9 byte value. More...
 
char theComplexityLevel [3]
 Field: CLEVEL. More...
 
char theSystemType [5]
 Field: STYPE. More...
 
char theOriginatingStationId [11]
 Field: OSTAID. More...
 
char theDateTime [15]
 Field: FDT. More...
 
char theFileTitle [81]
 Field: FTITLE. More...
 
char theSecurityClassification [2]
 Field: FSCLAS. More...
 
char theCopyNumber [6]
 Field: FSCOP. More...
 
char theNumberOfCopies [6]
 Field: FSCOPYS. More...
 
char theEncryption [2]
 Field: ENCRYP. More...
 
- Protected Attributes inherited from ossimNitfFileHeader
std::vector< ossimNitfTagInformationtheTagList
 
std::vector< ossimNitfDesInformationtheDesList
 

Detailed Description

Definition at line 133 of file ossimNitfFileHeaderV2_1.h.

Constructor & Destructor Documentation

◆ ossimNitfFileHeaderV2_1()

ossimNitfFileHeaderV2_1::ossimNitfFileHeaderV2_1 ( )

◆ ~ossimNitfFileHeaderV2_1()

ossimNitfFileHeaderV2_1::~ossimNitfFileHeaderV2_1 ( )
virtual

Definition at line 241 of file ossimNitfFileHeaderV2_1.cpp.

242 {
243 }

Member Function Documentation

◆ addDataExtSegInfoRecord()

void ossimNitfFileHeaderV2_1::addDataExtSegInfoRecord ( const ossimNitfDataExtSegInfoRecordV2_1 recordInfo)
virtual

Definition at line 1235 of file ossimNitfFileHeaderV2_1.cpp.

References setNumberOfDataExtSegInfoRecords(), and theNitfDataExtSegInfoRecords.

Referenced by ossimNitfWriter::writeBlockBandSeparate().

1236 {
1237  theNitfDataExtSegInfoRecords.push_back(recordInfo);
1238 
1240 }
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.
void setNumberOfDataExtSegInfoRecords(ossim_uint64 num)

◆ addImageInfoRecord()

void ossimNitfFileHeaderV2_1::addImageInfoRecord ( const ossimNitfImageInfoRecordV2_1 recordInfo)
virtual

Definition at line 1189 of file ossimNitfFileHeaderV2_1.cpp.

References setNumberOfImageInfoRecords(), and theNitfImageInfoRecords.

Referenced by ossimNitfWriter::writeBlockBandSeparate(), and ossimNitfWriter::writeBlockBandSequential().

1190 {
1191  theNitfImageInfoRecords.push_back(recordInfo);
1192 
1194 }
void setNumberOfImageInfoRecords(ossim_uint64 num)
Sets the number of image records in the NITF 2.1 File Header.
std::vector< ossimNitfImageInfoRecordV2_1 > theNitfImageInfoRecords
This information is conditional on the number of image info records field.

◆ addTag()

void ossimNitfFileHeaderV2_1::addTag ( ossimNitfTagInformation  tag,
bool  unique = true 
)

Definition at line 2103 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfTagInformation::getTagName(), removeTag(), and ossimNitfFileHeader::theTagList.

Referenced by ossimNitfWriter::addRegisteredTag().

2104 {
2105  if (unique)
2106  {
2107  removeTag(tag.getTagName());
2108  }
2109  theTagList.push_back(tag);
2110 }
std::vector< ossimNitfTagInformation > theTagList
void removeTag(const ossimString &tagName)

◆ addTextInfoRecord()

void ossimNitfFileHeaderV2_1::addTextInfoRecord ( const ossimNitfTextFileInfoRecordV2_1 recordInfo)
virtual

Definition at line 1196 of file ossimNitfFileHeaderV2_1.cpp.

References setNumberOfTextInfoRecords(), and theNitfTextFileInfoRecords.

Referenced by ossimNitfWriter::writeBlockBandSeparate(), and ossimNitfWriter::writeBlockBandSequential().

1197 {
1198  theNitfTextFileInfoRecords.push_back(recordInfo);
1199 
1201 }
void setNumberOfTextInfoRecords(ossim_uint64 num)
std::vector< ossimNitfTextFileInfoRecordV2_1 > theNitfTextFileInfoRecords
This information is conditional on the number of text file info records field.

◆ allocateDataExtSegment()

ossimNitfDataExtensionSegment * ossimNitfFileHeaderV2_1::allocateDataExtSegment ( ) const
virtual

◆ allocateImageHeader()

ossimNitfImageHeader * ossimNitfFileHeaderV2_1::allocateImageHeader ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 892 of file ossimNitfFileHeaderV2_1.cpp.

Referenced by getNewImageHeader().

◆ allocateLabelHeader()

ossimNitfLabelHeader * ossimNitfFileHeaderV2_1::allocateLabelHeader ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1256 of file ossimNitfFileHeaderV2_1.cpp.

1257 {
1258  return 0;
1259 }

◆ allocateSymbolHeader()

ossimNitfSymbolHeader * ossimNitfFileHeaderV2_1::allocateSymbolHeader ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1251 of file ossimNitfFileHeaderV2_1.cpp.

1252 {
1253  return 0;
1254 }

◆ allocateTextHeader()

ossimNitfTextHeader * ossimNitfFileHeaderV2_1::allocateTextHeader ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 897 of file ossimNitfFileHeaderV2_1.cpp.

◆ clearFields()

void ossimNitfFileHeaderV2_1::clearFields ( )

Definition at line 947 of file ossimNitfFileHeaderV2_1.cpp.

References theClassificationAuthority, theClassificationAuthorityType, theClassificationReason, theClassificationText, theCodewords, ossimNitfFileHeaderV2_X::theComplexityLevel, theControlAndHandling, ossimNitfFileHeaderV2_X::theCopyNumber, ossimNitfFileHeaderV2_X::theDateTime, theDeclassificationDate, theDeclassificationExemption, theDeclassificationType, theDowngrade, theDowngradingDate, ossimNitfFileHeaderV2_X::theEncryption, theExtendedHeaderDataLength, theExtendedHeaderDataOverflow, theFileBackgroundColor, theFileLength, ossimNitfFileHeaderV2_X::theFileTitle, ossimNitfFileHeaderV2_X::theFileTypeVersion, theHeaderLength, theHeaderSize, ossimNitfFileHeaderV2_X::theNumberOfCopies, theNumberOfDataExtSegInfoRecords, theNumberOfGraphicInfoRecords, theNumberOfImageInfoRecords, theNumberOfResExtSegInfoRecords, theNumberOfTextFileInfoRecords, ossimNitfFileHeaderV2_X::theOriginatingStationId, theOriginatorsName, theOriginatorsPhone, theReleasingInstructions, theReservedForFutureUse1, ossimNitfFileHeaderV2_X::theSecurityClassification, theSecurityClassificationSys, theSecurityControlNumber, theSecuritySourceDate, ossimNitfFileHeaderV2_X::theSystemType, theUserDefinedHeaderDataLength, and theUserDefinedHeaderOverflow.

Referenced by ossimNitfFileHeaderV2_1(), and parseStream().

948 {
949  memcpy(theFileTypeVersion, "NITF02.10", 9);
950  memcpy(theComplexityLevel, "01", 2);
951  memcpy(theSystemType, "BF01", 4);
952  memset(theOriginatingStationId, ' ', 10);
953  memset(theDateTime, ' ', 14);
954  memset(theFileTitle, ' ', 80);
955  memset(theSecurityClassification, ' ', 1);
956  memset(theSecurityClassificationSys, ' ', 2);
957  memset(theCodewords, ' ', 11);
958  memset(theControlAndHandling, ' ', 2);
959  memset(theReleasingInstructions, ' ', 20);
960  memset(theDeclassificationType, ' ', 2);
961  memset(theDeclassificationDate, ' ', 8);
962  memset(theDeclassificationExemption, ' ', 4);
963  memset(theDowngrade, ' ', 1);
964  memset(theDowngradingDate, ' ', 8);
965  memset(theClassificationText, ' ', 43);
966  memset(theClassificationAuthorityType, ' ', 1);
967  memset(theClassificationAuthority, ' ', 40);
968  memset(theClassificationReason, ' ', 1);
969  memset(theSecuritySourceDate, ' ', 8);
970  memset(theSecurityControlNumber, ' ', 15);
971  memset(theCopyNumber, '0', 5);
972  memset(theNumberOfCopies, '0', 5);
973  memset(theEncryption, ' ', 1);
974  memset(theFileBackgroundColor, 0, 3);
975  memset(theOriginatorsName, ' ', 24);
976  memset(theOriginatorsPhone, ' ', 18);
977  memset(theFileLength, ' ', 12);
978  memset(theHeaderLength, ' ', 6);
979  memset(theNumberOfImageInfoRecords, '0', 3);
980  memset(theNumberOfGraphicInfoRecords, '0', 3);
981  memset(theReservedForFutureUse1, '0', 3);
982  memset(theNumberOfTextFileInfoRecords, '0', 3);
983  memset(theNumberOfDataExtSegInfoRecords, '0', 3);
984  memset(theNumberOfResExtSegInfoRecords, '0', 3);
985  memset(theUserDefinedHeaderDataLength, '0', 5);
986  memset(theUserDefinedHeaderOverflow, '0',3);
987  memset(theExtendedHeaderDataLength, '0',5);
988  memset(theExtendedHeaderDataOverflow, '0', 3);
989  theFileTypeVersion[9] = '\0';
990  theComplexityLevel[2] = '\0';
991  theSystemType[4] = '\0';
992  theOriginatingStationId[10] = '\0';
993  theDateTime[14] = '\0';
994  theFileTitle[80] = '\0';
995  theSecurityClassification[1] = '\0';
997  theCodewords[11] = '\0';
998  theControlAndHandling[2] = '\0';
999  theReleasingInstructions[20] = '\0';
1000  theDeclassificationType[2] = '\0';
1001  theDeclassificationDate[8] = '\0';
1002  theDeclassificationExemption[4] = '\0';
1003  theDowngrade[1] = '\0';
1004  theDowngradingDate[8] = '\0';
1005  theClassificationText[43] = '\0';
1007  theClassificationAuthority[40] = '\0';
1008  theClassificationReason[1] = '\0';
1009  theSecuritySourceDate[8] = '\0';
1010  theSecurityControlNumber[15] = '\0';
1011  theCopyNumber[5] = '\0';
1012  theNumberOfCopies[5] = '\0';
1013  theEncryption[1] = '\0';
1014  theOriginatorsName[24] = '\0';
1015  theOriginatorsPhone[18] = '\0';
1016  theFileLength[12] = '\0';
1017  theHeaderLength[6] = '\0';
1018  theNumberOfImageInfoRecords[3] = '\0';
1020  theReservedForFutureUse1[3] = '\0';
1025  theUserDefinedHeaderOverflow[3] = '\0';
1026  theExtendedHeaderDataLength[5] = '\0';
1028 
1029  theHeaderSize = 0;
1030 }
char theReleasingInstructions[21]
Field: FSREL.
char theComplexityLevel[3]
Field: CLEVEL.
char theClassificationAuthorityType[2]
Field: FSCATP.
char theNumberOfGraphicInfoRecords[4]
Field: NUMS.
char theOriginatingStationId[11]
Field: OSTAID.
ossim_uint8 theFileBackgroundColor[3]
Field: FBKGC.
char theNumberOfResExtSegInfoRecords[4]
Field: NUMRES.
char theReservedForFutureUse1[4]
Field: NUMX.
char theOriginatorsName[25]
Field: ONAME.
char theFileTypeVersion[10]
Field: FHDR Required field for NITF and is a 9 byte value.
char theDeclassificationExemption[5]
Field: FSDCXM.
char theClassificationAuthority[41]
Field: FSCAUT.
char theHeaderLength[7]
Field: HL.
char theNumberOfImageInfoRecords[4]
Field: NUMI.
char theFileLength[13]
Field: FL.
char theControlAndHandling[3]
Field: FSCTLH.
char theDeclassificationType[3]
Field: FSDCTP.
char theOriginatorsPhone[19]
Field: OPHONE.
char theSystemType[5]
Field: STYPE.
char theSecurityClassificationSys[3]
Field: FSCLSY.
char theClassificationReason[2]
Field: FSCRSN.
char theDowngradingDate[9]
Field: FSDGDT.
char theCodewords[12]
Field: FSCODE.
char theNumberOfDataExtSegInfoRecords[4]
Field: NUMDES.
char theClassificationText[44]
Field: FSCLTX.
char theEncryption[2]
Field: ENCRYP.
char theUserDefinedHeaderOverflow[4]
Field: UDHOFL.
char theDateTime[15]
Field: FDT.
char theExtendedHeaderDataLength[6]
Field: XHDL.
ossim_uint32 theHeaderSize
This is not part of the NITF file header.
char theSecurityControlNumber[16]
Field: FSCTLN.
char theUserDefinedHeaderDataLength[6]
Field: UDHDL.
char theCopyNumber[6]
Field: FSCOP.
char theFileTitle[81]
Field: FTITLE.
char theNumberOfTextFileInfoRecords[4]
Field: NUMT.
char theSecuritySourceDate[9]
Field: FSSRDT.
char theSecurityClassification[2]
Field: FSCLAS.
char theNumberOfCopies[6]
Field: FSCOPYS.
char theExtendedHeaderDataOverflow[4]
Field: XHDLOFL.
char theDeclassificationDate[9]
Field: FSDCDT.
char theDowngrade[2]
Field: FSDG.

◆ deleteLastDataExtSegInfoRecord()

void ossimNitfFileHeaderV2_1::deleteLastDataExtSegInfoRecord ( )
virtual

Definition at line 1119 of file ossimNitfFileHeaderV2_1.cpp.

References setNumberOfDataExtSegInfoRecords(), and theNitfDataExtSegInfoRecords.

1120 {
1122 
1124 }
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.
void setNumberOfDataExtSegInfoRecords(ossim_uint64 num)

◆ deleteLastImageInfoRecord()

void ossimNitfFileHeaderV2_1::deleteLastImageInfoRecord ( )
virtual

Definition at line 1147 of file ossimNitfFileHeaderV2_1.cpp.

References setNumberOfImageInfoRecords(), and theNitfImageInfoRecords.

1148 {
1149  if (theNitfImageInfoRecords.size()) theNitfImageInfoRecords.pop_back();
1150 
1152 }
void setNumberOfImageInfoRecords(ossim_uint64 num)
Sets the number of image records in the NITF 2.1 File Header.
std::vector< ossimNitfImageInfoRecordV2_1 > theNitfImageInfoRecords
This information is conditional on the number of image info records field.

◆ getBackgroundColor()

void ossimNitfFileHeaderV2_1::getBackgroundColor ( ossim_uint8 r,
ossim_uint8 g,
ossim_uint8 b 
) const
virtual

Definition at line 1452 of file ossimNitfFileHeaderV2_1.cpp.

References theFileBackgroundColor.

Referenced by getProperty().

1455 {
1456  r = theFileBackgroundColor[0];
1457  g = theFileBackgroundColor[1];
1458  b = theFileBackgroundColor[2];
1459 }
ossim_uint8 theFileBackgroundColor[3]
Field: FBKGC.

◆ getClassificationAuthority()

ossimString ossimNitfFileHeaderV2_1::getClassificationAuthority ( ) const
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1432 of file ossimNitfFileHeaderV2_1.cpp.

References theClassificationAuthority.

Referenced by ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1433 {
1435 }
char theClassificationAuthority[41]
Field: FSCAUT.

◆ getClassificationAuthorityType()

ossimString ossimNitfFileHeaderV2_1::getClassificationAuthorityType ( ) const
virtual

Definition at line 1427 of file ossimNitfFileHeaderV2_1.cpp.

References theClassificationAuthorityType.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1428 {
1430 }
char theClassificationAuthorityType[2]
Field: FSCATP.

◆ getClassificationReason()

ossimString ossimNitfFileHeaderV2_1::getClassificationReason ( ) const
virtual

Definition at line 1437 of file ossimNitfFileHeaderV2_1.cpp.

References theClassificationReason.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1438 {
1439  return theClassificationReason;
1440 }
char theClassificationReason[2]
Field: FSCRSN.

◆ getClassificationText()

ossimString ossimNitfFileHeaderV2_1::getClassificationText ( ) const
virtual

Definition at line 1422 of file ossimNitfFileHeaderV2_1.cpp.

References theClassificationText.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1423 {
1424  return theClassificationText;
1425 }
char theClassificationText[44]
Field: FSCLTX.

◆ getCodeWords()

ossimString ossimNitfFileHeaderV2_1::getCodeWords ( ) const
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1382 of file ossimNitfFileHeaderV2_1.cpp.

References theCodewords.

Referenced by ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1383 {
1384  return theCodewords;
1385 }
char theCodewords[12]
Field: FSCODE.

◆ getControlAndHandling()

ossimString ossimNitfFileHeaderV2_1::getControlAndHandling ( ) const
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1387 of file ossimNitfFileHeaderV2_1.cpp.

References theControlAndHandling.

Referenced by ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1388 {
1389  return theControlAndHandling;
1390 }
char theControlAndHandling[3]
Field: FSCTLH.

◆ getDateTime()

const char * ossimNitfFileHeaderV2_1::getDateTime ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1179 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfFileHeaderV2_X::theDateTime.

1180 {
1181  return theDateTime;
1182 }
char theDateTime[15]
Field: FDT.

◆ getDeclassificationDate()

ossimString ossimNitfFileHeaderV2_1::getDeclassificationDate ( ) const
virtual

Definition at line 1402 of file ossimNitfFileHeaderV2_1.cpp.

References theDeclassificationDate.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1403 {
1404  return theDeclassificationDate;
1405 }
char theDeclassificationDate[9]
Field: FSDCDT.

◆ getDeclassificationExemption()

ossimString ossimNitfFileHeaderV2_1::getDeclassificationExemption ( ) const
virtual

Definition at line 1407 of file ossimNitfFileHeaderV2_1.cpp.

References theDeclassificationExemption.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1408 {
1410 }
char theDeclassificationExemption[5]
Field: FSDCXM.

◆ getDeclassificationType()

ossimString ossimNitfFileHeaderV2_1::getDeclassificationType ( ) const
virtual

Definition at line 1397 of file ossimNitfFileHeaderV2_1.cpp.

References theDeclassificationType.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1398 {
1399  return theDeclassificationType;
1400 }
char theDeclassificationType[3]
Field: FSDCTP.

◆ getDowngrade()

ossimString ossimNitfFileHeaderV2_1::getDowngrade ( ) const
virtual

Definition at line 1412 of file ossimNitfFileHeaderV2_1.cpp.

References theDowngrade.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1413 {
1414  return theDowngrade;
1415 }
char theDowngrade[2]
Field: FSDG.

◆ getDowngradingDate()

ossimString ossimNitfFileHeaderV2_1::getDowngradingDate ( ) const
virtual

Definition at line 1417 of file ossimNitfFileHeaderV2_1.cpp.

References theDowngradingDate.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1418 {
1419  return theDowngradingDate;
1420 }
char theDowngradingDate[9]
Field: FSDGDT.

◆ getFileSize()

ossim_int64 ossimNitfFileHeaderV2_1::getFileSize ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 927 of file ossimNitfFileHeaderV2_1.cpp.

References theFileLength, and ossimString::toInt64().

928 {
929  ossimString temp = theFileLength;
930 
931  if(temp == "999999999999")
932  {
933  return -1;
934  }
935  else
936  {
937  return temp.toInt64();
938  }
939 }
char theFileLength[13]
Field: FL.
ossim_int64 toInt64() const

◆ getHeaderSize()

ossim_int32 ossimNitfFileHeaderV2_1::getHeaderSize ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 922 of file ossimNitfFileHeaderV2_1.cpp.

References theHeaderSize.

923 {
924  return theHeaderSize;
925 }
ossim_uint32 theHeaderSize
This is not part of the NITF file header.

◆ getImageRect()

ossimDrect ossimNitfFileHeaderV2_1::getImageRect ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1184 of file ossimNitfFileHeaderV2_1.cpp.

References theImageRect.

1185 {
1186  return theImageRect;
1187 }
ossimDrect theImageRect
This will be pre-computed when the header file is opened.

◆ getNewDataExtensionSegment()

ossimNitfDataExtensionSegment * ossimNitfFileHeaderV2_1::getNewDataExtensionSegment ( ossim_int32  dataExtNumber,
ossim::istream in 
) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1359 of file ossimNitfFileHeaderV2_1.cpp.

References allocateDataExtSegment(), getNumberOfDataExtSegments(), ossimNitfDataExtensionSegment::parseStream(), theDataExtSegOffsetList, and theNitfDataExtSegInfoRecords.

Referenced by readOverflowTags().

1361 {
1362  ossimNitfDataExtensionSegment *result = 0;
1363 
1364  if((getNumberOfDataExtSegments() > 0) &&
1365  (dataExtNumber < (ossim_int32)theNitfDataExtSegInfoRecords.size()) &&
1366  (dataExtNumber >= 0))
1367  {
1368  result = allocateDataExtSegment();
1369  // ossimIFStream64::seekg64(in, theDataExtSegOffsetList[dataExtNumber].theDataExtSegHeaderOffset, ios::beg);
1370  in.seekg(theDataExtSegOffsetList[dataExtNumber].theDataExtSegHeaderOffset, ios::beg);
1371  result->parseStream(in, theNitfDataExtSegInfoRecords[dataExtNumber].getDataExtSegLength());
1372  }
1373 
1374  return result;
1375 }
virtual ossimNitfDataExtensionSegment * allocateDataExtSegment() const
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.
virtual void parseStream(std::istream &in, ossim_uint64 dataLength)=0
virtual ossim_int32 getNumberOfDataExtSegments() const
std::vector< ossimNitfDataExtSegOffsetInformation > theDataExtSegOffsetList
int ossim_int32

◆ getNewImageHeader()

ossimNitfImageHeader * ossimNitfFileHeaderV2_1::getNewImageHeader ( ossim_uint32  imageNumber,
ossim::istream in 
) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1302 of file ossimNitfFileHeaderV2_1.cpp.

References allocateImageHeader(), getNumberOfImages(), ossimNotify(), ossimNotifyLevel_FATAL, and theImageOffsetList.

1304 {
1305  ossimNitfImageHeader *result = 0;
1306 
1307  if( (getNumberOfImages() > 0) && (imageNumber < theImageOffsetList.size()) )
1308  {
1309  result = allocateImageHeader();
1310  in.seekg(theImageOffsetList[imageNumber].theImageHeaderOffset, ios::beg);
1311  ((ossimNitfImageHeaderV2_1*)result)->parseStream(in, this);
1312  }
1313  else
1314  {
1315 #if 0
1316  ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimNitfFileHeaderV2_1::getNewImageHeader: "
1317  << "\nNo images in file or image number (" << imageNumber
1318  << ") is out of range!\n";
1319 #endif
1320  }
1321 
1322  return result;
1323 }
virtual ossim_int32 getNumberOfImages() const
virtual ossimNitfImageHeader * allocateImageHeader() const
std::vector< ossimNitfImageOffsetInformation > theImageOffsetList
This will hold pre-computed offsets to the start of all image headers and start to their data...
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ getNewLabelHeader()

ossimNitfLabelHeader * ossimNitfFileHeaderV2_1::getNewLabelHeader ( ossim_uint32  labelNumber,
ossim::istream in 
) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1339 of file ossimNitfFileHeaderV2_1.cpp.

1341 {
1342  // Currently not implemented...
1343  ossimNitfLabelHeader *result = 0;
1344 
1345  return result;
1346 }

◆ getNewSymbolHeader()

ossimNitfSymbolHeader * ossimNitfFileHeaderV2_1::getNewSymbolHeader ( ossim_uint32  symbolNumber,
ossim::istream in 
) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1326 of file ossimNitfFileHeaderV2_1.cpp.

1328 {
1329  // Currently not implemented...
1330 
1331  ossimNitfSymbolHeader *result = 0;
1332 
1333 
1334 
1335  return result;
1336 }

◆ getNewTextHeader()

ossimNitfTextHeader * ossimNitfFileHeaderV2_1::getNewTextHeader ( ossim_uint32  textNumber,
ossim::istream in 
) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1349 of file ossimNitfFileHeaderV2_1.cpp.

1351 {
1352  // Currently not implemented...
1353  ossimNitfTextHeader *result = 0;
1354 
1355  return result;
1356 }

◆ getNumberOfDataExtSegments()

ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfDataExtSegments ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1169 of file ossimNitfFileHeaderV2_1.cpp.

References theNitfDataExtSegInfoRecords.

Referenced by getNewDataExtensionSegment(), and readDes().

1170 {
1171  return theNitfDataExtSegInfoRecords.size();
1172 }
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.

◆ getNumberOfGraphics()

ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfGraphics ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1164 of file ossimNitfFileHeaderV2_1.cpp.

References theNitfGraphicInfoRecords.

1165 {
1166  return theNitfGraphicInfoRecords.size();
1167 }
std::vector< ossimNitfGraphicInfoRecordV2_1 > theNitfGraphicInfoRecords
This is an optional field and will depend on theNumberOfGraphicInfoRecords.

◆ getNumberOfImages()

ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfImages ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 912 of file ossimNitfFileHeaderV2_1.cpp.

References theNitfImageInfoRecords.

Referenced by getNewImageHeader().

913 {
914  return (ossim_int32)theNitfImageInfoRecords.size();
915 }
std::vector< ossimNitfImageInfoRecordV2_1 > theNitfImageInfoRecords
This information is conditional on the number of image info records field.
int ossim_int32

◆ getNumberOfLabels()

ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfLabels ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1154 of file ossimNitfFileHeaderV2_1.cpp.

1155 {
1156  return 0;
1157 }

◆ getNumberOfReservedExtSegments()

ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfReservedExtSegments ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1174 of file ossimNitfFileHeaderV2_1.cpp.

References theNitfResExtSegInfoRecords.

1175 {
1176  return theNitfResExtSegInfoRecords.size();
1177 }
std::vector< ossimNitfResExtSegInfoRecordV2_1 > theNitfResExtSegInfoRecords
This information is conditional on the number of Res Ext Seg info records field.

◆ getNumberOfSymbols()

ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfSymbols ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 1159 of file ossimNitfFileHeaderV2_1.cpp.

1160 {
1161  return 0;
1162 }

◆ getNumberOfTextSegments()

ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfTextSegments ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 917 of file ossimNitfFileHeaderV2_1.cpp.

References theNitfTextFileInfoRecords.

918 {
919  return static_cast<ossim_int32>(theNitfTextFileInfoRecords.size());
920 }
std::vector< ossimNitfTextFileInfoRecordV2_1 > theNitfTextFileInfoRecords
This information is conditional on the number of text file info records field.
int ossim_int32

◆ getOriginatorsName()

ossimString ossimNitfFileHeaderV2_1::getOriginatorsName ( ) const
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1461 of file ossimNitfFileHeaderV2_1.cpp.

References theOriginatorsName.

1462 {
1463  return theOriginatorsName;
1464 }
char theOriginatorsName[25]
Field: ONAME.

◆ getOriginatorsPhone()

ossimString ossimNitfFileHeaderV2_1::getOriginatorsPhone ( ) const
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1466 of file ossimNitfFileHeaderV2_1.cpp.

References theOriginatorsPhone.

1467 {
1468  return theOriginatorsPhone;
1469 }
char theOriginatorsPhone[19]
Field: OPHONE.

◆ getProperty()

ossimRefPtr< ossimProperty > ossimNitfFileHeaderV2_1::getProperty ( const ossimString name) const
virtual

Reimplemented from ossimNitfFileHeaderV2_X.

Definition at line 1972 of file ossimNitfFileHeaderV2_1.cpp.

References ossimStringProperty::addConstraint(), ossimNitfFileHeaderV2_X::CLEVEL_KW, FBKGC_KW, FSCATP_KW, FSCLSY_KW, FSCLTX_KW, FSCRSN_KW, FSDCDT_KW, FSDCTP_KW, FSDCXM_KW, FSDG_KW, FSDGDT_KW, FSSRDT_KW, getBackgroundColor(), getClassificationAuthorityType(), getClassificationReason(), getClassificationText(), ossimNitfFileHeaderV2_X::getComplexityLevel(), getDeclassificationDate(), getDeclassificationExemption(), getDeclassificationType(), getDowngrade(), getDowngradingDate(), ossimNitfFileHeaderV2_X::getProperty(), getSecurityClassificationSys(), getSecuritySourceDate(), ossimNitfFileHeaderV2_X::ONAME_KW, ossimNitfFileHeaderV2_X::OPHONE_KW, theOriginatorsName, and theOriginatorsPhone.

1973 {
1974  ossimProperty* property = 0;
1975  ossimStringProperty* stringProperty = 0;
1976  ossimColorProperty* colorProperty = 0;
1977 
1978  if(name == CLEVEL_KW)
1979  {
1980  property = new ossimStringProperty(name, getComplexityLevel().trim());
1981  }
1982  else if(name == FSCLSY_KW)
1983  {
1984  property = new ossimStringProperty(name,
1985  getSecurityClassificationSys().trim());
1986  }
1987  else if(name == FSDCTP_KW)
1988  {
1989  property = new ossimStringProperty(name,
1990  getDeclassificationType().trim());
1991  }
1992  else if(name == FSDCDT_KW)
1993  {
1994  property = new ossimStringProperty(name,
1995  getDeclassificationDate().trim());
1996  }
1997  else if(name == FSDCXM_KW)
1998  {
1999  property = new ossimStringProperty(name,
2000  getDeclassificationExemption().trim());
2001  }
2002  else if(name == FSDG_KW)
2003  {
2004  stringProperty = new ossimStringProperty(name,
2005  getDowngrade().trim(),
2006  false);
2007 
2008  stringProperty->addConstraint("");
2009  stringProperty->addConstraint("S");
2010  stringProperty->addConstraint("C");
2011  stringProperty->addConstraint("R");
2012 
2013  property = stringProperty;
2014  }
2015  else if(name == FSDGDT_KW)
2016  {
2017  property = new ossimStringProperty(name,
2018  getDowngradingDate().trim());
2019  }
2020  else if(name == FSCLTX_KW)
2021  {
2022  property = new ossimStringProperty(name,
2023  getClassificationText().trim());
2024  }
2025  else if(name == FSCATP_KW)
2026  {
2027  stringProperty = new ossimStringProperty(name,
2029  false);
2030 
2031  stringProperty->addConstraint("");
2032  stringProperty->addConstraint("O");
2033  stringProperty->addConstraint("D");
2034  stringProperty->addConstraint("M");
2035 
2036  property = stringProperty;
2037  }
2038  else if(name == FSCRSN_KW)
2039  {
2040  stringProperty = new ossimStringProperty(name,
2041  getClassificationReason().trim(),
2042  false);
2043 
2044  stringProperty->addConstraint("");
2045  stringProperty->addConstraint("A");
2046  stringProperty->addConstraint("B");
2047  stringProperty->addConstraint("C");
2048  stringProperty->addConstraint("D");
2049  stringProperty->addConstraint("E");
2050  stringProperty->addConstraint("F");
2051  stringProperty->addConstraint("G");
2052 
2053  property = stringProperty;
2054  }
2055  else if(name == FSSRDT_KW)
2056  {
2057  property = new ossimStringProperty(name,
2058  getSecuritySourceDate().trim());
2059  }
2060  else if(name == FBKGC_KW)
2061  {
2062  ossim_uint8 r, g, b;
2063  getBackgroundColor(r, g, b);
2064 
2065  colorProperty = new ossimColorProperty(name,
2066  ossimRgbVector(r, g, b));
2067 
2068  property = colorProperty;
2069  }
2070  else if(name == ONAME_KW)
2071  {
2072  property = new ossimStringProperty(name, ossimString(theOriginatorsName).trim());
2073  }
2074  else if(name == OPHONE_KW)
2075  {
2076  property = new ossimStringProperty(name, ossimString(theOriginatorsPhone).trim());
2077  }
2078  else
2079  {
2081  }
2082  return property;
2083 }
char theOriginatorsName[25]
Field: ONAME.
virtual ossimString getDowngrade() const
virtual ossimString getClassificationReason() const
static const ossimString FSDCDT_KW
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
static const ossimString FSCLTX_KW
static const ossimString FBKGC_KW
virtual ossimString getSecuritySourceDate() const
static const ossimString FSCATP_KW
char theOriginatorsPhone[19]
Field: OPHONE.
void addConstraint(const ossimString &value)
virtual ossimString getClassificationAuthorityType() const
static const ossimString FSSRDT_KW
virtual ossimString getDowngradingDate() const
static const ossimString ONAME_KW
static const ossimString FSCLSY_KW
Properties of a NITF 2.1 Header file.
virtual ossimString getClassificationText() const
virtual ossimString getSecurityClassificationSys() const
virtual ossimString getDeclassificationDate() const
static const ossimString FSDG_KW
virtual ossimString getDeclassificationExemption() const
static const ossimString FSCRSN_KW
virtual ossimString getDeclassificationType() const
static const ossimString CLEVEL_KW
static const ossimString FSDGDT_KW
static const ossimString OPHONE_KW
virtual void getBackgroundColor(ossim_uint8 &r, ossim_uint8 &g, ossim_uint8 &b) const
static const ossimString FSDCXM_KW
static const ossimString FSDCTP_KW
unsigned char ossim_uint8
ossimString getComplexityLevel() const

◆ getPropertyNames()

void ossimNitfFileHeaderV2_1::getPropertyNames ( std::vector< ossimString > &  propertyNames) const
virtual

Reimplemented from ossimNitfFileHeaderV2_X.

Definition at line 2086 of file ossimNitfFileHeaderV2_1.cpp.

References FBKGC_KW, FSCATP_KW, FSCLSY_KW, FSCLTX_KW, FSCRSN_KW, FSDCDT_KW, FSDCTP_KW, FSDCXM_KW, FSDG_KW, FSDGDT_KW, FSSRDT_KW, and ossimNitfFileHeaderV2_X::getPropertyNames().

2087 {
2089 
2090  propertyNames.push_back(FSCLSY_KW);
2091  propertyNames.push_back(FSDCTP_KW);
2092  propertyNames.push_back(FSDCDT_KW);
2093  propertyNames.push_back(FSDCXM_KW);
2094  propertyNames.push_back(FSDG_KW);
2095  propertyNames.push_back(FSDGDT_KW);
2096  propertyNames.push_back(FSCLTX_KW);
2097  propertyNames.push_back(FSCATP_KW);
2098  propertyNames.push_back(FSCRSN_KW);
2099  propertyNames.push_back(FSSRDT_KW);
2100  propertyNames.push_back(FBKGC_KW);
2101 }
static const ossimString FSDCDT_KW
static const ossimString FSCLTX_KW
static const ossimString FBKGC_KW
static const ossimString FSCATP_KW
static const ossimString FSSRDT_KW
static const ossimString FSCLSY_KW
Properties of a NITF 2.1 Header file.
static const ossimString FSDG_KW
static const ossimString FSCRSN_KW
static const ossimString FSDGDT_KW
static const ossimString FSDCXM_KW
static const ossimString FSDCTP_KW
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const

◆ getReleasingInstructions()

ossimString ossimNitfFileHeaderV2_1::getReleasingInstructions ( ) const
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1392 of file ossimNitfFileHeaderV2_1.cpp.

References theReleasingInstructions.

Referenced by ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1393 {
1394  return theReleasingInstructions;
1395 }
char theReleasingInstructions[21]
Field: FSREL.

◆ getSecurityClassificationSys()

ossimString ossimNitfFileHeaderV2_1::getSecurityClassificationSys ( ) const
virtual

Definition at line 1377 of file ossimNitfFileHeaderV2_1.cpp.

References theSecurityClassificationSys.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1378 {
1380 }
char theSecurityClassificationSys[3]
Field: FSCLSY.

◆ getSecurityControlNumber()

ossimString ossimNitfFileHeaderV2_1::getSecurityControlNumber ( ) const
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1447 of file ossimNitfFileHeaderV2_1.cpp.

References theSecurityControlNumber.

Referenced by ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1448 {
1449  return theSecurityControlNumber;
1450 }
char theSecurityControlNumber[16]
Field: FSCTLN.

◆ getSecuritySourceDate()

ossimString ossimNitfFileHeaderV2_1::getSecuritySourceDate ( ) const
virtual

Definition at line 1442 of file ossimNitfFileHeaderV2_1.cpp.

References theSecuritySourceDate.

Referenced by getProperty(), and ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings().

1443 {
1444  return theSecuritySourceDate;
1445 }
char theSecuritySourceDate[9]
Field: FSSRDT.

◆ getVersion()

const char * ossimNitfFileHeaderV2_1::getVersion ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 941 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfFileHeaderV2_X::theFileTypeVersion.

Referenced by setDeclassificationDate(), setDowngradingDate(), and setSecuritySourceDate().

942 {
943  return &theFileTypeVersion[4];
944 }
char theFileTypeVersion[10]
Field: FHDR Required field for NITF and is a 9 byte value.

◆ initializeAllOffsets()

void ossimNitfFileHeaderV2_1::initializeAllOffsets ( )
private

If the header was parsed this method will initialize the offsets to whare all data resides within the file.

Example: NITF files have several sections (Image, Symbol, Labels, Text and Extended data) and each of these sections have subsections. The offsets stored are just offsets from the start of the file to each major section and eqach subsection.

Definition at line 1261 of file ossimNitfFileHeaderV2_1.cpp.

References theDataExtSegOffsetList, theGraphicOffsetList, theHeaderSize, theImageOffsetList, theNitfDataExtSegInfoRecords, theNitfGraphicInfoRecords, theNitfImageInfoRecords, theNitfTextFileInfoRecords, and theTextFileOffsetList.

Referenced by parseStream().

1262 {
1263  // this will be a running tally
1264  ossim_uint64 tally = theHeaderSize;
1265  ossim_uint64 idx = 0;
1266 
1267  // clear out all offset inforamtion and begin populating them
1268  theImageOffsetList.clear();
1269  theGraphicOffsetList.clear();
1270  theTextFileOffsetList.clear();
1271  theDataExtSegOffsetList.clear();
1272 
1273  for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
1274  {
1276  tally + theNitfImageInfoRecords[idx].getHeaderLength()));
1277  tally += theNitfImageInfoRecords[idx].getTotalLength();
1278  }
1279  for(idx = 0; idx < theNitfGraphicInfoRecords.size(); ++idx)
1280  {
1282  tally + theNitfGraphicInfoRecords[idx].getHeaderLength()));
1283  tally += theNitfGraphicInfoRecords[idx].getTotalLength();
1284  }
1285 
1286  for(idx = 0; idx < theNitfTextFileInfoRecords.size(); ++idx)
1287  {
1289  tally + theNitfTextFileInfoRecords[idx].getHeaderLength()));
1290  tally += theNitfTextFileInfoRecords[idx].getTotalLength();
1291  }
1292 
1293  for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
1294  {
1296  tally + theNitfDataExtSegInfoRecords[idx].getHeaderLength()));
1297  tally += theNitfDataExtSegInfoRecords[idx].getTotalLength();
1298  }
1299 }
std::vector< ossimNitfGraphicOffsetInformation > theGraphicOffsetList
std::vector< ossimNitfTextOffsetInformation > theTextFileOffsetList
std::vector< ossimNitfGraphicInfoRecordV2_1 > theNitfGraphicInfoRecords
This is an optional field and will depend on theNumberOfGraphicInfoRecords.
unsigned long long ossim_uint64
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.
ossim_uint32 theHeaderSize
This is not part of the NITF file header.
std::vector< ossimNitfImageOffsetInformation > theImageOffsetList
This will hold pre-computed offsets to the start of all image headers and start to their data...
std::vector< ossimNitfImageInfoRecordV2_1 > theNitfImageInfoRecords
This information is conditional on the number of image info records field.
std::vector< ossimNitfDataExtSegOffsetInformation > theDataExtSegOffsetList
std::vector< ossimNitfTextFileInfoRecordV2_1 > theNitfTextFileInfoRecords
This information is conditional on the number of text file info records field.

◆ isEncrypted()

bool ossimNitfFileHeaderV2_1::isEncrypted ( ) const
virtual

Implements ossimNitfFileHeader.

Definition at line 907 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfFileHeaderV2_X::theEncryption.

908 {
909  return (theEncryption[0]=='1');
910 }
char theEncryption[2]
Field: ENCRYP.

◆ isValid()

bool ossimNitfFileHeaderV2_1::isValid ( void  ) const
virtual

isValid will test if the fields are valid and will return true or false.

Reimplemented from ossimNitfFileHeaderV2_X.

Definition at line 401 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfFileHeaderV2_X::isValid().

402 {
403  bool result = ossimNitfFileHeaderV2_X::isValid();
404 
405  if(result)
406  {
407 
408  }
409 
410  return result;
411 }
virtual bool isValid() const
isValid will test if the fields are valid and will return true or false.

◆ loadState()

bool ossimNitfFileHeaderV2_1::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to set fields from a keyword list.

This is not a true loadState as it does not lookup/initialize all class members. This was added to allow defaults, e.g OSTAID, to be set via a site configuration file. Code does not return false if a field(key) is not found..

Returns
true if ok or false on error.

Reimplemented from ossimNitfFileHeaderV2_X.

Definition at line 1816 of file ossimNitfFileHeaderV2_1.cpp.

References FBKGC_KW, ossimKeywordlist::find(), FSCATP_KW, FSCLSY_KW, FSCLTX_KW, FSCRSN_KW, FSDCDT_KW, FSDCTP_KW, FSDCXM_KW, FSDG_KW, FSDGDT_KW, FSSRDT_KW, ossimNitfFileHeaderV2_X::loadState(), setClassificationAuthorityType(), setClassificationReason(), setClassificationText(), setDeclassificationDate(), setDeclassificationExemption(), setDeclassificationType(), setDowngrade(), setDowngradingDate(), setFileBackgroundColor(), setSecurityClassificationSys(), setSecuritySourceDate(), ossimString::split(), and ossimString::trim().

1818 {
1819  // Note: Currently not looking up all fieds only ones that make sense.
1820 
1821  const char* lookup;
1822 
1823  lookup = kwl.find( prefix, FSCLSY_KW);
1824  if ( lookup )
1825  {
1827  }
1828  lookup = kwl.find( prefix, FSDCTP_KW);
1829  if ( lookup )
1830  {
1832  }
1833  lookup = kwl.find( prefix, FSDCDT_KW);
1834  if ( lookup )
1835  {
1837  }
1838  lookup = kwl.find( prefix, FSDCXM_KW);
1839  if ( lookup )
1840  {
1842  }
1843  lookup = kwl.find( prefix, FSDG_KW);
1844  if ( lookup )
1845  {
1846  setDowngrade( ossimString(lookup) );
1847  }
1848  lookup = kwl.find( prefix, FSDGDT_KW);
1849  if ( lookup )
1850  {
1851  setDowngradingDate( ossimString(lookup) );
1852  }
1853  lookup = kwl.find( prefix, FSCLTX_KW );
1854  if ( lookup )
1855  {
1857  }
1858  lookup = kwl.find( prefix, FSCATP_KW );
1859  if ( lookup )
1860  {
1862  }
1863  lookup = kwl.find( prefix, FSCRSN_KW );
1864  if ( lookup )
1865  {
1867  }
1868  lookup = kwl.find( prefix, FSSRDT_KW);
1869  if ( lookup )
1870  {
1872  }
1873  lookup = kwl.find( prefix, FBKGC_KW );
1874  if ( lookup )
1875  {
1876  ossimString value = lookup;
1877  std::vector<ossimString> splitString;
1878  value = value.trim();
1879  value.split(splitString, " ");
1880  if(splitString.size() == 3)
1881  {
1882  setFileBackgroundColor((ossim_uint8)splitString[0].toUInt32(),
1883  (ossim_uint8)splitString[1].toUInt32(),
1884  (ossim_uint8)splitString[2].toUInt32());
1885  }
1886  }
1887 
1888  return ossimNitfFileHeaderV2_X::loadState(kwl, prefix);
1889 }
virtual void setDowngradingDate(const ossimLocalTm &date)
static const ossimString FSDCDT_KW
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to set fields from a keyword list.
const char * find(const char *key) const
static const ossimString FSCLTX_KW
static const ossimString FBKGC_KW
virtual void setDeclassificationExemption(const ossimString &exemption)
void split(std::vector< ossimString > &result, const ossimString &separatorList, bool skipBlankFields=false) const
Splits this string into a vector of strings (fields) using the delimiter list specified.
static const ossimString FSCATP_KW
virtual void setDowngrade(const ossimString &downgrade)
static const ossimString FSSRDT_KW
virtual void setDeclassificationType(const ossimString &declassType)
virtual void setClassificationReason(const ossimString &reason)
static const ossimString FSCLSY_KW
Properties of a NITF 2.1 Header file.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
virtual void setClassificationText(const ossimString &classificationText)
static const ossimString FSDG_KW
static const ossimString FSCRSN_KW
virtual void setFileBackgroundColor(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
static const ossimString FSDGDT_KW
virtual void setSecurityClassificationSys(const ossimString &value)
virtual void setClassificationAuthorityType(const ossimString &authorityType)
virtual void setDeclassificationDate(const ossimLocalTm &declassDate)
static const ossimString FSDCXM_KW
static const ossimString FSDCTP_KW
virtual void setSecuritySourceDate(const ossimLocalTm &date)
unsigned char ossim_uint8

◆ parseStream()

void ossimNitfFileHeaderV2_1::parseStream ( ossim::istream in)
virtual

Implements ossimNitfFileHeader.

Definition at line 245 of file ossimNitfFileHeaderV2_1.cpp.

References clearFields(), initializeAllOffsets(), ossimPreferences::instance(), ossimNitfTagInformation::parseStream(), readDataExtSegInfoRecords(), readDes(), readGraphicInfoRecords(), readImageInfoRecords(), readOverflowTags(), readResExtSegInfoRecords(), readTextFileInfoRecords(), ossimNitfTagInformation::setTagType(), theClassificationAuthority, theClassificationAuthorityType, theClassificationReason, theClassificationText, theCodewords, ossimNitfFileHeaderV2_X::theComplexityLevel, theControlAndHandling, ossimNitfFileHeaderV2_X::theCopyNumber, ossimNitfFileHeaderV2_X::theDateTime, theDeclassificationDate, theDeclassificationExemption, theDeclassificationType, theDowngrade, theDowngradingDate, ossimNitfFileHeaderV2_X::theEncryption, theExtendedHeaderDataLength, theExtendedHeaderDataOverflow, theFileBackgroundColor, theFileLength, ossimNitfFileHeaderV2_X::theFileTitle, ossimNitfFileHeaderV2_X::theFileTypeVersion, theHeaderLength, theHeaderSize, ossimNitfFileHeaderV2_X::theNumberOfCopies, theNumberOfDataExtSegInfoRecords, theNumberOfGraphicInfoRecords, theNumberOfImageInfoRecords, theNumberOfResExtSegInfoRecords, theNumberOfTextFileInfoRecords, ossimNitfFileHeaderV2_X::theOriginatingStationId, theOriginatorsName, theOriginatorsPhone, theReleasingInstructions, theReservedForFutureUse1, ossimNitfFileHeaderV2_X::theSecurityClassification, theSecurityClassificationSys, theSecurityControlNumber, theSecuritySourceDate, ossimNitfFileHeaderV2_X::theSystemType, ossimNitfFileHeader::theTagList, theUserDefinedHeaderDataLength, theUserDefinedHeaderOverflow, ossimString::toBool(), and ossimString::toInt32().

246 {
247  clearFields();
248 
249  // identification and origination group
250  in.read(theFileTypeVersion, 9);
251  theHeaderSize += 9;
252  in.read(theComplexityLevel, 2);
253  theHeaderSize += 2;
254  in.read(theSystemType, 4);
255  theHeaderSize += 4;
256  in.read(theOriginatingStationId, 10);
257  theHeaderSize += 10;
258  in.read(theDateTime, 14);
259  theHeaderSize += 14;
260  in.read(theFileTitle, 80);
261  theHeaderSize += 80;
262 
263  // read security group
264  in.read(theSecurityClassification, 1);
265  theHeaderSize ++;
266  in.read(theSecurityClassificationSys, 2);
267  theHeaderSize += 2;
268  in.read(theCodewords, 11);
269  theHeaderSize += 11;
270  in.read(theControlAndHandling, 2);
271  theHeaderSize += 2;
272  in.read(theReleasingInstructions, 20);
273  theHeaderSize += 20;
274  in.read(theDeclassificationType, 2);
275  theHeaderSize += 2;
276  in.read(theDeclassificationDate, 8);
277  theHeaderSize += 8;
278  in.read(theDeclassificationExemption, 4);
279  theHeaderSize += 4;
280 
281  in.read(theDowngrade, 1);
282  theHeaderSize ++;
283  in.read(theDowngradingDate, 8);
284  theHeaderSize += 8;
285  in.read(theClassificationText, 43);
286  theHeaderSize += 43;
287  in.read(theClassificationAuthorityType, 1);
288  theHeaderSize ++;
289  in.read(theClassificationAuthority, 40);
290  theHeaderSize += 40;
291  in.read(theClassificationReason, 1);
292  theHeaderSize ++;
293  in.read(theSecuritySourceDate, 8);
294  theHeaderSize += 8;
295  in.read(theSecurityControlNumber, 15);
296  theHeaderSize += 15;
297  in.read(theCopyNumber, 5);
298  theHeaderSize += 5;
299  in.read(theNumberOfCopies, 5);
300  theHeaderSize += 5;
301  in.read(theEncryption, 1);
302  theHeaderSize ++;
303  in.read((char*)theFileBackgroundColor, 3);
304  theHeaderSize += 3;
305  in.read(theOriginatorsName, 24);
306  theHeaderSize += 24;
307  in.read(theOriginatorsPhone, 18);
308  theHeaderSize += 18;
309  in.read(theFileLength, 12);
310  theHeaderSize += 12;
311  in.read(theHeaderLength, 6);
312  theHeaderSize += 6;
313 
314  // image description group
315  in.read(theNumberOfImageInfoRecords, 3);
316  theHeaderSize += 3;
318 
319  // symbol description group
320  in.read(theNumberOfGraphicInfoRecords, 3);
321  theHeaderSize += 3;
323 
324  in.read(theReservedForFutureUse1, 3);
325  theHeaderSize += 3;
326 
327  // text file information group
328  in.read(theNumberOfTextFileInfoRecords, 3);
329  theHeaderSize += 3;
331 
332  // Data extension group
334  theHeaderSize += 3;
336 
337  // Reserve Extension Segment group
338  in.read(theNumberOfResExtSegInfoRecords, 3);
339  theHeaderSize += 3;
341 
342  in.read(theUserDefinedHeaderDataLength, 5);
343  theHeaderSize += 5;
344 
345  // only get the header overflow if there even exists
346  // user defined data.
347  std::streampos userDefinedHeaderLength = ossimString(theUserDefinedHeaderDataLength).toInt32();
348  ossimNitfTagInformation headerTag;
349  std::streampos start = in.tellg();
350  std::streampos current = in.tellg();
351  if(userDefinedHeaderLength > 0)
352  {
353  in.read(theUserDefinedHeaderOverflow, 3);
354  current = in.tellg();
355 
356  while((current - start) < userDefinedHeaderLength)
357  {
358  headerTag.parseStream(in);
359  headerTag.setTagType("UDHD");
360  theTagList.push_back(headerTag);
361  // in.ignore(headerTag.getTagLength());
362  // headerTag.clearFields();
363  current = in.tellg();
364  }
365  //in.seekg(start + userDefinedHeaderLength);
366  theHeaderSize += (userDefinedHeaderLength);
367  }
368  in.read(theExtendedHeaderDataLength, 5);
369  theHeaderSize += 5;
370  std::streampos extendedHeaderDataLength = ossimString(theExtendedHeaderDataLength).toInt32();
371 
372  start = in.tellg();
373  current = in.tellg();
374  // for now let's just ignore it
375  if(extendedHeaderDataLength > 0)
376  {
377  in.read(theExtendedHeaderDataOverflow, 3);
378  current = in.tellg();
379  while((current - start) < extendedHeaderDataLength)
380  {
381  headerTag.parseStream(in);
382  headerTag.setTagType("XHD");
383  theTagList.push_back(headerTag);
384 
385  // in.ignore(headerTag.getTagLength());
386  // headerTag.clearFields();
387  current = in.tellg();
388  }
389  theHeaderSize += extendedHeaderDataLength;
390  in.seekg(start + extendedHeaderDataLength);
391  }
392 
393  // this need to be re-thought
395  readOverflowTags(in);
396  // custom DES parsers
397  bool parseDes = ossimString(ossimPreferences::instance()->findPreference("des_parser")).toBool();
398  if (parseDes) readDes(in);
399 }
char theReleasingInstructions[21]
Field: FSREL.
void initializeAllOffsets()
If the header was parsed this method will initialize the offsets to whare all data resides within the...
char theComplexityLevel[3]
Field: CLEVEL.
char theClassificationAuthorityType[2]
Field: FSCATP.
char theNumberOfGraphicInfoRecords[4]
Field: NUMS.
char theOriginatingStationId[11]
Field: OSTAID.
ossim_uint8 theFileBackgroundColor[3]
Field: FBKGC.
char theNumberOfResExtSegInfoRecords[4]
Field: NUMRES.
char theReservedForFutureUse1[4]
Field: NUMX.
void readDes(std::istream &in)
char theOriginatorsName[25]
Field: ONAME.
void readOverflowTags(ossim::istream &in)
If the header was parsed and the offsets have been initialized, this method will parse all overflow t...
char theFileTypeVersion[10]
Field: FHDR Required field for NITF and is a 9 byte value.
char theDeclassificationExemption[5]
Field: FSDCXM.
char theClassificationAuthority[41]
Field: FSCAUT.
char theHeaderLength[7]
Field: HL.
virtual void parseStream(ossim::istream &in)
char theNumberOfImageInfoRecords[4]
Field: NUMI.
char theFileLength[13]
Field: FL.
char theControlAndHandling[3]
Field: FSCTLH.
void setTagType(const ossimString &tagType) const
char theDeclassificationType[3]
Field: FSDCTP.
char theOriginatorsPhone[19]
Field: OPHONE.
char theSystemType[5]
Field: STYPE.
char theSecurityClassificationSys[3]
Field: FSCLSY.
char theClassificationReason[2]
Field: FSCRSN.
std::vector< ossimNitfTagInformation > theTagList
char theDowngradingDate[9]
Field: FSDGDT.
ossim_int32 toInt32() const
void readTextFileInfoRecords(ossim::istream &in)
char theCodewords[12]
Field: FSCODE.
char theNumberOfDataExtSegInfoRecords[4]
Field: NUMDES.
char theClassificationText[44]
Field: FSCLTX.
char theEncryption[2]
Field: ENCRYP.
bool toBool() const
String to numeric methods.
char theUserDefinedHeaderOverflow[4]
Field: UDHOFL.
char theDateTime[15]
Field: FDT.
char theExtendedHeaderDataLength[6]
Field: XHDL.
ossim_uint32 theHeaderSize
This is not part of the NITF file header.
static ossimPreferences * instance()
char theSecurityControlNumber[16]
Field: FSCTLN.
void readImageInfoRecords(ossim::istream &in)
void readDataExtSegInfoRecords(ossim::istream &in)
char theUserDefinedHeaderDataLength[6]
Field: UDHDL.
void readResExtSegInfoRecords(ossim::istream &in)
char theCopyNumber[6]
Field: FSCOP.
char theFileTitle[81]
Field: FTITLE.
char theNumberOfTextFileInfoRecords[4]
Field: NUMT.
char theSecuritySourceDate[9]
Field: FSSRDT.
char theSecurityClassification[2]
Field: FSCLAS.
char theNumberOfCopies[6]
Field: FSCOPYS.
char theExtendedHeaderDataOverflow[4]
Field: XHDLOFL.
char theDeclassificationDate[9]
Field: FSDCDT.
char theDowngrade[2]
Field: FSDG.
void readGraphicInfoRecords(ossim::istream &in)

◆ print()

std::ostream & ossimNitfFileHeaderV2_1::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.

Reimplemented from ossimNitfFileHeader.

Definition at line 688 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfFileHeader::print(), theClassificationAuthority, theClassificationAuthorityType, theClassificationReason, theClassificationText, theCodewords, ossimNitfFileHeaderV2_X::theComplexityLevel, theControlAndHandling, ossimNitfFileHeaderV2_X::theCopyNumber, ossimNitfFileHeaderV2_X::theDateTime, theDeclassificationDate, theDeclassificationExemption, theDeclassificationType, ossimNitfFileHeader::theDesList, theDowngrade, theDowngradingDate, ossimNitfFileHeaderV2_X::theEncryption, theExtendedHeaderDataLength, theExtendedHeaderDataOverflow, theFileBackgroundColor, theFileLength, ossimNitfFileHeaderV2_X::theFileTitle, ossimNitfFileHeaderV2_X::theFileTypeVersion, theHeaderLength, theNitfDataExtSegInfoRecords, theNitfGraphicInfoRecords, theNitfImageInfoRecords, theNitfResExtSegInfoRecords, theNitfTextFileInfoRecords, ossimNitfFileHeaderV2_X::theNumberOfCopies, theNumberOfDataExtSegInfoRecords, theNumberOfGraphicInfoRecords, theNumberOfImageInfoRecords, theNumberOfResExtSegInfoRecords, theNumberOfTextFileInfoRecords, ossimNitfFileHeaderV2_X::theOriginatingStationId, theOriginatorsName, theOriginatorsPhone, theReleasingInstructions, theReservedForFutureUse1, ossimNitfFileHeaderV2_X::theSecurityClassification, theSecurityClassificationSys, theSecurityControlNumber, theSecuritySourceDate, ossimNitfFileHeaderV2_X::theSystemType, theUserDefinedHeaderDataLength, and theUserDefinedHeaderOverflow.

690 {
691  out << setiosflags(ios::left)
692  << prefix << std::setw(24) << "FHDR:"
693  << theFileTypeVersion << "\n"
694  << prefix << std::setw(24) << "CLEVEL:"
695  << theComplexityLevel << "\n"
696  << prefix << std::setw(24) << "STYPE:"
697  << theSystemType << "\n"
698  << prefix << std::setw(24) << "OSTAID:"
699  << theOriginatingStationId << "\n"
700  << prefix << std::setw(24) << "FDT:"
701  << theDateTime << "\n"
702  << prefix << std::setw(24) << "FTITLE:"
703  << theFileTitle << "\n"
704  << prefix << std::setw(24) << "FSCLAS:"
705  << theSecurityClassification<< "\n"
706  << prefix << std::setw(24) << "FSCLSY:"
708  << prefix << std::setw(24) << "FSCODE:"
709  << theCodewords << "\n"
710  << prefix << std::setw(24) << "FSCTLH:"
711  << theControlAndHandling << "\n"
712  << prefix << std::setw(24) << "FSREL:"
713  << theReleasingInstructions << "\n"
714  << prefix << std::setw(24) << "FSDCTP:"
715  << theDeclassificationType << "\n"
716  << prefix << std::setw(24) << "FSDCDT:"
717  << theDeclassificationDate << "\n"
718  << prefix << std::setw(24) << "FSDCXM:"
720  << prefix << std::setw(24) << "FSDG:"
721  << theDowngrade << "\n"
722  << prefix << std::setw(24) << "FSDGDT:"
723  << theDowngradingDate << "\n"
724  << prefix << std::setw(24) << "FSCLTX:"
725  << theClassificationText << "\n"
726  << prefix << std::setw(24) << "FSCATP:"
728  << prefix << std::setw(24) << "FSCAUT:"
729  << theClassificationAuthority << "\n"
730  << prefix << std::setw(24) << "FSCRSN:"
731  << theClassificationReason << "\n"
732  << prefix << std::setw(24) << "FSSRDT:"
733  << theSecuritySourceDate << "\n"
734  << prefix << std::setw(24) << "FSCTLN:"
735  << theSecurityControlNumber << "\n"
736  << prefix << std::setw(24) << "FSCOP:"
737  << theCopyNumber << "\n"
738  << prefix << std::setw(24) << "FSCOPYS:"
739  << theNumberOfCopies << "\n"
740  << prefix << std::setw(24) << "ENCRYP:"
741  << theEncryption << "\n"
742  << prefix << std::setw(24) << "FBKGC[0]:"
743  << (int)theFileBackgroundColor[0] << "\n"
744  << prefix << std::setw(24) << "FBKGC[1]:"
745  << (int)theFileBackgroundColor[1] << "\n"
746  << prefix << std::setw(24) << "FBKGC[2]:"
747  << (int)theFileBackgroundColor[2] << "\n"
748  << prefix << std::setw(24) << "ONAME:"
749  << theOriginatorsName<< "\n"
750  << prefix << std::setw(24) << "OPHONE:"
751  << theOriginatorsPhone << "\n"
752  << prefix << std::setw(24) << "FL:"
753  << theFileLength << "\n"
754  << prefix << std::setw(24) << "HL:"
755  << theHeaderLength << "\n"
756  << prefix << std::setw(24) << "NUMI:"
757  << theNumberOfImageInfoRecords << "\n";
758 
759  ossim_uint32 index;
760 
761  for (index = 0; index < theNitfImageInfoRecords.size(); ++index)
762  {
764  os << setw(3) << setfill('0') << (index+1) << ":";
765 
766  ossimString tmpStr = "LISH";
767  tmpStr += os.str();
768 
769  out << prefix << std::setw(24) << tmpStr
770  << theNitfImageInfoRecords[index].theImageSubheaderLength << "\n";
771  tmpStr = "LI";
772  tmpStr += os.str();
773 
774  out << prefix << std::setw(24) << tmpStr
775  << theNitfImageInfoRecords[index].theImageLength << "\n";
776  }
777 
778  out << prefix << std::setw(24) << "NUMS:" << theNumberOfGraphicInfoRecords
779  << "\n";
780 
781  for (index = 0; index < theNitfGraphicInfoRecords.size(); ++index)
782  {
784  os << setw(3) << setfill('0') << (index+1) << ":";
785 
786  ossimString tmpStr = "LSSH";
787  tmpStr += os.str();
788 
789  out << prefix << std::setw(24) << tmpStr
790  << theNitfGraphicInfoRecords[index].theGraphicSubheaderLength
791  << "\n";
792 
793  tmpStr = "LS";
794  tmpStr += os.str();
795 
796  out << prefix << std::setw(24) << tmpStr
797  << theNitfGraphicInfoRecords[index].theGraphicLength
798  << "\n";
799  }
800 
801  out << prefix << std::setw(24) << "NUMX:" << theReservedForFutureUse1 << "\n"
802  << prefix << std::setw(24) << "NUMT:"
804 
805  for (index = 0; index < theNitfTextFileInfoRecords.size(); ++index)
806  {
808  os << setw(3) << setfill('0') << (index+1) << ":";
809 
810  ossimString tmpStr = "LTSH";
811  tmpStr += os.str();
812 
813  out << prefix << std::setw(24) << tmpStr
814  << theNitfTextFileInfoRecords[index].theTextFileSubheaderLength
815  << "\n";
816 
817  tmpStr = "LT";
818  tmpStr += os.str();
819 
820  out << prefix << std::setw(24) << tmpStr
821  << theNitfTextFileInfoRecords[index].theTextFileLength << "\n";
822  }
823 
824  out << prefix << std::setw(24) << "NUMDES:" << theNumberOfDataExtSegInfoRecords
825  << "\n";
826 
827  for (index = 0; index < theNitfDataExtSegInfoRecords.size(); ++index)
828  {
830  os << setw(3) << setfill('0') << (index+1) << ":";
831 
832  ossimString tmpStr = "LDSH";
833  tmpStr += os.str();
834 
835  out << prefix << std::setw(24) << tmpStr
836  << theNitfDataExtSegInfoRecords[index].theDataExtSegSubheaderLength
837  << "\n";
838 
839  tmpStr = "LD";
840  tmpStr += os.str();
841 
842  out << prefix << std::setw(24) << tmpStr
843  << theNitfDataExtSegInfoRecords[index].theDataExtSegLength
844  << "\n";
845  }
846 
847  out << prefix << std::setw(24) << "NUMRES:"
849 
850  for (index = 0; index < theNitfResExtSegInfoRecords.size(); ++index)
851  {
853  os << setw(3) << setfill('0') << (index+1) << ":";
854 
855  ossimString tmpStr = "LRESSH";
856  tmpStr += os.str();
857 
858  out << prefix << std::setw(24) << tmpStr
859  << theNitfResExtSegInfoRecords[index].theResExtSegSubheaderLength
860  << "\n";
861 
862  tmpStr = "LRE";
863  tmpStr += os.str();
864 
865  out << prefix << std::setw(24) << tmpStr
866  << theNitfResExtSegInfoRecords[index].theResExtSegLength
867  << "\n";
868  }
869 
870  out << prefix << std::setw(24) << "UDHDL:"
872  << "\n"
873  << prefix << std::setw(24) << "UDHOFL:"
875  << "\n"
876  << prefix << std::setw(24) << "XHDL:"
878  << "\n"
879  << prefix << std::setw(24) << "XHDLOFL:"
881  << "\n";
882 
883  // Call DES PRINT
884  for (int i=0; i<theDesList.size(); ++i)
885  {
886  theDesList[i].print(out, prefix);
887  }
888 
889  return ossimNitfFileHeader::print(out, prefix);
890 }
char theReleasingInstructions[21]
Field: FSREL.
char theComplexityLevel[3]
Field: CLEVEL.
char theClassificationAuthorityType[2]
Field: FSCATP.
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.
char theNumberOfGraphicInfoRecords[4]
Field: NUMS.
char theOriginatingStationId[11]
Field: OSTAID.
ossim_uint8 theFileBackgroundColor[3]
Field: FBKGC.
char theNumberOfResExtSegInfoRecords[4]
Field: NUMRES.
char theReservedForFutureUse1[4]
Field: NUMX.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theOriginatorsName[25]
Field: ONAME.
char theFileTypeVersion[10]
Field: FHDR Required field for NITF and is a 9 byte value.
char theDeclassificationExemption[5]
Field: FSDCXM.
char theClassificationAuthority[41]
Field: FSCAUT.
char theHeaderLength[7]
Field: HL.
std::vector< ossimNitfDesInformation > theDesList
char theNumberOfImageInfoRecords[4]
Field: NUMI.
char theFileLength[13]
Field: FL.
char theControlAndHandling[3]
Field: FSCTLH.
char theDeclassificationType[3]
Field: FSDCTP.
char theOriginatorsPhone[19]
Field: OPHONE.
char theSystemType[5]
Field: STYPE.
char theSecurityClassificationSys[3]
Field: FSCLSY.
std::vector< ossimNitfGraphicInfoRecordV2_1 > theNitfGraphicInfoRecords
This is an optional field and will depend on theNumberOfGraphicInfoRecords.
char theClassificationReason[2]
Field: FSCRSN.
char theDowngradingDate[9]
Field: FSDGDT.
char theCodewords[12]
Field: FSCODE.
char theNumberOfDataExtSegInfoRecords[4]
Field: NUMDES.
char theClassificationText[44]
Field: FSCLTX.
char theEncryption[2]
Field: ENCRYP.
char theUserDefinedHeaderOverflow[4]
Field: UDHOFL.
unsigned int ossim_uint32
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.
char theDateTime[15]
Field: FDT.
char theExtendedHeaderDataLength[6]
Field: XHDL.
char theSecurityControlNumber[16]
Field: FSCTLN.
std::vector< ossimNitfResExtSegInfoRecordV2_1 > theNitfResExtSegInfoRecords
This information is conditional on the number of Res Ext Seg info records field.
std::vector< ossimNitfImageInfoRecordV2_1 > theNitfImageInfoRecords
This information is conditional on the number of image info records field.
char theUserDefinedHeaderDataLength[6]
Field: UDHDL.
std::vector< ossimNitfTextFileInfoRecordV2_1 > theNitfTextFileInfoRecords
This information is conditional on the number of text file info records field.
char theCopyNumber[6]
Field: FSCOP.
char theFileTitle[81]
Field: FTITLE.
char theNumberOfTextFileInfoRecords[4]
Field: NUMT.
char theSecuritySourceDate[9]
Field: FSSRDT.
char theSecurityClassification[2]
Field: FSCLAS.
char theNumberOfCopies[6]
Field: FSCOPYS.
char theExtendedHeaderDataOverflow[4]
Field: XHDLOFL.
char theDeclassificationDate[9]
Field: FSDCDT.
char theDowngrade[2]
Field: FSDG.

◆ readDataExtSegInfoRecords()

void ossimNitfFileHeaderV2_1::readDataExtSegInfoRecords ( ossim::istream in)
private

Definition at line 1098 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfDataExtSegInfoRecordV2_1::theDataExtSegLength, ossimNitfDataExtSegInfoRecordV2_1::theDataExtSegSubheaderLength, theHeaderSize, theNitfDataExtSegInfoRecords, theNumberOfDataExtSegInfoRecords, and ossimString::toInt32().

Referenced by parseStream().

1099 {
1101  ossim_int32 index;
1102 
1104  for(index=0; index < numberOfDataExtSegs; index++)
1105  {
1107 
1108  in.read(temp.theDataExtSegSubheaderLength, 4);
1109  in.read(temp.theDataExtSegLength, 9);
1110  theHeaderSize += 13;
1111 
1112  temp.theDataExtSegSubheaderLength[4] = '\0';
1113  temp.theDataExtSegLength[9] = '\0';
1114 
1115  theNitfDataExtSegInfoRecords.push_back(temp);
1116  }
1117 }
char theDataExtSegLength[10]
Is a 9 byte numeric 0-999999999.
char theDataExtSegSubheaderLength[5]
Is a 4 byte numeric 200-9999.
ossim_int32 toInt32() const
char theNumberOfDataExtSegInfoRecords[4]
Field: NUMDES.
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.
ossim_uint32 theHeaderSize
This is not part of the NITF file header.
int ossim_int32

◆ readDes()

void ossimNitfFileHeaderV2_1::readDes ( std::istream &  in)
private

Definition at line 448 of file ossimNitfFileHeaderV2_1.cpp.

References getNumberOfDataExtSegments(), ossimNitfDesInformation::parseStream(), ossimIFStream64::seekg64(), theDataExtSegOffsetList, ossimNitfFileHeader::theDesList, and theNitfDataExtSegInfoRecords.

Referenced by parseStream().

449 {
451 
452  for (int i=0; i<getNumberOfDataExtSegments(); ++i)
453  {
454  ossimIFStream64::seekg64(in, theDataExtSegOffsetList[i].theDataExtSegHeaderOffset, ios::beg);
455  des.parseStream(in, theNitfDataExtSegInfoRecords[i].getDataExtSegLength());
456  theDesList.push_back(des);
457 
458  }
459 }
std::vector< ossimNitfDesInformation > theDesList
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.
virtual ossim_int32 getNumberOfDataExtSegments() const
virtual void parseStream(std::istream &in, ossim_uint64 dataLength=0)
void seekg64(off_type off, ios_base::seekdir way)
std::vector< ossimNitfDataExtSegOffsetInformation > theDataExtSegOffsetList

◆ readGraphicInfoRecords()

void ossimNitfFileHeaderV2_1::readGraphicInfoRecords ( ossim::istream in)
private

Definition at line 1054 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfGraphicInfoRecordV2_1::theGraphicLength, ossimNitfGraphicInfoRecordV2_1::theGraphicSubheaderLength, theHeaderSize, theNitfGraphicInfoRecords, theNumberOfGraphicInfoRecords, and ossimString::toInt32().

Referenced by parseStream().

1055 {
1057  ossim_int32 index;
1058 
1059  theNitfGraphicInfoRecords.clear();
1060 
1061  for(index=0; index < numberOfGraphics; index++)
1062  {
1064 
1065 
1066  in.read(temp.theGraphicSubheaderLength, 4);
1067  in.read(temp.theGraphicLength, 6);
1068  theHeaderSize += 10;
1069 
1070  temp.theGraphicSubheaderLength[4] = '\0';
1071  temp.theGraphicLength[6] = '\0';
1072 
1073  theNitfGraphicInfoRecords.push_back(temp);
1074  }
1075 }
char theNumberOfGraphicInfoRecords[4]
Field: NUMS.
std::vector< ossimNitfGraphicInfoRecordV2_1 > theNitfGraphicInfoRecords
This is an optional field and will depend on theNumberOfGraphicInfoRecords.
ossim_int32 toInt32() const
char theGraphicSubheaderLength[5]
Is a 4 byte numeric 0258-9999.
ossim_uint32 theHeaderSize
This is not part of the NITF file header.
char theGraphicLength[7]
Is a 6 byte numeric 0000001-9999999.
int ossim_int32

◆ readImageInfoRecords()

void ossimNitfFileHeaderV2_1::readImageInfoRecords ( ossim::istream in)
private

Definition at line 1032 of file ossimNitfFileHeaderV2_1.cpp.

References theHeaderSize, ossimNitfImageInfoRecordV2_1::theImageLength, ossimNitfImageInfoRecordV2_1::theImageSubheaderLength, theNitfImageInfoRecords, theNumberOfImageInfoRecords, and ossimString::toInt32().

Referenced by parseStream().

1033 {
1035  ossim_int32 index;
1036 
1037  theNitfImageInfoRecords.clear();
1038  for(index=0; index < numberOfImages; index++)
1039  {
1041 
1042 
1043  in.read(temp.theImageSubheaderLength, 6);
1044  in.read(temp.theImageLength, 10);
1045  theHeaderSize += 16;
1046 
1047  temp.theImageSubheaderLength[6] = '\0';
1048  temp.theImageLength[10] = '\0';
1049 
1050  theNitfImageInfoRecords.push_back(temp);
1051  }
1052 }
char theImageLength[11]
Is a 10 byte numeric 0000000001-9999999999.
char theNumberOfImageInfoRecords[4]
Field: NUMI.
ossim_int32 toInt32() const
ossim_uint32 theHeaderSize
This is not part of the NITF file header.
std::vector< ossimNitfImageInfoRecordV2_1 > theNitfImageInfoRecords
This information is conditional on the number of image info records field.
char theImageSubheaderLength[7]
Is a 6 byte numeric 000439-999999.
int ossim_int32

◆ readOverflowTags()

void ossimNitfFileHeaderV2_1::readOverflowTags ( ossim::istream in)
private

If the header was parsed and the offsets have been initialized, this method will parse all overflow tags and put them into theTagList.

Definition at line 413 of file ossimNitfFileHeaderV2_1.cpp.

References getNewDataExtensionSegment(), ossimNitfDataExtensionSegment::getTagList(), theExtendedHeaderDataOverflow, ossimNitfFileHeader::theTagList, theUserDefinedHeaderOverflow, and ossimString::toInt32().

Referenced by parseStream().

414 {
416  if (overflow != 0)
417  {
419  if (des != NULL)
420  {
421  const vector<ossimNitfTagInformation> &desTags = des->getTagList();
422  for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
423  {
424  iter->setTagType("UDHD");
425  theTagList.push_back(*iter);
426  }
427  }
428  delete des;
429  }
430 
432  if (overflow != 0)
433  {
435  if (des != NULL)
436  {
437  const vector<ossimNitfTagInformation> &desTags = des->getTagList();
438  for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
439  {
440  iter->setTagType("XHD");
441  theTagList.push_back(*iter);
442  }
443  }
444  delete des;
445  }
446 }
std::vector< ossimNitfTagInformation > theTagList
ossim_int32 toInt32() const
char theUserDefinedHeaderOverflow[4]
Field: UDHOFL.
virtual const std::vector< ossimNitfTagInformation > & getTagList() const =0
char theExtendedHeaderDataOverflow[4]
Field: XHDLOFL.
virtual ossimNitfDataExtensionSegment * getNewDataExtensionSegment(ossim_int32 dataExtNumber, ossim::istream &in) const
int ossim_int32

◆ readResExtSegInfoRecords()

void ossimNitfFileHeaderV2_1::readResExtSegInfoRecords ( ossim::istream in)
private

Definition at line 1126 of file ossimNitfFileHeaderV2_1.cpp.

References theHeaderSize, theNitfResExtSegInfoRecords, theNumberOfResExtSegInfoRecords, ossimNitfResExtSegInfoRecordV2_1::theResExtSegLength, ossimNitfResExtSegInfoRecordV2_1::theResExtSegSubheaderLength, and ossimString::toInt32().

Referenced by parseStream().

1127 {
1129  ossim_int32 index;
1130 
1132  for(index=0; index < numberOfResExtSegs; index++)
1133  {
1135 
1136  in.read(temp.theResExtSegSubheaderLength, 4);
1137  in.read(temp.theResExtSegLength, 7);
1138  theHeaderSize += 11;
1139 
1140  temp.theResExtSegSubheaderLength[4] = '\0';
1141  temp.theResExtSegLength[7] = '\0';
1142 
1143  theNitfResExtSegInfoRecords.push_back(temp);
1144  }
1145 }
char theNumberOfResExtSegInfoRecords[4]
Field: NUMRES.
char theResExtSegSubheaderLength[5]
Is a 4 byte numeric 0-9999.
ossim_int32 toInt32() const
ossim_uint32 theHeaderSize
This is not part of the NITF file header.
char theResExtSegLength[8]
Is a 7 byte numeric 0-9999999.
std::vector< ossimNitfResExtSegInfoRecordV2_1 > theNitfResExtSegInfoRecords
This information is conditional on the number of Res Ext Seg info records field.
int ossim_int32

◆ readTextFileInfoRecords()

void ossimNitfFileHeaderV2_1::readTextFileInfoRecords ( ossim::istream in)
private

Definition at line 1077 of file ossimNitfFileHeaderV2_1.cpp.

References theHeaderSize, theNitfTextFileInfoRecords, theNumberOfTextFileInfoRecords, ossimNitfTextFileInfoRecordV2_1::theTextFileLength, ossimNitfTextFileInfoRecordV2_1::theTextFileSubheaderLength, and ossimString::toInt32().

Referenced by parseStream().

1078 {
1080  ossim_int32 index;
1081 
1083  for(index=0; index < numberOfTextFiles; index++)
1084  {
1086 
1087  in.read(temp.theTextFileSubheaderLength, 4);
1088  in.read(temp.theTextFileLength, 5);
1089  theHeaderSize += 9;
1090 
1091  temp.theTextFileSubheaderLength[4] = '\0';
1092  temp.theTextFileLength[5] = '\0';
1093 
1094  theNitfTextFileInfoRecords.push_back(temp);
1095  }
1096 }
char theTextFileLength[6]
Is a 5 byte numeric 0-99999.
ossim_int32 toInt32() const
ossim_uint32 theHeaderSize
This is not part of the NITF file header.
char theTextFileSubheaderLength[5]
Is a 4 byte numeric 0282-9999.
std::vector< ossimNitfTextFileInfoRecordV2_1 > theNitfTextFileInfoRecords
This information is conditional on the number of text file info records field.
char theNumberOfTextFileInfoRecords[4]
Field: NUMT.
int ossim_int32

◆ removeTag()

void ossimNitfFileHeaderV2_1::removeTag ( const ossimString tagName)
virtual

Reimplemented from ossimNitfFileHeader.

Definition at line 2112 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfFileHeader::theTagList.

Referenced by addTag(), and takeOverflowTags().

2113 {
2114  ossim_uint32 idx = 0;
2115  for(idx = 0; idx < theTagList.size(); ++idx)
2116  {
2117  if(theTagList[idx].getTagName() == tagName)
2118  {
2119  theTagList.erase(theTagList.begin() + idx);
2120  return;
2121  }
2122  }
2123 }
std::vector< ossimNitfTagInformation > theTagList
unsigned int ossim_uint32

◆ replaceImageInfoRecord()

void ossimNitfFileHeaderV2_1::replaceImageInfoRecord ( int  i,
const ossimNitfImageInfoRecordV2_1 recordInfo 
)
virtual

Definition at line 1243 of file ossimNitfFileHeaderV2_1.cpp.

References theNitfImageInfoRecords.

Referenced by ossimNitfWriter::writeBlockBandSeparate(), and ossimNitfWriter::writeBlockBandSequential().

1244 {
1245  if ( i < static_cast<int>(theNitfImageInfoRecords.size()) )
1246  {
1247  theNitfImageInfoRecords[i] = recordInfo;
1248  }
1249 }
std::vector< ossimNitfImageInfoRecordV2_1 > theNitfImageInfoRecords
This information is conditional on the number of image info records field.

◆ saveState()

bool ossimNitfFileHeaderV2_1::saveState ( ossimKeywordlist kwl,
const ossimString prefix = "" 
) const
virtual

Reimplemented from ossimNitfFileHeader.

Definition at line 1203 of file ossimNitfFileHeaderV2_1.cpp.

References ossimKeywordlist::add(), ossimString::c_str(), FL_KW, FSCATP_KW, ossimNitfFileHeaderV2_X::FSCAUT_KW, FSCLSY_KW, FSCLTX_KW, ossimNitfFileHeaderV2_X::FSCODE_KW, FSCRSN_KW, ossimNitfFileHeaderV2_X::FSCTLH_KW, ossimNitfFileHeaderV2_X::FSCTLN_KW, FSDCDT_KW, FSDCTP_KW, FSDCXM_KW, FSDG_KW, FSDGDT_KW, ossimNitfFileHeaderV2_X::FSREL_KW, FSSRDT_KW, HL_KW, NUMI_KW, ossimNitfFileHeaderV2_X::ONAME_KW, ossimNitfFileHeaderV2_X::OPHONE_KW, ossimNitfFileHeaderV2_X::saveState(), theClassificationAuthorityType, theClassificationReason, theClassificationText, theCodewords, theControlAndHandling, theDeclassificationDate, theDeclassificationExemption, theDeclassificationType, theDowngrade, theDowngradingDate, theFileLength, theHeaderLength, theNumberOfImageInfoRecords, theOriginatorsName, theOriginatorsPhone, theReleasingInstructions, theSecurityClassificationSys, theSecurityControlNumber, and theSecuritySourceDate.

1204 {
1205  bool result = ossimNitfFileHeaderV2_X::saveState(kwl, prefix);
1206 
1207  if(result)
1208  {
1210  kwl.add(prefix, FSCODE_KW.c_str(), theCodewords);
1211  kwl.add(prefix, FSCTLH_KW.c_str(), theControlAndHandling);
1212  kwl.add(prefix, FSREL_KW.c_str(), theReleasingInstructions);
1213  kwl.add(prefix, FSDCTP_KW.c_str(), theDeclassificationType);
1214  kwl.add(prefix, FSDCDT_KW.c_str(), theDeclassificationDate);
1216  kwl.add(prefix, FSDG_KW.c_str(), theDowngrade);
1217  kwl.add(prefix, FSDGDT_KW.c_str(), theDowngradingDate);
1218  kwl.add(prefix, FSCLTX_KW.c_str(), theClassificationText);
1221  kwl.add(prefix, FSCRSN_KW.c_str(), theClassificationReason);
1222  kwl.add(prefix, FSSRDT_KW.c_str(), theSecuritySourceDate);
1223  kwl.add(prefix, FSCTLN_KW.c_str(), theSecurityControlNumber);
1224  //kwl.add(prefix, FBKGC_KW.c_str(), theFileBackgroundColor);
1225  kwl.add(prefix, ONAME_KW.c_str(), theOriginatorsName);
1226  kwl.add(prefix, OPHONE_KW.c_str(), theOriginatorsPhone);
1227  kwl.add(prefix, FL_KW.c_str(), theFileLength);
1228  kwl.add(prefix, HL_KW.c_str(), theHeaderLength);
1229  kwl.add(prefix, NUMI_KW.c_str(), theNumberOfImageInfoRecords);
1230  }
1231 
1232  return result;
1233 }
char theReleasingInstructions[21]
Field: FSREL.
char theClassificationAuthorityType[2]
Field: FSCATP.
char theOriginatorsName[25]
Field: ONAME.
static const ossimString FSREL_KW
static const ossimString FSDCDT_KW
char theDeclassificationExemption[5]
Field: FSDCXM.
char theHeaderLength[7]
Field: HL.
static const ossimString FSCLTX_KW
char theNumberOfImageInfoRecords[4]
Field: NUMI.
char theFileLength[13]
Field: FL.
char theControlAndHandling[3]
Field: FSCTLH.
static const ossimString FSCATP_KW
char theDeclassificationType[3]
Field: FSDCTP.
char theOriginatorsPhone[19]
Field: OPHONE.
char theSecurityClassificationSys[3]
Field: FSCLSY.
const ossimString HL_KW
char theClassificationReason[2]
Field: FSCRSN.
char theDowngradingDate[9]
Field: FSDGDT.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
char theCodewords[12]
Field: FSCODE.
char theClassificationText[44]
Field: FSCLTX.
static const ossimString FSSRDT_KW
static const ossimString ONAME_KW
static const ossimString FSCODE_KW
static const ossimString FSCLSY_KW
Properties of a NITF 2.1 Header file.
static const ossimString FSCAUT_KW
static const ossimString FSDG_KW
static const ossimString FSCRSN_KW
char theSecurityControlNumber[16]
Field: FSCTLN.
static const ossimString FSDGDT_KW
static const ossimString OPHONE_KW
static const ossimString FSCTLH_KW
static const ossimString FSCTLN_KW
const ossimString NUMI_KW
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
char theSecuritySourceDate[9]
Field: FSSRDT.
static const ossimString FSDCXM_KW
static const ossimString FSDCTP_KW
char theDeclassificationDate[9]
Field: FSDCDT.
char theDowngrade[2]
Field: FSDG.
bool saveState(ossimKeywordlist &kwl, const ossimString &prefix="") const
const ossimString FL_KW

◆ setClassificationAuthority()

void ossimNitfFileHeaderV2_1::setClassificationAuthority ( const ossimString authorityType)
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1734 of file ossimNitfFileHeaderV2_1.cpp.

References theClassificationAuthority, and ossimString::trim().

1735 {
1736  std::ostringstream out;
1737 
1738  out << std::setw(40)
1739  << std::setfill(' ')
1740  << std::setiosflags(ios::left)
1741  << authority.trim();
1742 
1743  memcpy(theClassificationAuthority, out.str().c_str(), 40);
1744 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theClassificationAuthority[41]
Field: FSCAUT.

◆ setClassificationAuthorityType()

void ossimNitfFileHeaderV2_1::setClassificationAuthorityType ( const ossimString authorityType)
virtual

Definition at line 1722 of file ossimNitfFileHeaderV2_1.cpp.

References theClassificationAuthorityType, and ossimString::trim().

Referenced by loadState(), and setProperty().

1723 {
1724  std::ostringstream out;
1725 
1726  out << std::setw(1)
1727  << std::setfill(' ')
1728  << std::setiosflags(ios::left)
1729  << authorityType.trim();
1730 
1731  memcpy(theClassificationAuthorityType, out.str().c_str(), 1);
1732 }
char theClassificationAuthorityType[2]
Field: FSCATP.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setClassificationReason()

void ossimNitfFileHeaderV2_1::setClassificationReason ( const ossimString reason)
virtual

Definition at line 1746 of file ossimNitfFileHeaderV2_1.cpp.

References theClassificationReason, and ossimString::trim().

Referenced by loadState(), and setProperty().

1747 {
1748  std::ostringstream out;
1749 
1750  out << std::setw(1)
1751  << std::setfill(' ')
1752  << std::setiosflags(ios::left)
1753  << reason.trim();
1754 
1755  memcpy(theClassificationReason, out.str().c_str(), 1);
1756 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theClassificationReason[2]
Field: FSCRSN.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setClassificationText()

void ossimNitfFileHeaderV2_1::setClassificationText ( const ossimString classificationText)
virtual

Definition at line 1710 of file ossimNitfFileHeaderV2_1.cpp.

References theClassificationText, and ossimString::trim().

Referenced by loadState(), and setProperty().

1711 {
1712  std::ostringstream out;
1713 
1714  out << std::setw(43)
1715  << std::setfill(' ')
1716  << std::setiosflags(ios::left)
1717  << classificationText.trim();
1718 
1719  memcpy(theClassificationText, out.str().c_str(), 43);
1720 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theClassificationText[44]
Field: FSCLTX.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setCodeWords()

void ossimNitfFileHeaderV2_1::setCodeWords ( const ossimString codeWords)
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1612 of file ossimNitfFileHeaderV2_1.cpp.

References theCodewords, and ossimString::trim().

1613 {
1614  std::ostringstream out;
1615 
1616  out << std::setw(11)
1617  << std::setfill(' ')
1618  << std::setiosflags(ios::left)
1619  << ossimString(codeWords).trim();
1620 
1621  memcpy(theCodewords, out.str().c_str(), 11);
1622 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theCodewords[12]
Field: FSCODE.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setControlAndHandling()

void ossimNitfFileHeaderV2_1::setControlAndHandling ( const ossimString controlAndHandling)
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1624 of file ossimNitfFileHeaderV2_1.cpp.

References theControlAndHandling, and ossimString::trim().

1625 {
1626  std::ostringstream out;
1627 
1628  out << std::setw(2)
1629  << std::setfill(' ')
1630  << std::setiosflags(ios::left)
1631  << ossimString(controlAndHandling).trim();
1632 
1633  memcpy(theControlAndHandling, out.str().c_str(), 2);
1634 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theControlAndHandling[3]
Field: FSCTLH.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setDeclassificationDate() [1/2]

void ossimNitfFileHeaderV2_1::setDeclassificationDate ( const ossimLocalTm declassDate)
virtual

Definition at line 1660 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfFileHeaderV2_X::formatDate(), getVersion(), and theDeclassificationDate.

Referenced by loadState(), and setProperty().

1661 {
1662  memcpy(theDeclassificationDate, formatDate(getVersion(), d).c_str(), 8);
1663 }
virtual const char * getVersion() const
static ossimString formatDate(const ossimString &version, const ossimLocalTm &d)
char theDeclassificationDate[9]
Field: FSDCDT.

◆ setDeclassificationDate() [2/2]

void ossimNitfFileHeaderV2_1::setDeclassificationDate ( const ossimString declassDate)
virtual

Definition at line 1665 of file ossimNitfFileHeaderV2_1.cpp.

References ossimString::c_str(), ossimString::size(), and theDeclassificationDate.

1666 {
1667  if(d.size() >=8)
1668  {
1669  memcpy(theDeclassificationDate, d.c_str(), 8);
1670  }
1671 }
char theDeclassificationDate[9]
Field: FSDCDT.

◆ setDeclassificationExemption()

void ossimNitfFileHeaderV2_1::setDeclassificationExemption ( const ossimString exemption)
virtual

Definition at line 1673 of file ossimNitfFileHeaderV2_1.cpp.

References theDeclassificationExemption, and ossimString::trim().

Referenced by loadState(), and setProperty().

1674 {
1675  std::ostringstream out;
1676 
1677  out << std::setw(4)
1678  << std::setfill(' ')
1679  << std::setiosflags(ios::left)
1680  << exemption.trim();
1681 
1682  memcpy(theDeclassificationExemption, out.str().c_str(), 4);
1683 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theDeclassificationExemption[5]
Field: FSDCXM.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setDeclassificationType()

void ossimNitfFileHeaderV2_1::setDeclassificationType ( const ossimString declassType)
virtual

Definition at line 1648 of file ossimNitfFileHeaderV2_1.cpp.

References theDeclassificationType, and ossimString::trim().

Referenced by loadState(), and setProperty().

1649 {
1650  std::ostringstream out;
1651 
1652  out << std::setw(2)
1653  << std::setfill(' ')
1654  << std::setiosflags(ios::left)
1655  << declassType.trim();
1656 
1657  memcpy(theDeclassificationType, out.str().c_str(), 2);
1658 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theDeclassificationType[3]
Field: FSDCTP.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setDowngrade()

void ossimNitfFileHeaderV2_1::setDowngrade ( const ossimString downgrade)
virtual

Definition at line 1685 of file ossimNitfFileHeaderV2_1.cpp.

References theDowngrade, and ossimString::trim().

Referenced by loadState(), and setProperty().

1686 {
1687  std::ostringstream out;
1688 
1689  out << std::setw(1)
1690  << std::setfill(' ')
1691  << std::setiosflags(ios::left)
1692  << downgrade.trim();
1693 
1694  memcpy(theDowngrade, out.str().c_str(), 1);
1695 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
char theDowngrade[2]
Field: FSDG.

◆ setDowngradingDate() [1/2]

void ossimNitfFileHeaderV2_1::setDowngradingDate ( const ossimLocalTm date)
virtual

Definition at line 1697 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfFileHeaderV2_X::formatDate(), getVersion(), and theDowngradingDate.

Referenced by loadState(), and setProperty().

1698 {
1699  memcpy(theDowngradingDate, formatDate(getVersion(), d).c_str(), 8);
1700 }
virtual const char * getVersion() const
char theDowngradingDate[9]
Field: FSDGDT.
static ossimString formatDate(const ossimString &version, const ossimLocalTm &d)

◆ setDowngradingDate() [2/2]

void ossimNitfFileHeaderV2_1::setDowngradingDate ( const ossimString date)
virtual

Definition at line 1702 of file ossimNitfFileHeaderV2_1.cpp.

References ossimString::c_str(), ossimString::size(), and theDowngradingDate.

1703 {
1704  if(d.size() >=8)
1705  {
1706  memcpy(theDowngradingDate, d.c_str(), 8);
1707  }
1708 }
char theDowngradingDate[9]
Field: FSDGDT.

◆ setFileBackgroundColor()

void ossimNitfFileHeaderV2_1::setFileBackgroundColor ( ossim_uint8  r,
ossim_uint8  g,
ossim_uint8  b 
)
virtual

Definition at line 1783 of file ossimNitfFileHeaderV2_1.cpp.

References theFileBackgroundColor.

Referenced by loadState(), and setProperty().

1786 {
1787  theFileBackgroundColor[0] = r;
1788  theFileBackgroundColor[1] = g;
1789  theFileBackgroundColor[2] = b;
1790 }
ossim_uint8 theFileBackgroundColor[3]
Field: FBKGC.

◆ setFileLength()

void ossimNitfFileHeaderV2_1::setFileLength ( ossim_uint64  fileLength)
virtual

Sets file length (FL) field.

Implements ossimNitfFileHeader.

Definition at line 1471 of file ossimNitfFileHeaderV2_1.cpp.

References theFileLength.

Referenced by ossimNitfWriter::writeBlockBandSeparate(), and ossimNitfWriter::writeBlockBandSequential().

1472 {
1473  std::ostringstream out;
1474 
1475  out << std::setw(12)
1476  << std::setfill('0')
1477  << std::setiosflags(ios::right)
1478  << fileLength;
1479 
1480  memcpy(theFileLength, out.str().c_str(), 12);
1481 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theFileLength[13]
Field: FL.

◆ setHeaderLength()

void ossimNitfFileHeaderV2_1::setHeaderLength ( ossim_uint64  headerLength)
virtual

Sets header length (HL) field.

Implements ossimNitfFileHeader.

Definition at line 1588 of file ossimNitfFileHeaderV2_1.cpp.

References theHeaderLength.

Referenced by ossimNitfWriter::writeBlockBandSeparate(), and ossimNitfWriter::writeBlockBandSequential().

1589 {
1590  std::ostringstream out;
1591 
1592  out << std::setw(6)
1593  << std::setfill('0')
1594  << std::setiosflags(ios::right)
1595  << headerLength;
1596 
1597  memcpy(theHeaderLength, out.str().c_str(), 6);
1598 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theHeaderLength[7]
Field: HL.

◆ setNumberOfDataExtSegInfoRecords()

void ossimNitfFileHeaderV2_1::setNumberOfDataExtSegInfoRecords ( ossim_uint64  num)
private

Definition at line 1511 of file ossimNitfFileHeaderV2_1.cpp.

References theNumberOfDataExtSegInfoRecords.

Referenced by addDataExtSegInfoRecord(), and deleteLastDataExtSegInfoRecord().

1512 {
1513  if (num < 1000)
1514  {
1515  std::ostringstream out;
1516 
1517  out << std::setw(3)
1518  << std::setfill('0')
1519  << std::setiosflags(ios::right)
1520  << num;
1521 
1522  memcpy(theNumberOfDataExtSegInfoRecords, out.str().c_str(), 3);
1523  }
1524  else
1525  {
1526  std::string s = "ossimNitfFileHeaderV2_1::setNumberOfDataExtSegInfoRecords:";
1527  s += " ERROR\nExceeded max number of 999!";
1528  if (traceDebug())
1529  {
1530  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1531  }
1532  throw std::out_of_range(s);
1533  }
1534 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theNumberOfDataExtSegInfoRecords[4]
Field: NUMDES.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ setNumberOfGraphicInfoRecords()

void ossimNitfFileHeaderV2_1::setNumberOfGraphicInfoRecords ( ossim_uint64  num)
private

Definition at line 1485 of file ossimNitfFileHeaderV2_1.cpp.

References theNumberOfGraphicInfoRecords.

1486  {
1487  if (num < 1000)
1488  {
1489  std::ostringstream out;
1490 
1491  out << std::setw(3)
1492  << std::setfill('0')
1493  << std::setiosflags(ios::right)
1494  << num;
1495 
1496  memcpy(theNumberOfGraphicInfoRecords, out.str().c_str(), 3);
1497  }
1498  else
1499  {
1500  std::string s = "ossimNitfFileHeaderV2_1::setNumberOfGraphicInfoRecords:";
1501  s += " ERROR\nExceeded max number of 999!";
1502  if (traceDebug())
1503  {
1504  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1505  }
1506  throw std::out_of_range(s);
1507  }
1508 
1509  }
char theNumberOfGraphicInfoRecords[4]
Field: NUMS.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ setNumberOfImageInfoRecords()

void ossimNitfFileHeaderV2_1::setNumberOfImageInfoRecords ( ossim_uint64  num)
private

Sets the number of image records in the NITF 2.1 File Header.

Parameters
numThe number of image records for the entire NITF 2.1 file.
Exceptions
std::out_of_range

Definition at line 1563 of file ossimNitfFileHeaderV2_1.cpp.

References theNumberOfImageInfoRecords.

Referenced by addImageInfoRecord(), and deleteLastImageInfoRecord().

1564 {
1565  if (num < 1000)
1566  {
1567  std::ostringstream out;
1568 
1569  out << std::setw(3)
1570  << std::setfill('0')
1571  << std::setiosflags(ios::right)
1572  << num;
1573 
1574  memcpy(theNumberOfImageInfoRecords, out.str().c_str(), 3);
1575  }
1576  else
1577  {
1578  std::string s = "ossimNitfFileHeaderV2_1::setNumberOfImageInfoRecords:";
1579  s += " ERROR\nExceeded max image info number of 999!";
1580  if (traceDebug())
1581  {
1582  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1583  }
1584  throw std::out_of_range(s);
1585  }
1586 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theNumberOfImageInfoRecords[4]
Field: NUMI.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ setNumberOfTextInfoRecords()

void ossimNitfFileHeaderV2_1::setNumberOfTextInfoRecords ( ossim_uint64  num)
private

Definition at line 1537 of file ossimNitfFileHeaderV2_1.cpp.

References theNumberOfTextFileInfoRecords.

Referenced by addTextInfoRecord().

1538 {
1539  if (num < 1000)
1540  {
1541  std::ostringstream out;
1542 
1543  out << std::setw(3)
1544  << std::setfill('0')
1545  << std::setiosflags(ios::right)
1546  << num;
1547 
1548  memcpy(theNumberOfTextFileInfoRecords, out.str().c_str(), 3);
1549  }
1550  else
1551  {
1552  std::string s = "ossimNitfFileHeaderV2_1::setNumberOfTextRecords:";
1553  s += " ERROR\nExceeded max number of 999!";
1554  if (traceDebug())
1555  {
1556  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1557  }
1558  throw std::out_of_range(s);
1559  }
1560 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theNumberOfTextFileInfoRecords[4]
Field: NUMT.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ setOriginatorsName()

void ossimNitfFileHeaderV2_1::setOriginatorsName ( const ossimString name)
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1792 of file ossimNitfFileHeaderV2_1.cpp.

References theOriginatorsName, and ossimString::trim().

1793 {
1794  std::ostringstream out;
1795 
1796  out << std::setw(24)
1797  << std::setfill(' ')
1798  << std::setiosflags(ios::left)
1799  << name.trim();
1800 
1801  memcpy(theOriginatorsName, out.str().c_str(), 24);
1802 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theOriginatorsName[25]
Field: ONAME.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setOriginatorsPhone()

void ossimNitfFileHeaderV2_1::setOriginatorsPhone ( const ossimString phone)
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1804 of file ossimNitfFileHeaderV2_1.cpp.

References theOriginatorsPhone, and ossimString::trim().

1805 {
1806  std::ostringstream out;
1807 
1808  out << std::setw(18)
1809  << std::setfill(' ')
1810  << std::setiosflags(ios::left)
1811  << phone.trim();
1812 
1813  memcpy(theOriginatorsPhone, out.str().c_str(), 18);
1814 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theOriginatorsPhone[19]
Field: OPHONE.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setProperty()

void ossimNitfFileHeaderV2_1::setProperty ( ossimRefPtr< ossimProperty property)
virtual

Reimplemented from ossimNitfFileHeaderV2_X.

Definition at line 1891 of file ossimNitfFileHeaderV2_1.cpp.

References FBKGC_KW, FSCATP_KW, FSCLSY_KW, FSCLTX_KW, FSCRSN_KW, FSDCDT_KW, FSDCTP_KW, FSDCXM_KW, FSDG_KW, FSDGDT_KW, FSSRDT_KW, ossimRefPtr< T >::get(), ossimColorProperty::getBlue(), ossimColorProperty::getGreen(), ossimColorProperty::getRed(), PTR_CAST, setClassificationAuthorityType(), setClassificationReason(), setClassificationText(), setDeclassificationDate(), setDeclassificationExemption(), setDeclassificationType(), setDowngrade(), setDowngradingDate(), setFileBackgroundColor(), ossimNitfFileHeaderV2_X::setProperty(), setSecurityClassificationSys(), setSecuritySourceDate(), ossimString::split(), ossimString::trim(), ossimString::upcase(), ossimRefPtr< T >::valid(), and ossimProperty::valueToString().

1892 {
1893  if(!property.valid()) return;
1894 
1895  ossimString name = property->getName();
1896 
1897  // Make case insensitive:
1898  name.upcase();
1899 
1900  if(name == FSCLSY_KW)
1901  {
1903  }
1904  else if(name == FSDCTP_KW)
1905  {
1907  }
1908  else if(name == FSDCDT_KW)
1909  {
1911  }
1912  else if(name == FSDCXM_KW)
1913  {
1915  }
1916  else if(name == FSDG_KW)
1917  {
1918  setDowngrade(property->valueToString());
1919  }
1920  else if(name == FSDGDT_KW)
1921  {
1922  setDowngradingDate(property->valueToString());
1923  }
1924  else if(name == FSCLTX_KW)
1925  {
1926  setClassificationText(property->valueToString());
1927  }
1928  else if(name == FSCATP_KW)
1929  {
1931  }
1932  else if(name == FSCRSN_KW)
1933  {
1935  }
1936  else if(name == FSSRDT_KW)
1937  {
1938  setSecuritySourceDate(property->valueToString());
1939  }
1940  else if(name == FBKGC_KW)
1941  {
1942  ossimColorProperty* colorProp = PTR_CAST(ossimColorProperty, property.get());
1943  if (colorProp)
1944  {
1945  ossim_uint8 r = colorProp->getRed();
1946  ossim_uint8 g = colorProp->getGreen();
1947  ossim_uint8 b = colorProp->getBlue();
1948 
1949  setFileBackgroundColor(r, g, b);
1950  }
1951  else
1952  {
1953  ossimString value = property->valueToString();
1954  std::vector<ossimString> splitString;
1955  value = value.trim();
1956  value.split(splitString, " ");
1957  if(splitString.size() == 3)
1958  {
1959  setFileBackgroundColor((ossim_uint8)splitString[0].toUInt32(),
1960  (ossim_uint8)splitString[1].toUInt32(),
1961  (ossim_uint8)splitString[2].toUInt32());
1962  }
1963  }
1964 
1965  }
1966  else
1967  {
1969  }
1970 }
virtual void valueToString(ossimString &valueResult) const =0
virtual void setDowngradingDate(const ossimLocalTm &date)
static ossimString upcase(const ossimString &aString)
Definition: ossimString.cpp:34
static const ossimString FSDCDT_KW
bool valid() const
Definition: ossimRefPtr.h:75
static const ossimString FSCLTX_KW
static const ossimString FBKGC_KW
virtual void setDeclassificationExemption(const ossimString &exemption)
void split(std::vector< ossimString > &result, const ossimString &separatorList, bool skipBlankFields=false) const
Splits this string into a vector of strings (fields) using the delimiter list specified.
static const ossimString FSCATP_KW
virtual void setDowngrade(const ossimString &downgrade)
static const ossimString FSSRDT_KW
virtual void setDeclassificationType(const ossimString &declassType)
virtual void setClassificationReason(const ossimString &reason)
static const ossimString FSCLSY_KW
Properties of a NITF 2.1 Header file.
ossim_uint8 getRed() const
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
ossim_uint8 getGreen() const
virtual void setClassificationText(const ossimString &classificationText)
static const ossimString FSDG_KW
static const ossimString FSCRSN_KW
virtual void setFileBackgroundColor(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
static const ossimString FSDGDT_KW
virtual void setSecurityClassificationSys(const ossimString &value)
virtual void setClassificationAuthorityType(const ossimString &authorityType)
virtual void setDeclassificationDate(const ossimLocalTm &declassDate)
static const ossimString FSDCXM_KW
static const ossimString FSDCTP_KW
virtual void setSecuritySourceDate(const ossimLocalTm &date)
unsigned char ossim_uint8
virtual void setProperty(ossimRefPtr< ossimProperty > property)
ossim_uint8 getBlue() const

◆ setReleasingInstructions()

void ossimNitfFileHeaderV2_1::setReleasingInstructions ( const ossimString releasingInstructions)
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1636 of file ossimNitfFileHeaderV2_1.cpp.

References theReleasingInstructions, and ossimString::trim().

1637 {
1638  std::ostringstream out;
1639 
1640  out << std::setw(20)
1641  << std::setfill(' ')
1642  << std::setiosflags(ios::left)
1643  << ossimString(releasingInstructions).trim();
1644 
1645  memcpy(theReleasingInstructions, out.str().c_str(), 20);
1646 }
char theReleasingInstructions[21]
Field: FSREL.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setSecurityClassificationSys()

void ossimNitfFileHeaderV2_1::setSecurityClassificationSys ( const ossimString value)
virtual

Definition at line 1600 of file ossimNitfFileHeaderV2_1.cpp.

References theSecurityClassificationSys, and ossimString::trim().

Referenced by loadState(), and setProperty().

1601 {
1602  std::ostringstream out;
1603 
1604  out << std::setw(2)
1605  << std::setfill(' ')
1606  << std::setiosflags(ios::left)
1607  << ossimString(value).trim();
1608 
1609  memcpy(theSecurityClassificationSys, out.str().c_str(), 2);
1610 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theSecurityClassificationSys[3]
Field: FSCLSY.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ setSecurityControlNumber()

void ossimNitfFileHeaderV2_1::setSecurityControlNumber ( const ossimString number)
virtual

Implements ossimNitfFileHeaderV2_X.

Definition at line 1771 of file ossimNitfFileHeaderV2_1.cpp.

References theSecurityControlNumber, and ossimString::trim().

1772 {
1773  std::ostringstream out;
1774 
1775  out << std::setw(15)
1776  << std::setfill(' ')
1777  << std::setiosflags(ios::left)
1778  << number.trim();
1779 
1780  memcpy(theSecurityControlNumber, out.str().c_str(), 15);
1781 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
char theSecurityControlNumber[16]
Field: FSCTLN.

◆ setSecuritySourceDate() [1/2]

void ossimNitfFileHeaderV2_1::setSecuritySourceDate ( const ossimLocalTm date)
virtual

Definition at line 1758 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNitfFileHeaderV2_X::formatDate(), getVersion(), and theSecuritySourceDate.

Referenced by loadState(), and setProperty().

1759 {
1760  memcpy(theSecuritySourceDate, formatDate(getVersion(), d).c_str(), 8);
1761 }
virtual const char * getVersion() const
static ossimString formatDate(const ossimString &version, const ossimLocalTm &d)
char theSecuritySourceDate[9]
Field: FSSRDT.

◆ setSecuritySourceDate() [2/2]

void ossimNitfFileHeaderV2_1::setSecuritySourceDate ( const ossimString date)
virtual

Definition at line 1763 of file ossimNitfFileHeaderV2_1.cpp.

References ossimString::c_str(), ossimString::size(), and theSecuritySourceDate.

1764 {
1765  if(d.size() >=8)
1766  {
1767  memcpy(theSecuritySourceDate, d.c_str(), 8);
1768  }
1769 }
char theSecuritySourceDate[9]
Field: FSSRDT.

◆ takeOverflowTags()

bool ossimNitfFileHeaderV2_1::takeOverflowTags ( std::vector< ossimNitfTagInformation > &  overflowTags,
ossim_uint32  potentialDesIndex,
bool  userDefinedTags = false 
)

Definition at line 2125 of file ossimNitfFileHeaderV2_1.cpp.

References removeTag(), theExtendedHeaderDataLength, theExtendedHeaderDataOverflow, ossimNitfFileHeader::theTagList, theUserDefinedHeaderDataLength, and theUserDefinedHeaderOverflow.

Referenced by ossimNitfWriter::takeOverflowTags().

2127 {
2128  overflowTags.clear();
2129  std::vector<ossimNitfTagInformation>::iterator iter;
2130  std::vector<ossimNitfTagInformation> specifiedTags;
2131  const ossimString tagType(userDefinedTags ? "UDHD" : "XHD");
2132  for (iter = theTagList.begin(); iter != theTagList.end(); ++iter)
2133  {
2134  if (iter->getTagType() == tagType)
2135  {
2136  specifiedTags.push_back(*iter);
2137  }
2138  }
2139 
2140  std::sort(specifiedTags.begin(), specifiedTags.end());
2141 
2142  ossim_uint32 totalSize = 0;
2143  const ossim_uint32 maxSize = 9996;
2144  for (iter = specifiedTags.begin(); iter != specifiedTags.end() &&
2145  totalSize + iter->getTotalTagLength() <= maxSize; ++iter)
2146  {
2147  totalSize += iter->getTotalTagLength();
2148  }
2149 
2150  for (; iter != specifiedTags.end(); ++iter)
2151  {
2152  overflowTags.push_back(*iter);
2153  removeTag(iter->getTagName());
2154  }
2155 
2156  // If there are no overflow tags, then no DES is required
2157  if (overflowTags.empty() == true)
2158  {
2159  potentialDesIndex = 0;
2160  }
2161 
2162  std::ostringstream overflowDes;
2163  overflowDes << std::setw(3)
2164  << std::setfill('0')
2165  << std::setiosflags(ios::right)
2166  << potentialDesIndex;
2167 
2168  std::ostringstream tagLength;
2169  tagLength << std::setw(5)
2170  << std::setfill('0')
2171  << std::setiosflags(ios::right)
2172  << totalSize;
2173 
2174  // Even if no overflow tags exist, update the fields
2175  if (userDefinedTags)
2176  {
2177  strcpy(theUserDefinedHeaderOverflow, overflowDes.str().c_str());
2178  strcpy(theUserDefinedHeaderDataLength, tagLength.str().c_str());
2179  }
2180  else
2181  {
2182  strcpy(theExtendedHeaderDataOverflow, overflowDes.str().c_str());
2183  strcpy(theExtendedHeaderDataLength, tagLength.str().c_str());
2184  }
2185 
2186  return (overflowTags.empty() == false);
2187 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
std::vector< ossimNitfTagInformation > theTagList
void removeTag(const ossimString &tagName)
char theUserDefinedHeaderOverflow[4]
Field: UDHOFL.
unsigned int ossim_uint32
char theExtendedHeaderDataLength[6]
Field: XHDL.
char theUserDefinedHeaderDataLength[6]
Field: UDHDL.
char theExtendedHeaderDataOverflow[4]
Field: XHDLOFL.

◆ writeStream()

void ossimNitfFileHeaderV2_1::writeStream ( ossim::ostream out)
virtual

Implements ossimNitfFileHeader.

Definition at line 461 of file ossimNitfFileHeaderV2_1.cpp.

References ossimNotify(), ossimNotifyLevel_WARN, theClassificationAuthority, theClassificationAuthorityType, theClassificationReason, theClassificationText, theCodewords, ossimNitfFileHeaderV2_X::theComplexityLevel, theControlAndHandling, ossimNitfFileHeaderV2_X::theCopyNumber, ossimNitfFileHeaderV2_X::theDateTime, theDeclassificationDate, theDeclassificationExemption, theDeclassificationType, theDowngrade, theDowngradingDate, ossimNitfFileHeaderV2_X::theEncryption, theExtendedHeaderDataLength, theExtendedHeaderDataOverflow, theFileBackgroundColor, theFileLength, ossimNitfFileHeaderV2_X::theFileTitle, ossimNitfFileHeaderV2_X::theFileTypeVersion, theHeaderLength, theNitfDataExtSegInfoRecords, theNitfGraphicInfoRecords, theNitfImageInfoRecords, theNitfResExtSegInfoRecords, theNitfTextFileInfoRecords, ossimNitfFileHeaderV2_X::theNumberOfCopies, ossimNitfFileHeaderV2_X::theOriginatingStationId, theOriginatorsName, theOriginatorsPhone, theReleasingInstructions, theReservedForFutureUse1, ossimNitfFileHeaderV2_X::theSecurityClassification, theSecurityClassificationSys, theSecurityControlNumber, theSecuritySourceDate, ossimNitfFileHeaderV2_X::theSystemType, ossimNitfFileHeader::theTagList, theUserDefinedHeaderDataLength, theUserDefinedHeaderOverflow, and ossimString::toUInt32().

Referenced by ossimNitfWriter::writeBlockBandSeparate(), and ossimNitfWriter::writeBlockBandSequential().

462 {
463  out.write(theFileTypeVersion, 9);
464  out.write(theComplexityLevel, 2);
465  out.write(theSystemType, 4);
466  out.write(theOriginatingStationId, 10);
467  out.write(theDateTime, 14);
468  out.write(theFileTitle, 80);
469  out.write(theSecurityClassification, 1);
470  out.write(theSecurityClassificationSys, 2);
471  out.write(theCodewords, 11);
472  out.write(theControlAndHandling, 2);
473  out.write(theReleasingInstructions, 20);
474  out.write(theDeclassificationType, 2);
475  out.write(theDeclassificationDate, 8);
476  out.write(theDeclassificationExemption, 4);
477  out.write(theDowngrade, 1);
478  out.write(theDowngradingDate, 8);
479  out.write(theClassificationText, 43);
480  out.write(theClassificationAuthorityType, 1);
481  out.write(theClassificationAuthority, 40);
482  out.write(theClassificationReason, 1);
483  out.write(theSecuritySourceDate, 8);
484  out.write(theSecurityControlNumber, 15);
485  out.write(theCopyNumber, 5);
486  out.write(theNumberOfCopies, 5);
487  out.write(theEncryption, 1);
488  out.write((char*)theFileBackgroundColor, 3);
489  out.write(theOriginatorsName, 24);
490  out.write(theOriginatorsPhone, 18);
491  out.write(theFileLength, 12);
492  out.write(theHeaderLength, 6);
493  ossim_uint32 idx = 0;
494  {
495  std::ostringstream outString;
496 
497  outString << std::setw(3)
498  << std::setfill('0')
499  << std::setiosflags(ios::right)
500  << theNitfImageInfoRecords.size();
501 
502  out.write(outString.str().c_str(), 3);
503 
504  for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
505  {
506  out.write(theNitfImageInfoRecords[idx].theImageSubheaderLength, 6);
507  out.write(theNitfImageInfoRecords[idx].theImageLength, 10);
508  }
509  }
510  {
511  std::ostringstream outString;
512 
513  outString << std::setw(3)
514  << std::setfill('0')
515  << std::setiosflags(ios::right)
516  << theNitfGraphicInfoRecords.size();
517 
518  out.write(outString.str().c_str(), 3);
519  for(idx = 0; idx < theNitfGraphicInfoRecords.size(); ++idx)
520  {
521  out.write(theNitfGraphicInfoRecords[idx].theGraphicSubheaderLength, 4);
522  out.write(theNitfGraphicInfoRecords[idx].theGraphicLength, 6);
523  }
524  }
525  out.write(theReservedForFutureUse1, 3);
526  {
527  std::ostringstream outString;
528 
529  outString << std::setw(3)
530  << std::setfill('0')
531  << std::setiosflags(ios::right)
532  << theNitfTextFileInfoRecords.size();
533 
534  out.write(outString.str().c_str(), 3);
535  for(idx = 0; idx < theNitfTextFileInfoRecords.size(); ++idx)
536  {
537  out.write(theNitfTextFileInfoRecords[idx].theTextFileSubheaderLength, 4);
538  out.write(theNitfTextFileInfoRecords[idx].theTextFileLength, 5);
539  }
540  }
541  {
542  std::ostringstream outString;
543 
544  outString << std::setw(3)
545  << std::setfill('0')
546  << std::setiosflags(ios::right)
548 
549  out.write(outString.str().c_str(), 3);
550  for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
551  {
552  out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegSubheaderLength, 4);
553  out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegLength, 9);
554  }
555  }
556  {
557  std::ostringstream outString;
558 
559  outString << std::setw(3)
560  << std::setfill('0')
561  << std::setiosflags(ios::right)
562  << theNitfResExtSegInfoRecords.size();
563 
564  out.write(outString.str().c_str(), 3);
565  for(idx = 0; idx < theNitfResExtSegInfoRecords.size(); ++idx)
566  {
567  out.write(theNitfResExtSegInfoRecords[idx].theResExtSegSubheaderLength, 4);
568  out.write(theNitfResExtSegInfoRecords[idx].theResExtSegLength, 7);
569  }
570  }
571 /*
572  out.write(theUserDefinedHeaderDataLength, 5);
573  if(ossimString(theUserDefinedHeaderDataLength).toInt32() > 0)
574  {
575  out.write(theUserDefinedHeaderOverflow, 3);
576  }
577  ossim_uint32 totalLength = getTotalTagLength();
578  if(totalLength <= 99999)
579  {
580  std::ostringstream tempOut;
581 
582  tempOut << std::setw(5)
583  << std::setfill('0')
584  << std::setiosflags(ios::right)
585  << totalLength;
586 
587  memcpy(theExtendedHeaderDataLength, tempOut.str().c_str(), 5);
588 
589  out.write(theExtendedHeaderDataLength, 5);
590 
591  // for now we hard code the 000 for we do not currently support writing to the DES if the total tag length is
592  // larger than supported
593  //
594  memset(theExtendedHeaderDataOverflow, '0', 3);
595 
596  if(totalLength > 0)
597  {
598  out.write(theExtendedHeaderDataOverflow, 3);
599  ossim_uint32 i = 0;
600 
601  for(i = 0; i < theTagList.size(); ++i)
602  {
603  theTagList[i].writeStream(out);
604  }
605  }
606  }
607  else
608  {
609  ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length < 99999" << std::endl;
610  }
611  */
613  if (totalLength > 0)
614  {
615  totalLength += 3;
616  }
617 
618  // Scope tempOut
619  {
620  std::ostringstream tempOut;
621  tempOut << std::setw(5)
622  << std::setfill('0')
623  << std::setiosflags(ios::right)
624  << totalLength;
625 
626  out.write(tempOut.str().c_str(), 5);
627  }
628 
629  if (totalLength > 0)
630  {
631  if(totalLength <= 99999)
632  {
633  out.write(theUserDefinedHeaderOverflow, 3);
634 
635  for (unsigned int i = 0; i < theTagList.size(); ++i)
636  {
637  if (theTagList[i].getTagType() == "UDHD")
638  {
639  theTagList[i].writeStream(out);
640  }
641  }
642  }
643  else
644  {
645  ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length <= 99999" << std::endl;
646  }
647  }
648 
650  if (totalLength > 0)
651  {
652  totalLength += 3;
653  }
654 
655  // Scope tempOut
656  {
657  std::ostringstream tempOut;
658  tempOut << std::setw(5)
659  << std::setfill('0')
660  << std::setiosflags(ios::right)
661  << totalLength;
662 
663  out.write(tempOut.str().c_str(), 5);
664  }
665 
666  if (totalLength > 0)
667  {
668  if(totalLength <= 99999)
669  {
670  out.write(theExtendedHeaderDataOverflow, 3);
671 
672  for(unsigned int i = 0; i < theTagList.size(); ++i)
673  {
674  if (theTagList[i].getTagType() == "XHD")
675  {
676  theTagList[i].writeStream(out);
677  }
678  }
679  }
680  else
681  {
682  ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length <= 99999" << std::endl;
683  }
684  }
685 
686 }
char theReleasingInstructions[21]
Field: FSREL.
char theComplexityLevel[3]
Field: CLEVEL.
char theClassificationAuthorityType[2]
Field: FSCATP.
char theOriginatingStationId[11]
Field: OSTAID.
ossim_uint8 theFileBackgroundColor[3]
Field: FBKGC.
char theReservedForFutureUse1[4]
Field: NUMX.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theOriginatorsName[25]
Field: ONAME.
char theFileTypeVersion[10]
Field: FHDR Required field for NITF and is a 9 byte value.
char theDeclassificationExemption[5]
Field: FSDCXM.
char theClassificationAuthority[41]
Field: FSCAUT.
char theHeaderLength[7]
Field: HL.
char theFileLength[13]
Field: FL.
char theControlAndHandling[3]
Field: FSCTLH.
char theDeclassificationType[3]
Field: FSDCTP.
char theOriginatorsPhone[19]
Field: OPHONE.
char theSystemType[5]
Field: STYPE.
ossim_uint32 toUInt32() const
char theSecurityClassificationSys[3]
Field: FSCLSY.
std::vector< ossimNitfGraphicInfoRecordV2_1 > theNitfGraphicInfoRecords
This is an optional field and will depend on theNumberOfGraphicInfoRecords.
char theClassificationReason[2]
Field: FSCRSN.
std::vector< ossimNitfTagInformation > theTagList
char theDowngradingDate[9]
Field: FSDGDT.
char theCodewords[12]
Field: FSCODE.
char theClassificationText[44]
Field: FSCLTX.
char theEncryption[2]
Field: ENCRYP.
char theUserDefinedHeaderOverflow[4]
Field: UDHOFL.
unsigned int ossim_uint32
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.
char theDateTime[15]
Field: FDT.
char theExtendedHeaderDataLength[6]
Field: XHDL.
char theSecurityControlNumber[16]
Field: FSCTLN.
std::vector< ossimNitfResExtSegInfoRecordV2_1 > theNitfResExtSegInfoRecords
This information is conditional on the number of Res Ext Seg info records field.
std::vector< ossimNitfImageInfoRecordV2_1 > theNitfImageInfoRecords
This information is conditional on the number of image info records field.
char theUserDefinedHeaderDataLength[6]
Field: UDHDL.
std::vector< ossimNitfTextFileInfoRecordV2_1 > theNitfTextFileInfoRecords
This information is conditional on the number of text file info records field.
char theCopyNumber[6]
Field: FSCOP.
char theFileTitle[81]
Field: FTITLE.
char theSecuritySourceDate[9]
Field: FSSRDT.
char theSecurityClassification[2]
Field: FSCLAS.
char theNumberOfCopies[6]
Field: FSCOPYS.
char theExtendedHeaderDataOverflow[4]
Field: XHDLOFL.
char theDeclassificationDate[9]
Field: FSDCDT.
char theDowngrade[2]
Field: FSDG.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

Member Data Documentation

◆ FBKGC_KW

const ossimString ossimNitfFileHeaderV2_1::FBKGC_KW = "FBKGC"
static

Definition at line 267 of file ossimNitfFileHeaderV2_1.h.

Referenced by getProperty(), getPropertyNames(), loadState(), and setProperty().

◆ FSCATP_KW

const ossimString ossimNitfFileHeaderV2_1::FSCATP_KW = "FSCATP"
static

◆ FSCLSY_KW

const ossimString ossimNitfFileHeaderV2_1::FSCLSY_KW
static

Properties of a NITF 2.1 Header file.

See MIL-STD-2500B for details.

To access these, pass the constant to getProperty().

Definition at line 257 of file ossimNitfFileHeaderV2_1.h.

Referenced by getProperty(), getPropertyNames(), loadState(), saveState(), and setProperty().

◆ FSCLTX_KW

const ossimString ossimNitfFileHeaderV2_1::FSCLTX_KW = "FSCLTX"
static

◆ FSCRSN_KW

const ossimString ossimNitfFileHeaderV2_1::FSCRSN_KW = "FSCRSN"
static

◆ FSDCDT_KW

const ossimString ossimNitfFileHeaderV2_1::FSDCDT_KW = "FSDCDT"
static

◆ FSDCTP_KW

const ossimString ossimNitfFileHeaderV2_1::FSDCTP_KW
static

◆ FSDCXM_KW

const ossimString ossimNitfFileHeaderV2_1::FSDCXM_KW = "FSDCXM"
static

◆ FSDG_KW

const ossimString ossimNitfFileHeaderV2_1::FSDG_KW = "FSDG"
static

◆ FSDGDT_KW

const ossimString ossimNitfFileHeaderV2_1::FSDGDT_KW = "FSDGDT"
static

◆ FSSRDT_KW

const ossimString ossimNitfFileHeaderV2_1::FSSRDT_KW = "FSSRDT"
static

◆ theClassificationAuthority

char ossimNitfFileHeaderV2_1::theClassificationAuthority[41]
private

Field: FSCAUT.

Is a 40 byte field and can contain BCS spaces (0x20).

Definition at line 462 of file ossimNitfFileHeaderV2_1.h.

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

◆ theClassificationAuthorityType

char ossimNitfFileHeaderV2_1::theClassificationAuthorityType[2]
private

Field: FSCATP.

Values can be:

O Original classification authority D derivative from a single source M derivative from multiple sources

Is a 1 byte field and can contain BCS spaces (0x20).

Definition at line 455 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getClassificationAuthorityType(), parseStream(), print(), saveState(), setClassificationAuthorityType(), and writeStream().

◆ theClassificationReason

char ossimNitfFileHeaderV2_1::theClassificationReason[2]
private

Field: FSCRSN.

Is a 1 byte field and can contain BCS spaces (0x20).

Valid values are A-G

Definition at line 471 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getClassificationReason(), parseStream(), print(), saveState(), setClassificationReason(), and writeStream().

◆ theClassificationText

char ossimNitfFileHeaderV2_1::theClassificationText[44]
private

Field: FSCLTX.

Is a 43 byte field and can contain BCS spaces (0x20).

Definition at line 442 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getClassificationText(), parseStream(), print(), saveState(), setClassificationText(), and writeStream().

◆ theCodewords

char ossimNitfFileHeaderV2_1::theCodewords[12]
private

Field: FSCODE.

This is a 11 byte Alphanumeric field

Definition at line 361 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getCodeWords(), parseStream(), print(), saveState(), setCodeWords(), and writeStream().

◆ theControlAndHandling

char ossimNitfFileHeaderV2_1::theControlAndHandling[3]
private

Field: FSCTLH.

This is a 2 byte Alphanumeric field.

Definition at line 368 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getControlAndHandling(), parseStream(), print(), saveState(), setControlAndHandling(), and writeStream().

◆ theDataExtSegOffsetList

std::vector<ossimNitfDataExtSegOffsetInformation> ossimNitfFileHeaderV2_1::theDataExtSegOffsetList
private

◆ theDeclassificationDate

char ossimNitfFileHeaderV2_1::theDeclassificationDate[9]
private

Field: FSDCDT.

This is a 8 byte field and has the form CCYYMMDD where:

CC is the firs 2 chars of the year 00-99 YY is the second 2 chars of the year 00-99 MM is the month 01-12 DD is the day 01-31

Definition at line 405 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getDeclassificationDate(), parseStream(), print(), saveState(), setDeclassificationDate(), and writeStream().

◆ theDeclassificationExemption

char ossimNitfFileHeaderV2_1::theDeclassificationExemption[5]
private

◆ theDeclassificationType

char ossimNitfFileHeaderV2_1::theDeclassificationType[3]
private

Field: FSDCTP.

This is a 2 byte alphanumeric field.

DD declassify on a specific date DE declassify upon occurrence of an event GD downgrade to a specified level on a specific date) GE downgrade to a specified level upon occurrence of an event) O OADR X exempt from automatic declassification

NOTE: If this field is all BCS spaces (0x20), it shall imply that no file security declassification or

Definition at line 392 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getDeclassificationType(), parseStream(), print(), saveState(), setDeclassificationType(), and writeStream().

◆ theDowngrade

char ossimNitfFileHeaderV2_1::theDowngrade[2]
private

Field: FSDG.

Can be blank. Is a 1 byte field valid values are:

S = secret C = Confidential R = Restricted 0x20 or BCS spaces.

if spaces then security downgrading does not apply.

Definition at line 427 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getDowngrade(), parseStream(), print(), saveState(), setDowngrade(), and writeStream().

◆ theDowngradingDate

char ossimNitfFileHeaderV2_1::theDowngradingDate[9]
private

Field: FSDGDT.

Is an 8 byte field of the form CCYYMMDD.

Definition at line 435 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getDowngradingDate(), parseStream(), print(), saveState(), setDowngradingDate(), and writeStream().

◆ theExtendedHeaderDataLength

char ossimNitfFileHeaderV2_1::theExtendedHeaderDataLength[6]
private

Field: XHDL.

This is a required field. It is 5 bytes long and ranges from 0-99999. 0 means there is no data

Definition at line 635 of file ossimNitfFileHeaderV2_1.h.

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

◆ theExtendedHeaderDataOverflow

char ossimNitfFileHeaderV2_1::theExtendedHeaderDataOverflow[4]
private

Field: XHDLOFL.

This is conditional on theExtendedHeaderDataLength. If that field is 0 then this does not exist. This is a 3 byte field.

Definition at line 644 of file ossimNitfFileHeaderV2_1.h.

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

◆ theFileBackgroundColor

ossim_uint8 ossimNitfFileHeaderV2_1::theFileBackgroundColor[3]
private

Field: FBKGC.

Required. Is a 3 byte field and is reuqired. Note: This field is binary and has range

 (0x00-0xff, 0x00-0xff, 0x00-0xff)

each byte can range from 0 to 255 binary

Definition at line 498 of file ossimNitfFileHeaderV2_1.h.

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

◆ theFileLength

char ossimNitfFileHeaderV2_1::theFileLength[13]
private

Field: FL.

This is a required field.

Is a 12 byte number of the form 000000000388-999999999998 indicates the file length and a value of 999999999999 indicates that the file length was not available.

Definition at line 525 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getFileSize(), parseStream(), print(), saveState(), setFileLength(), and writeStream().

◆ theGraphicOffsetList

std::vector<ossimNitfGraphicOffsetInformation> ossimNitfFileHeaderV2_1::theGraphicOffsetList
private

Definition at line 343 of file ossimNitfFileHeaderV2_1.h.

Referenced by initializeAllOffsets().

◆ theHeaderLength

char ossimNitfFileHeaderV2_1::theHeaderLength[7]
private

Field: HL.

This is a reqired field.

ranges from 000388-999999.

Definition at line 534 of file ossimNitfFileHeaderV2_1.h.

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

◆ theHeaderSize

ossim_uint32 ossimNitfFileHeaderV2_1::theHeaderSize
private

This is not part of the NITF file header.

This will be computed since somethimes the header size will not be given in the header field. This value will hold a count of all the bytes read for the header portion. This can be used to skip past the header data.

Definition at line 328 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getHeaderSize(), initializeAllOffsets(), parseStream(), readDataExtSegInfoRecords(), readGraphicInfoRecords(), readImageInfoRecords(), readResExtSegInfoRecords(), and readTextFileInfoRecords().

◆ theImageOffsetList

std::vector<ossimNitfImageOffsetInformation> ossimNitfFileHeaderV2_1::theImageOffsetList
private

This will hold pre-computed offsets to the start of all image headers and start to their data.

Definition at line 341 of file ossimNitfFileHeaderV2_1.h.

Referenced by getNewImageHeader(), and initializeAllOffsets().

◆ theImageRect

ossimDrect ossimNitfFileHeaderV2_1::theImageRect
private

This will be pre-computed when the header file is opened.

This is computed after we have found the display order. We will use the rectangle of the smallest display number.

Definition at line 335 of file ossimNitfFileHeaderV2_1.h.

Referenced by getImageRect().

◆ theNitfDataExtSegInfoRecords

std::vector<ossimNitfDataExtSegInfoRecordV2_1> ossimNitfFileHeaderV2_1::theNitfDataExtSegInfoRecords
private

This information is conditional on the number of info records field.

If the filed is greater than 0 then the record information is read in up t the indicated number

Definition at line 597 of file ossimNitfFileHeaderV2_1.h.

Referenced by addDataExtSegInfoRecord(), deleteLastDataExtSegInfoRecord(), getNewDataExtensionSegment(), getNumberOfDataExtSegments(), initializeAllOffsets(), print(), readDataExtSegInfoRecords(), readDes(), and writeStream().

◆ theNitfGraphicInfoRecords

std::vector<ossimNitfGraphicInfoRecordV2_1> ossimNitfFileHeaderV2_1::theNitfGraphicInfoRecords
private

This is an optional field and will depend on theNumberOfGraphicInfoRecords.

If 0 then does not exist.

Definition at line 562 of file ossimNitfFileHeaderV2_1.h.

Referenced by getNumberOfGraphics(), initializeAllOffsets(), print(), readGraphicInfoRecords(), and writeStream().

◆ theNitfImageInfoRecords

std::vector<ossimNitfImageInfoRecordV2_1> ossimNitfFileHeaderV2_1::theNitfImageInfoRecords
private

This information is conditional on the number of image info records field.

If the filed is greater than 0 then the record information is read in up t the indicated number

Definition at line 549 of file ossimNitfFileHeaderV2_1.h.

Referenced by addImageInfoRecord(), deleteLastImageInfoRecord(), getNumberOfImages(), initializeAllOffsets(), print(), readImageInfoRecords(), replaceImageInfoRecord(), and writeStream().

◆ theNitfResExtSegInfoRecords

std::vector<ossimNitfResExtSegInfoRecordV2_1> ossimNitfFileHeaderV2_1::theNitfResExtSegInfoRecords
private

This information is conditional on the number of Res Ext Seg info records field.

If the filed is greater than 0 then the record information is read in up t the indicated number

Definition at line 611 of file ossimNitfFileHeaderV2_1.h.

Referenced by getNumberOfReservedExtSegments(), print(), readResExtSegInfoRecords(), and writeStream().

◆ theNitfTextFileInfoRecords

std::vector<ossimNitfTextFileInfoRecordV2_1> ossimNitfFileHeaderV2_1::theNitfTextFileInfoRecords
private

This information is conditional on the number of text file info records field.

If the filed is greater than 0 then the record information is read in up t the indicated number

Definition at line 583 of file ossimNitfFileHeaderV2_1.h.

Referenced by addTextInfoRecord(), getNumberOfTextSegments(), initializeAllOffsets(), print(), readTextFileInfoRecords(), and writeStream().

◆ theNumberOfDataExtSegInfoRecords

char ossimNitfFileHeaderV2_1::theNumberOfDataExtSegInfoRecords[4]
private

Field: NUMDES.

This is a 3 byte numeric 0-999.

Definition at line 590 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), parseStream(), print(), readDataExtSegInfoRecords(), and setNumberOfDataExtSegInfoRecords().

◆ theNumberOfGraphicInfoRecords

char ossimNitfFileHeaderV2_1::theNumberOfGraphicInfoRecords[4]
private

Field: NUMS.

This info is required and ranges from 000-999.

Definition at line 556 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), parseStream(), print(), readGraphicInfoRecords(), and setNumberOfGraphicInfoRecords().

◆ theNumberOfImageInfoRecords

char ossimNitfFileHeaderV2_1::theNumberOfImageInfoRecords[4]
private

Field: NUMI.

This is a 3 byte field that specifies the number of images in the file. 0-999

Definition at line 542 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), parseStream(), print(), readImageInfoRecords(), saveState(), and setNumberOfImageInfoRecords().

◆ theNumberOfResExtSegInfoRecords

char ossimNitfFileHeaderV2_1::theNumberOfResExtSegInfoRecords[4]
private

Field: NUMRES.

This is a 3 byte numeric 0-999. Reserved Extension Segments

Definition at line 604 of file ossimNitfFileHeaderV2_1.h.

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

◆ theNumberOfTextFileInfoRecords

char ossimNitfFileHeaderV2_1::theNumberOfTextFileInfoRecords[4]
private

Field: NUMT.

This is a 3 byte numeric 0-999.

Definition at line 576 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), parseStream(), print(), readTextFileInfoRecords(), and setNumberOfTextInfoRecords().

◆ theOriginatorsName

char ossimNitfFileHeaderV2_1::theOriginatorsName[25]
private

Field: ONAME.

This is a 24 byte Alphanumeric number

Definition at line 505 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getOriginatorsName(), getProperty(), parseStream(), print(), saveState(), setOriginatorsName(), and writeStream().

◆ theOriginatorsPhone

char ossimNitfFileHeaderV2_1::theOriginatorsPhone[19]
private

Field: OPHONE.

This is an 18 byte Alphanumeric value.

Definition at line 512 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getOriginatorsPhone(), getProperty(), parseStream(), print(), saveState(), setOriginatorsPhone(), and writeStream().

◆ theReleasingInstructions

char ossimNitfFileHeaderV2_1::theReleasingInstructions[21]
private

Field: FSREL.

This is a 20 byte Alphanumeric field.

Definition at line 375 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getReleasingInstructions(), parseStream(), print(), saveState(), setReleasingInstructions(), and writeStream().

◆ theReservedForFutureUse1

char ossimNitfFileHeaderV2_1::theReservedForFutureUse1[4]
private

Field: NUMX.

Is a 3 byte field and is reserved for future use.

Definition at line 569 of file ossimNitfFileHeaderV2_1.h.

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

◆ theSecurityClassificationSys

char ossimNitfFileHeaderV2_1::theSecurityClassificationSys[3]
private

Field: FSCLSY.

Is a 2 byte field. Required but can be blank:

Definition at line 354 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getSecurityClassificationSys(), parseStream(), print(), saveState(), setSecurityClassificationSys(), and writeStream().

◆ theSecurityControlNumber

char ossimNitfFileHeaderV2_1::theSecurityControlNumber[16]
private

Field: FSCTLN.

Is a 15 byte field and can be blank (0x20)

Definition at line 486 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getSecurityControlNumber(), parseStream(), print(), saveState(), setSecurityControlNumber(), and writeStream().

◆ theSecuritySourceDate

char ossimNitfFileHeaderV2_1::theSecuritySourceDate[9]
private

Field: FSSRDT.

Is a 8 byte field of the form CCYYMMDD and can be BCS space (0x20).

Definition at line 479 of file ossimNitfFileHeaderV2_1.h.

Referenced by clearFields(), getSecuritySourceDate(), parseStream(), print(), saveState(), setSecuritySourceDate(), and writeStream().

◆ theTextFileOffsetList

std::vector<ossimNitfTextOffsetInformation> ossimNitfFileHeaderV2_1::theTextFileOffsetList
private

Definition at line 344 of file ossimNitfFileHeaderV2_1.h.

Referenced by initializeAllOffsets().

◆ theUserDefinedHeaderDataLength

char ossimNitfFileHeaderV2_1::theUserDefinedHeaderDataLength[6]
private

Field: UDHDL.

This is a required field and is a 5 byte numeric ranging from 0-99999. This is 0 if there is no data. Valid values are 00000 or 00003-99999

Definition at line 620 of file ossimNitfFileHeaderV2_1.h.

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

◆ theUserDefinedHeaderOverflow

char ossimNitfFileHeaderV2_1::theUserDefinedHeaderOverflow[4]
private

Field: UDHOFL.

This exists if theUserDefinedHeaderDataLength is not 0.

Definition at line 627 of file ossimNitfFileHeaderV2_1.h.

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


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