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
ossimNitfImageHeaderV2_1 Class Reference

#include <ossimNitfImageHeaderV2_1.h>

Inheritance diagram for ossimNitfImageHeaderV2_1:
ossimNitfImageHeaderV2_X ossimNitfImageHeader ossimObject ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimNitfImageHeaderV2_1 ()
 
virtual ~ossimNitfImageHeaderV2_1 ()
 
virtual void parseStream (std::istream &in, const ossimNitfFileHeaderV2_1 *file)
 
virtual void parseStream (std::istream &in)
 
virtual void writeStream (std::ostream &out)
 
virtual bool isValid () const
 isValid will test if the fields are valid and will return true or false. More...
 
virtual std::ostream & print (std::ostream &out, const std::string &prefix) const
 print method that outputs a key/value type format adding prefix to keys. More...
 
virtual ossimIrect getImageRect () const
 Returns the zero based image rectangle. More...
 
virtual ossimIrect getBlockImageRect () const
 Returns the zero based image rectangle expanded out to block boundaries. More...
 
virtual bool isCompressed () const
 
virtual bool isEncrypted () const
 
virtual ossim_int32 getNumberOfBands () const
 
virtual ossim_int32 getNumberOfRows () const
 
virtual ossim_int32 getNumberOfCols () const
 
virtual ossim_int32 getNumberOfBlocksPerRow () const
 
virtual ossim_int32 getNumberOfBlocksPerCol () const
 
virtual ossim_int32 getNumberOfPixelsPerBlockHoriz () const
 
virtual ossim_int32 getNumberOfPixelsPerBlockVert () const
 
virtual ossimString getImageId () const
 
virtual ossim_int32 getBitsPerPixelPerBand () const
 
virtual ossim_int32 getActualBitsPerPixelPerBand () const
 
virtual ossimString getIMode () const
 
virtual ossimString getImageDateAndTime () const
 
virtual ossimString getAcquisitionDateMonthDayYear (ossim_uint8 separationChar='-') const
 
virtual ossimString getSecurityClassification () const
 
virtual ossimString getCategory () const
 
virtual ossimString getRepresentation () const
 
virtual ossimString getCoordinateSystem () const
 
virtual ossimString getGeographicLocation () const
 
virtual ossimString getPixelValueType () const
 
virtual bool takeOverflowTags (std::vector< ossimNitfTagInformation > &overflowTags, ossim_uint32 potentialDesIndex, bool userDefinedTags=false)
 
virtual bool hasBlockMaskRecords () const
 
virtual bool hasPadPixelMaskRecords () const
 
virtual bool hasTransparentCode () const
 
virtual ossim_uint32 getTransparentCode () const
 
virtual ossim_uint32 getBlockMaskRecordOffset (ossim_uint32 blockNumber, ossim_uint32 bandNumber) const
 
virtual ossim_uint32 getPadPixelMaskRecordOffset (ossim_uint32 blockNumber, ossim_uint32 bandNumber) const
 
virtual void setNumberOfBands (ossim_uint32 nbands)
 
virtual void setBandInfo (ossim_uint32 idx, const ossimNitfImageBandV2_1 &info)
 
virtual void setNumberOfRows (ossim_uint32 rows)
 
virtual void setNumberOfCols (ossim_uint32 cols)
 
virtual void setGeographicLocationDms (const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll)
 
virtual void setGeographicLocationDecimalDegrees (const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll)
 
virtual void setUtmNorth (ossim_uint32 zone, const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll)
 
virtual void setUtmSouth (ossim_uint32 zone, const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll)
 
virtual void setSecurityClassificationSystem (const ossimString &value)
 
virtual void setCodewords (const ossimString &value)
 
virtual void setControlAndHandling (const ossimString &value)
 
virtual void setReleasingInstructions (const ossimString &value)
 
virtual void setDeclassificationType (const ossimString &value)
 
virtual void setDeclassificationDate (const ossimString &value)
 
virtual void setDeclassificationExempt (const ossimString &value)
 
virtual void setDowngrade (const ossimString &value)
 
virtual void setDowngradeDate (const ossimString &value)
 
virtual void setClassificationText (const ossimString &value)
 
virtual void setClassificationAuthorityType (const ossimString &value)
 
virtual void setClassificationAuthority (const ossimString &value)
 
virtual void setClassificationReason (const ossimString &value)
 
virtual void setSecuritySourceDate (const ossimString &value)
 
virtual void setSecurityControlNumber (const ossimString &value)
 
virtual void setImageMagnification (const ossimString &value)
 
virtual ossimString getImageSource () const
 
virtual const ossimRefPtr< ossimNitfCompressionHeadergetCompressionHeader () const
 
virtual const ossimRefPtr< ossimNitfImageBandgetBandInformation (ossim_uint32 idx) const
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool saveState (ossimKeywordlist &kwl, const ossimString &prefix="") const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to set fields from a keyword list. More...
 
- Public Member Functions inherited from ossimNitfImageHeaderV2_X
 ossimNitfImageHeaderV2_X ()
 
void setImageId (const ossimString &value)
 
void setAquisitionDateTime (const ossimString &value)
 
void setTargetId (const ossimString &value)
 
void setTitle (const ossimString &value)
 
void setSecurityClassification (const ossimString &value)
 
void setEncryption (const ossimString &value)
 
void setImageSource (const ossimString &value)
 
void setJustification (const ossimString &value)
 
void setCoordinateSystem (const ossimString &value)
 
void setGeographicLocation (const ossimString &value)
 
void setNumberOfComments (const ossimString &value)
 
void setCompression (const ossimString &value)
 
void setCompressionRateCode (const ossimString &value)
 
void setDisplayLevel (const ossimString &value)
 
void setAttachmentLevel (const ossimString &value)
 
void setPixelType (const ossimString &pixelType=ossimString("INT"))
 
void setBitsPerPixel (ossim_uint32 bitsPerPixel)
 
void setActualBitsPerPixel (ossim_uint32 bitsPerPixel)
 
void setImageMode (char mode)
 
void setCategory (const ossimString &category)
 
void setRepresentation (const ossimString &rep)
 
void setBlocksPerRow (ossim_uint32 blocks)
 
void setBlocksPerCol (ossim_uint32 blocks)
 
void setNumberOfPixelsPerBlockRow (ossim_uint32 pixels)
 
void setNumberOfPixelsPerBlockCol (ossim_uint32 pixels)
 
ossim_uint64 getDataLocation () const
 
ossimString getImageId () const
 
ossimString getAquisitionDateTime () const
 
ossimString getTargetId () const
 
ossimString getTitle () const
 
ossimString getSecurityClassification () const
 
ossimString getEncryption () const
 
ossimString getImageSource () const
 
ossimString getJustification () const
 
ossimString getCoordinateSystem () const
 
ossimString getGeographicLocation () const
 
ossimString getNumberOfComments () const
 
ossimString getCompressionCode () const
 
ossimString getCompressionRateCode () const
 
ossim_uint32 getDisplayLevel () const
 
ossim_uint32 getAttachmentLevel () const
 
ossimString getPixelType () const
 
ossim_uint32 getBitsPerPixel () const
 
ossim_uint32 getActualBitsPerPixel () const
 
char getImageMode () const
 
ossimString getCategory () const
 
ossimString getRepresentation () const
 
ossim_uint32 getBlocksPerRow () const
 
ossim_uint32 getBlocksPerCol () const
 
ossim_uint32 getNumberOfPixelsPerBlockRow () const
 
ossim_uint32 getNumberOfPixelsPerBlockCol () const
 
virtual ossimString getImageMagnification () const
 Gets the IMAG field as a string. More...
 
virtual void getImageLocation (ossimIpt &loc) const
 Gets the ILOC field as an ossimIpt. More...
 
- Public Member Functions inherited from ossimNitfImageHeader
 ossimNitfImageHeader ()
 
virtual ~ossimNitfImageHeader ()
 
virtual bool getTagInformation (ossimNitfTagInformation &tagInfo, ossim_uint32 idx) const
 
virtual std::vector< ossimNitfTagInformationgetAllTags ()
 
virtual void setAllTags (std::vector< ossimNitfTagInformation > tagList)
 
virtual bool getTagInformation (ossimNitfTagInformation &tagInfo, const ossimString &tagName) const
 
ossimRefPtr< ossimNitfRegisteredTaggetTagData (const ossimString &tagName)
 
const ossimRefPtr< ossimNitfRegisteredTaggetTagData (const ossimString &tagName) const
 
void getTagData (const ossimString &tagName, std::vector< const ossimNitfRegisteredTag *> &tags) const
 Returns all tags of type tagName. More...
 
virtual ossim_uint32 getNumberOfTags () const
 
virtual void addTag (const ossimNitfTagInformation &tag, bool unique=true)
 
virtual void removeTag (const ossimString &tagName)
 
virtual void parseStream (ossim::istream &in)=0
 
virtual void writeStream (ossim::ostream &out)=0
 
virtual void getDecimationFactor (ossim_float64 &result) const
 Convenience method to get the decimation factor as a double from the string returned be the getImageMagnification() method. More...
 
bool hasLut () const
 
ossimRefPtr< ossimNBandLutDataObjectcreateLut (ossim_uint32 bandIdx) const
 
virtual bool isSameAs (const ossimNitfImageHeader *hdr) const
 
virtual ossim_uint32 getTotalTagLength () const
 
virtual std::ostream & printTags (std::ostream &out, const std::string &prefix=std::string()) const
 print method that outputs a key/value type format adding prefix to keys. More...
 
virtual void getMetadata (ossimKeywordlist &kwl, const char *prefix=0) const
 Populates keyword list with metadata. 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 ISCLSY_KW
 
static const ossimString ISCODE_KW
 
static const ossimString ISCTLH_KW = "isctlh"
 
static const ossimString ISREL_KW = "isrel"
 
static const ossimString ISDCTP_KW = "isdctp"
 
static const ossimString ISDCDT_KW = "isdcdt"
 
static const ossimString ISDCXM_KW = "isdcxm"
 
static const ossimString ISDG_KW = "isdg"
 
static const ossimString ISDGDT_KW = "isdgdt"
 
static const ossimString ISCLTX_KW = "iscltx"
 
static const ossimString ISCATP_KW = "iscatp"
 
static const ossimString ISCAUT_KW = "iscaut"
 
static const ossimString ISCRSN_KW = "iscrsn"
 
static const ossimString ISSRDT_KW = "issrdt"
 
static const ossimString ISCTLN_KW = "isctln"
 
static const ossimString XBANDS_KW = "xbands"
 
- Static Public Attributes inherited from ossimNitfImageHeaderV2_X
static const ossimString IM_KW = "IM"
 
static const ossimString IID1_KW = "IID1"
 
static const ossimString IDATIM_KW = "IDATIM"
 
static const ossimString TGTID_KW = "TGTID"
 
static const ossimString IID2_KW = "IID2"
 
static const ossimString ITITLE_KW = "ITITLE"
 
static const ossimString ISCLAS_KW = "ISCLAS"
 
static const ossimString ENCRYP_KW = "ENCRYP"
 
static const ossimString ISORCE_KW = "ISORCE"
 
static const ossimString NROWS_KW = "NROWS"
 
static const ossimString NCOLS_KW = "NCOLS"
 
static const ossimString PVTYPE_KW = "PVTYPE"
 
static const ossimString IREP_KW = "IREP"
 
static const ossimString ICAT_KW = "ICAT"
 
static const ossimString ABPP_KW = "ABPP"
 
static const ossimString PJUST_KW = "PJUST"
 
static const ossimString ICORDS_KW = "ICORDS"
 
static const ossimString IGEOLO_KW = "IGEOLO"
 
static const ossimString NICOM_KW = "NICOM"
 
static const ossimString ICOM_KW = "ICOM"
 
static const ossimString IC_KW = "IC"
 
static const ossimString COMRAT_KW = "COMRAT"
 
static const ossimString NBANDS_KW = "NBANDS"
 
static const ossimString ISYNC_KW = "ISYNC"
 
static const ossimString IMODE_KW = "IMODE"
 
static const ossimString NBPR_KW = "NBPR"
 
static const ossimString NBPC_KW = "NBPC"
 
static const ossimString NPPBH_KW = "NPPBH"
 
static const ossimString NPPBV_KW = "NPPBV"
 
static const ossimString NBPP_KW = "NBPP"
 
static const ossimString IDLVL_KW = "IDLVL"
 
static const ossimString IALVL_KW = "IALVL"
 
static const ossimString ILOC_KW = "ILOC"
 
static const ossimString IMAG_KW = "IMAG"
 
static const ossimString UDIDL_KW = "UDIDL"
 
static const ossimString UDOFL_KW = "UDOFL"
 
static const ossimString IXSHDL_KW = "IXSHDL"
 
static const ossimString IXSOFL_KW = "IXSOFL"
 
static const ossimString IMDATOFF_KW = "IMDATOFF"
 
static const ossimString BMRLNTH_KW = "BMRLNTH"
 

Private Member Functions

void clearFields ()
 
ossimString encodeUtm (ossim_uint32 zone, const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll) const
 

Private Attributes

char theSecurityClassificationSys [3]
 FIELD: ISCLSY. More...
 
char theCodewords [12]
 FIELD: ISCODE. More...
 
char theControlAndHandling [3]
 FIELD: ISCTLH. More...
 
char theReleasingInstructions [21]
 FIELD: ISREL. More...
 
char theDeclassificationType [3]
 FIELD: ISDCTP. More...
 
char theDeclassificationDate [9]
 FIELD: ISDCDT. More...
 
char theDeclassificationExempt [5]
 FIELD: ISDCXM. More...
 
char theDowngrade [2]
 FIELD: ISDG. More...
 
char theDowngradeDate [9]
 FIELD: ISDGDT. More...
 
char theClassificationText [44]
 FIELD: ISCLTX. More...
 
char theClassificationAuthType [2]
 FIELD: ISCATP. More...
 
char theClassificationAuthority [41]
 FIELD: ISCAUT. More...
 
char theClassificationReason [2]
 FIELD: ISCRSN. More...
 
char theSecuritySourceDate [9]
 FIELD: ISSRDT. More...
 
char theSecurityControlNumber [16]
 FIELD: ISCTLN. More...
 
char theNumberOfMultispectralBands [6]
 FIELD: XBANDS. More...
 
std::vector< ossimRefPtr< ossimNitfImageBandV2_1 > > theImageBands
 

Additional Inherited Members

- Protected Member Functions inherited from ossimNitfImageHeader
void checkForGeographicTiePointTruncation (const ossimDpt &tie) const
 Method to check tie point to see if it will be truncated in field IGEOLO which has only arc second resolution. More...
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Attributes inherited from ossimNitfImageHeaderV2_X
char theType [3]
 
char theImageId [11]
 FIELD: IID1 Is a required 10 Alphanumeric value. More...
 
char theDateTime [15]
 
char theTargetId [18]
 FIELD: TGTID. More...
 
char theTitle [81]
 FIELD: IID2. More...
 
char theSecurityClassification [2]
 FIELD: ISCLAS. More...
 
char theEncryption [2]
 
char theImageSource [43]
 FIELD: ISORCE. More...
 
char theSignificantRows [9]
 FIELD: NROWS. More...
 
char theSignificantCols [9]
 FIELD: NCOLS. More...
 
char thePixelValueType [4]
 FIELD: PVTYPE. More...
 
char theRepresentation [9]
 FIELD: IREP. More...
 
char theActualBitsPerPixelPerBand [3]
 FIELD: ABPP. More...
 
char theCategory [9]
 FIELD: ICAT. More...
 
char theJustification [2]
 FIELD: PJUST. More...
 
char theCoordinateSystem [2]
 FIELD: ICORDS. More...
 
char theNumberOfComments [2]
 
std::vector< ossimStringtheImageComments
 
char theGeographicLocation [61]
 FIELD: IGEOLO. More...
 
char theCompression [3]
 FIELD: IC. More...
 
char theCompressionRateCode [5]
 FIELD COMRAT. More...
 
char theNumberOfBands [2]
 FIELD: NBANDS. More...
 
char theImageSyncCode [2]
 FIELD: ISYNC. More...
 
char theImageMode [2]
 FIELD: IMODE. More...
 
char theNumberOfBlocksPerRow [5]
 FIELD: NBPR. More...
 
char theNumberOfBlocksPerCol [5]
 FIELD: NBPC. More...
 
char theNumberOfPixelsPerBlockHoriz [5]
 FIELD: NPPBH. More...
 
char theNumberOfPixelsPerBlockVert [5]
 FIELD: NPPBV. More...
 
char theNumberOfBitsPerPixelPerBand [3]
 FIELD: NBPP. More...
 
char theDisplayLevel [4]
 FIELD: IDLVL. More...
 
char theAttachmentLevel [4]
 FIELD: IALVL. More...
 
char theImageLocation [11]
 FIELD: ILOC. More...
 
char theImageMagnification [5]
 FIELD: IMAG. More...
 
char theUserDefinedImageDataLength [6]
 FIELD: UDIDL. More...
 
char theUserDefinedOverflow [4]
 FIELD: UDOFL. More...
 
char theExtendedSubheaderDataLen [6]
 FIELD: IXSHDL. More...
 
char theExtendedSubheaderOverflow [4]
 FIELD: IXSOFL. More...
 
ossim_uint32 theBlockedImageDataOffset
 FIELD NAME: IMDATOFF. More...
 
ossim_uint16 theBlockMaskRecordLength
 FIELD NAME: BMRLNTH. More...
 
ossim_uint16 thePadPixelMaskRecordLength
 FIELD: TMRLNTH. More...
 
ossim_uint16 theTransparentOutputPixelCodeLength
 FIELD: TPXCDLNTH. More...
 
ossim_uint16 thePadOutputPixelCode
 FIELD: TPXCD. More...
 
std::vector< ossim_uint32theBlockMaskRecords
 
std::vector< ossim_uint32thePadPixelMaskRecords
 
ossimRefPtr< ossimNitfCompressionHeadertheCompressionHeader
 
ossim_uint64 theDataLocation
 
- Protected Attributes inherited from ossimNitfImageHeader
std::vector< ossimNitfTagInformationtheTagList
 

Detailed Description

Definition at line 20 of file ossimNitfImageHeaderV2_1.h.

Constructor & Destructor Documentation

◆ ossimNitfImageHeaderV2_1()

ossimNitfImageHeaderV2_1::ossimNitfImageHeaderV2_1 ( )

Definition at line 57 of file ossimNitfImageHeaderV2_1.cpp.

References clearFields().

◆ ~ossimNitfImageHeaderV2_1()

ossimNitfImageHeaderV2_1::~ossimNitfImageHeaderV2_1 ( )
virtual

Definition at line 61 of file ossimNitfImageHeaderV2_1.cpp.

62 {
63 }

Member Function Documentation

◆ clearFields()

void ossimNitfImageHeaderV2_1::clearFields ( )
private

Definition at line 1008 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theActualBitsPerPixelPerBand, ossimNitfImageHeaderV2_X::theAttachmentLevel, ossimNitfImageHeaderV2_X::theBlockedImageDataOffset, ossimNitfImageHeaderV2_X::theBlockMaskRecordLength, ossimNitfImageHeaderV2_X::theBlockMaskRecords, ossimNitfImageHeaderV2_X::theCategory, theClassificationAuthority, theClassificationAuthType, theClassificationReason, theClassificationText, theCodewords, ossimNitfImageHeaderV2_X::theCompression, ossimNitfImageHeaderV2_X::theCompressionHeader, ossimNitfImageHeaderV2_X::theCompressionRateCode, theControlAndHandling, ossimNitfImageHeaderV2_X::theCoordinateSystem, ossimNitfImageHeaderV2_X::theDataLocation, ossimNitfImageHeaderV2_X::theDateTime, theDeclassificationDate, theDeclassificationExempt, theDeclassificationType, ossimNitfImageHeaderV2_X::theDisplayLevel, theDowngrade, theDowngradeDate, ossimNitfImageHeaderV2_X::theEncryption, ossimNitfImageHeaderV2_X::theExtendedSubheaderDataLen, ossimNitfImageHeaderV2_X::theExtendedSubheaderOverflow, ossimNitfImageHeaderV2_X::theGeographicLocation, ossimNitfImageHeaderV2_X::theImageComments, ossimNitfImageHeaderV2_X::theImageId, ossimNitfImageHeaderV2_X::theImageLocation, ossimNitfImageHeaderV2_X::theImageMagnification, ossimNitfImageHeaderV2_X::theImageMode, ossimNitfImageHeaderV2_X::theImageSource, ossimNitfImageHeaderV2_X::theImageSyncCode, ossimNitfImageHeaderV2_X::theJustification, ossimNitfImageHeaderV2_X::theNumberOfBands, ossimNitfImageHeaderV2_X::theNumberOfBitsPerPixelPerBand, ossimNitfImageHeaderV2_X::theNumberOfBlocksPerCol, ossimNitfImageHeaderV2_X::theNumberOfBlocksPerRow, ossimNitfImageHeaderV2_X::theNumberOfComments, theNumberOfMultispectralBands, ossimNitfImageHeaderV2_X::theNumberOfPixelsPerBlockHoriz, ossimNitfImageHeaderV2_X::theNumberOfPixelsPerBlockVert, ossimNitfImageHeaderV2_X::thePadOutputPixelCode, ossimNitfImageHeaderV2_X::thePadPixelMaskRecordLength, ossimNitfImageHeaderV2_X::thePadPixelMaskRecords, ossimNitfImageHeaderV2_X::thePixelValueType, theReleasingInstructions, ossimNitfImageHeaderV2_X::theRepresentation, ossimNitfImageHeaderV2_X::theSecurityClassification, theSecurityClassificationSys, theSecurityControlNumber, theSecuritySourceDate, ossimNitfImageHeaderV2_X::theSignificantCols, ossimNitfImageHeaderV2_X::theSignificantRows, ossimNitfImageHeaderV2_X::theTargetId, ossimNitfImageHeaderV2_X::theTitle, ossimNitfImageHeaderV2_X::theTransparentOutputPixelCodeLength, ossimNitfImageHeaderV2_X::theType, ossimNitfImageHeaderV2_X::theUserDefinedImageDataLength, and ossimNitfImageHeaderV2_X::theUserDefinedOverflow.

Referenced by ossimNitfImageHeaderV2_1().

1009 {
1010  memcpy(theType, "IM", 2);
1011  memset(theImageId, ' ',10);
1012  memset(theDateTime, '-',14);
1013  memset(theTargetId, ' ',17);
1014  memset(theTitle, ' ',80);
1015  memset(theSecurityClassification, ' ',1);
1016  memset(theSecurityClassificationSys, ' ',2);
1017  memset(theCodewords, ' ',11);
1018  memset(theControlAndHandling, ' ',2);
1019  memset(theReleasingInstructions, ' ',20);
1020  memset(theDeclassificationType, ' ',2);
1021  memset(theDeclassificationDate, ' ',8);
1022  memset(theDeclassificationExempt, ' ',4);
1023  memset(theDowngrade, ' ',1);
1024  memset(theDowngradeDate, ' ',8);
1025  memset(theClassificationText, ' ',43);
1026  memset(theClassificationAuthType, ' ',1);
1027  memset(theClassificationAuthority, ' ',40);
1028  memset(theClassificationReason, ' ',1);
1029  memset(theSecuritySourceDate, ' ',8);
1030  memset(theSecurityControlNumber, ' ',15);
1031  memset(theEncryption, '0',1);
1032  memset(theImageSource, ' ',42);
1033  memset(theSignificantRows, '0',8);
1034  memset(theSignificantCols, '0',8);
1035  memset(thePixelValueType, ' ',3);
1036  memset(theRepresentation, ' ',8);
1037  memset(theCategory, ' ',8);
1038  memset(theActualBitsPerPixelPerBand, ' ',2);
1039  memset(theJustification, 'R',1);
1040  memset(theCoordinateSystem, ' ',1);
1041  memset(theGeographicLocation, ' ',60);
1042  memset(theNumberOfComments, '0', 1);
1043  theImageComments.clear();
1044  memcpy(theCompression, "NC",2);
1045  memset(theCompressionRateCode, ' ',4);
1046  memset(theNumberOfBands, '0',1);
1047  memset(theNumberOfMultispectralBands, ' ',5);
1048  memset(theImageSyncCode, '0', 1);
1049  memset(theImageMode, 'B', 1);
1050  memset(theNumberOfBlocksPerRow, '0', 4);
1051  memset(theNumberOfBlocksPerCol, '0', 4);
1052  memset(theNumberOfPixelsPerBlockHoriz, '0', 4);
1053  memset(theNumberOfPixelsPerBlockVert, '0', 4);
1054  memset(theNumberOfBitsPerPixelPerBand, '0', 2);
1055  memcpy(theDisplayLevel, "001", 3);
1056  memset(theAttachmentLevel, '0', 3);
1057  memset(theImageLocation, '0', 10);
1058  memcpy(theImageMagnification, "1.0 ", 4);
1059 
1060  memset(theUserDefinedImageDataLength,'0', 5);
1061  memset(theUserDefinedOverflow, '0', 3);
1062  memset(theExtendedSubheaderDataLen, '0', 5);
1063  memset(theExtendedSubheaderOverflow, '0', 3);
1064  theBlockMaskRecords.clear();
1065  thePadPixelMaskRecords.clear();
1066 
1072 
1074 
1075  theType[2] = '\0';
1076  theImageId[10] = '\0';
1077  theDateTime[14] = '\0';
1078  theTargetId[17] = '\0';
1079  theTitle[80] = '\0';
1080  theSecurityClassification[1] = '\0';
1081  theSecurityClassificationSys[2] = '\0';
1082  theCodewords[11] = '\0';
1083  theControlAndHandling[2] = '\0';
1084  theReleasingInstructions[20] = '\0';
1085  theDeclassificationType[2] = '\0';
1086  theDeclassificationDate[8] = '\0';
1087  theDeclassificationExempt[4] = '\0';
1088  theDowngrade[1] = '\0';
1089  theDowngradeDate[8] = '\0';
1090  theClassificationText[43] = '\0';
1091  theClassificationAuthType[1] = '\0';
1092  theClassificationAuthority[40] = '\0';
1093  theClassificationReason[1] = '\0';
1094  theSecuritySourceDate[8] = '\0';
1095  theSecurityControlNumber[15] = '\0';
1096  theEncryption[1] = '\0';
1097  theImageSource[42] = '\0';
1098  theSignificantRows[8] = '\0';
1099  theSignificantCols[8] = '\0';
1100  thePixelValueType[3] = '\0';
1101  theRepresentation[8] = '\0';
1102  theCategory[8] = '\0';
1103  theActualBitsPerPixelPerBand[2] = '\0';
1104  theJustification[1] = '\0';
1105  theCoordinateSystem[1] = '\0';
1106  theGeographicLocation[60] = '\0';
1107  theNumberOfComments[1] = '\0';
1108  theCompression[2] = '\0';
1109  theCompressionRateCode[4] = '\0';
1110  theNumberOfBands[1] = '\0';
1112  theImageSyncCode[1] = '\0';
1113  theImageMode[1] = '\0';
1114  theNumberOfBlocksPerRow[4] = '\0';
1115  theNumberOfBlocksPerCol[4] = '\0';
1119  theDisplayLevel[3] = '\0';
1120  theAttachmentLevel[3] = '\0';
1121  theImageLocation[10] = '\0';
1122  theImageMagnification[4] = '\0';
1124  theUserDefinedOverflow[3] = '\0';
1125  theExtendedSubheaderDataLen[5] = '\0';
1126  theExtendedSubheaderOverflow[3] = '\0';
1127 
1128  theDataLocation = 0;
1129 }
char theSignificantRows[9]
FIELD: NROWS.
ossim_uint16 theBlockMaskRecordLength
FIELD NAME: BMRLNTH.
char theNumberOfMultispectralBands[6]
FIELD: XBANDS.
char theReleasingInstructions[21]
FIELD: ISREL.
char theNumberOfPixelsPerBlockVert[5]
FIELD: NPPBV.
char theNumberOfPixelsPerBlockHoriz[5]
FIELD: NPPBH.
char theCompressionRateCode[5]
FIELD COMRAT.
ossim_uint32 theBlockedImageDataOffset
FIELD NAME: IMDATOFF.
char theRepresentation[9]
FIELD: IREP.
char theClassificationAuthority[41]
FIELD: ISCAUT.
ossim_uint16 thePadPixelMaskRecordLength
FIELD: TMRLNTH.
char theNumberOfBands[2]
FIELD: NBANDS.
char theSecuritySourceDate[9]
FIELD: ISSRDT.
char theUserDefinedImageDataLength[6]
FIELD: UDIDL.
ossim_uint16 thePadOutputPixelCode
FIELD: TPXCD.
char theActualBitsPerPixelPerBand[3]
FIELD: ABPP.
char theCodewords[12]
FIELD: ISCODE.
ossimRefPtr< ossimNitfCompressionHeader > theCompressionHeader
char theNumberOfBitsPerPixelPerBand[3]
FIELD: NBPP.
char theNumberOfBlocksPerRow[5]
FIELD: NBPR.
char theGeographicLocation[61]
FIELD: IGEOLO.
char theControlAndHandling[3]
FIELD: ISCTLH.
char theSecurityClassificationSys[3]
FIELD: ISCLSY.
char theClassificationReason[2]
FIELD: ISCRSN.
char theDeclassificationDate[9]
FIELD: ISDCDT.
char theImageId[11]
FIELD: IID1 Is a required 10 Alphanumeric value.
char theSecurityControlNumber[16]
FIELD: ISCTLN.
std::vector< ossim_uint32 > thePadPixelMaskRecords
char theExtendedSubheaderDataLen[6]
FIELD: IXSHDL.
char theImageMode[2]
FIELD: IMODE.
char theTargetId[18]
FIELD: TGTID.
char theImageLocation[11]
FIELD: ILOC.
char theImageSyncCode[2]
FIELD: ISYNC.
char theDeclassificationType[3]
FIELD: ISDCTP.
char theAttachmentLevel[4]
FIELD: IALVL.
char theJustification[2]
FIELD: PJUST.
char theUserDefinedOverflow[4]
FIELD: UDOFL.
char theDeclassificationExempt[5]
FIELD: ISDCXM.
char theNumberOfBlocksPerCol[5]
FIELD: NBPC.
char theDisplayLevel[4]
FIELD: IDLVL.
char theDowngradeDate[9]
FIELD: ISDGDT.
char theImageSource[43]
FIELD: ISORCE.
std::vector< ossim_uint32 > theBlockMaskRecords
char theSecurityClassification[2]
FIELD: ISCLAS.
ossim_uint16 theTransparentOutputPixelCodeLength
FIELD: TPXCDLNTH.
char theCoordinateSystem[2]
FIELD: ICORDS.
char theSignificantCols[9]
FIELD: NCOLS.
char theClassificationText[44]
FIELD: ISCLTX.
char theExtendedSubheaderOverflow[4]
FIELD: IXSOFL.
std::vector< ossimString > theImageComments
char thePixelValueType[4]
FIELD: PVTYPE.
char theClassificationAuthType[2]
FIELD: ISCATP.
char theImageMagnification[5]
FIELD: IMAG.

◆ encodeUtm()

ossimString ossimNitfImageHeaderV2_1::encodeUtm ( ossim_uint32  zone,
const ossimDpt ul,
const ossimDpt ur,
const ossimDpt lr,
const ossimDpt ll 
) const
private

Definition at line 1672 of file ossimNitfImageHeaderV2_1.cpp.

Referenced by setUtmNorth(), and setUtmSouth().

1678 {
1679  ostringstream out;
1680 
1681  if(zone > 60)
1682  {
1683  std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUTM zone greate than 60!";
1684  if (traceDebug())
1685  {
1686  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1687  }
1688  throw std::out_of_range(s);
1689  }
1690 
1691  ossim_float64 east = ul.x;
1692  ossim_float64 north = ul.y;
1693 
1694  if((ossim_uint32)(east+.5) > 999999)
1695  {
1696  std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left easting too large for NITF field!";
1697  if (traceDebug())
1698  {
1699  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1700  }
1701  throw std::out_of_range(s);
1702  }
1703 
1704  if((ossim_uint32)(north+.5) > 9999999)
1705  {
1706  std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left northing too large for NITF field!";
1707  if (traceDebug())
1708  {
1709  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1710  }
1711  throw std::out_of_range(s);
1712  }
1713 
1714  out << setw(2)
1715  << setfill('0')
1716  << zone
1717  << setw(6)
1718  << setfill('0')
1719  <<(ossim_uint32)(east+.5)
1720  << setw(7)
1721  << setfill('0')
1722  <<(ossim_uint32)(north+.5);
1723 
1724 
1725  east = ur.x;
1726  north = ur.y;
1727 
1728  if((ossim_uint32)(east+.5) > 999999)
1729  {
1730  std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right easting too large for NITF field!";
1731  if (traceDebug())
1732  {
1733  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1734  }
1735  throw std::out_of_range(s);
1736  }
1737 
1738  if((ossim_uint32)(north+.5) > 9999999)
1739  {
1740  std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right northing too large for NITF field!";
1741  if (traceDebug())
1742  {
1743  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1744  }
1745  throw std::out_of_range(s);
1746  }
1747 
1748  out << setw(2)
1749  << setfill('0')
1750  << zone
1751  << setw(6)
1752  << setfill('0')
1753  <<(ossim_uint32)(east+.5)
1754  << setw(7)
1755  << setfill('0')
1756  <<(ossim_uint32)(north+.5);
1757  east = lr.x;
1758  north = lr.y;
1759 
1760  if((ossim_uint32)(east+.5) > 999999)
1761  {
1762  std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right easting too large for NITF field!";
1763  if (traceDebug())
1764  {
1765  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1766  }
1767  throw std::out_of_range(s);
1768  }
1769 
1770  if((ossim_uint32)(north+.5) > 9999999)
1771  {
1772  std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right northing too large for NITF field!";
1773  if (traceDebug())
1774  {
1775  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1776  }
1777  throw std::out_of_range(s);
1778  }
1779 
1780  out << setw(2)
1781  << setfill('0')
1782  << zone
1783  << setw(6)
1784  << setfill('0')
1785  <<(ossim_uint32)(east+.5)
1786  << setw(7)
1787  << setfill('0')
1788  <<(ossim_uint32)(north+.5);
1789 
1790  east = ll.x;
1791  north = ll.y;
1792 
1793  if((ossim_uint32)(east+.5) > 999999)
1794  {
1795  std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left easting too large for NITF field!";
1796  if (traceDebug())
1797  {
1798  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1799  }
1800  throw std::out_of_range(s);
1801  }
1802 
1803  if((ossim_uint32)(north+.5) > 9999999)
1804  {
1805  std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left northing too large for NITF field!";
1806  if (traceDebug())
1807  {
1808  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1809  }
1810  throw std::out_of_range(s);
1811  }
1812 
1813  out << setw(2)
1814  << setfill('0')
1815  << zone
1816  << setw(6)
1817  << setfill('0')
1818  <<(ossim_uint32)(east+.5)
1819  << setw(7)
1820  << setfill('0')
1821  <<(ossim_uint32)(north+.5);
1822 
1823  return out.str().c_str();
1824 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
double y
Definition: ossimDpt.h:165
double ossim_float64
unsigned int ossim_uint32
double x
Definition: ossimDpt.h:164
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ getAcquisitionDateMonthDayYear()

ossimString ossimNitfImageHeaderV2_1::getAcquisitionDateMonthDayYear ( ossim_uint8  separationChar = '-') const
virtual

Implements ossimNitfImageHeader.

Definition at line 897 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theDateTime.

898 {
899  ossimString result;
900 
901  result += ossimString(theDateTime + 4,
902  theDateTime + 6);
903  result += ossimString(separationChar);
904  result += ossimString(theDateTime + 6,
905  theDateTime + 8);
906  result += ossimString(separationChar);
907  result += ossimString(theDateTime,
908  theDateTime + 4);
909 
910  return result;
911 }

◆ getActualBitsPerPixelPerBand()

ossim_int32 ossimNitfImageHeaderV2_1::getActualBitsPerPixelPerBand ( ) const
virtual

◆ getBandInformation()

const ossimRefPtr< ossimNitfImageBand > ossimNitfImageHeaderV2_1::getBandInformation ( ossim_uint32  idx) const
virtual

Implements ossimNitfImageHeader.

Definition at line 1661 of file ossimNitfImageHeaderV2_1.cpp.

References theImageBands.

1662 {
1663  if(idx < theImageBands.size())
1664  {
1665  return (ossimNitfImageBand*)theImageBands[idx].get();
1666  }
1667 
1668  return 0;
1669 }
std::vector< ossimRefPtr< ossimNitfImageBandV2_1 > > theImageBands

◆ getBitsPerPixelPerBand()

ossim_int32 ossimNitfImageHeaderV2_1::getBitsPerPixelPerBand ( ) const
virtual

◆ getBlockImageRect()

ossimIrect ossimNitfImageHeaderV2_1::getBlockImageRect ( ) const
virtual

Returns the zero based image rectangle expanded out to block boundaries.

Note
This may or may not be the same as the rect from getImageRect.

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 1181 of file ossimNitfImageHeaderV2_1.cpp.

References getNumberOfBlocksPerCol(), getNumberOfBlocksPerRow(), getNumberOfPixelsPerBlockHoriz(), and getNumberOfPixelsPerBlockVert().

1182 {
1183 // ossimDpt ul(ossimString((char*)(&theImageLocation[5])).toDouble(),
1184 // ossimString((char*)theImageLocation,
1185 //g (char*)(&theImageLocation[5])).toDouble());
1186  ossimDpt ul(0.0,0.0);
1187 
1190 
1191 // ossimDpt lr(ul.x + cols-1,
1192 // ul.y + rows-1);
1193  ossimDpt lr(cols-1,
1194  rows-1);
1195 
1196  return ossimIrect(ul, lr);
1197 }
virtual ossim_int32 getNumberOfBlocksPerCol() const
virtual ossim_int32 getNumberOfBlocksPerRow() const
virtual ossim_int32 getNumberOfPixelsPerBlockVert() const
virtual ossim_int32 getNumberOfPixelsPerBlockHoriz() const

◆ getBlockMaskRecordOffset()

ossim_uint32 ossimNitfImageHeaderV2_1::getBlockMaskRecordOffset ( ossim_uint32  blockNumber,
ossim_uint32  bandNumber 
) const
virtual

Implements ossimNitfImageHeader.

Definition at line 957 of file ossimNitfImageHeaderV2_1.cpp.

References getNumberOfBands(), getNumberOfBlocksPerCol(), getNumberOfBlocksPerRow(), hasBlockMaskRecords(), ossimNitfImageHeaderV2_X::theBlockMaskRecords, and ossimNitfImageHeaderV2_X::theImageMode.

959 {
961  ossim_uint32 result = 0xffffffff;
962 
963  if((hasBlockMaskRecords())&&
964  (blockNumber < maxBlock))
965  {
966  if(theImageMode[0] == 'S')
967  {
968  if(bandNumber < (ossim_uint32)getNumberOfBands())
969  {
970  result = theBlockMaskRecords[bandNumber*maxBlock + blockNumber];
971  }
972  }
973  else
974  {
975  result = theBlockMaskRecords[blockNumber];
976  }
977  }
978 
979  return result;
980 }
virtual ossim_int32 getNumberOfBlocksPerCol() const
virtual bool hasBlockMaskRecords() const
virtual ossim_int32 getNumberOfBands() const
char theImageMode[2]
FIELD: IMODE.
virtual ossim_int32 getNumberOfBlocksPerRow() const
unsigned int ossim_uint32
std::vector< ossim_uint32 > theBlockMaskRecords

◆ getCategory()

ossimString ossimNitfImageHeaderV2_1::getCategory ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 913 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theCategory.

914 {
915  return theCategory;
916 }

◆ getCompressionHeader()

const ossimRefPtr< ossimNitfCompressionHeader > ossimNitfImageHeaderV2_1::getCompressionHeader ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 1656 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theCompressionHeader.

1657 {
1658  return theCompressionHeader;
1659 }
ossimRefPtr< ossimNitfCompressionHeader > theCompressionHeader

◆ getCoordinateSystem()

ossimString ossimNitfImageHeaderV2_1::getCoordinateSystem ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 928 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theCoordinateSystem.

929 {
930  return theCoordinateSystem;
931 }
char theCoordinateSystem[2]
FIELD: ICORDS.

◆ getGeographicLocation()

ossimString ossimNitfImageHeaderV2_1::getGeographicLocation ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 932 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theGeographicLocation.

933 {
934  return theGeographicLocation;
935 }
char theGeographicLocation[61]
FIELD: IGEOLO.

◆ getImageDateAndTime()

ossimString ossimNitfImageHeaderV2_1::getImageDateAndTime ( ) const
virtual
Returns
The IDATIM field unparsed.

Implements ossimNitfImageHeader.

Definition at line 892 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theDateTime.

◆ getImageId()

ossimString ossimNitfImageHeaderV2_1::getImageId ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 867 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theImageId.

868 {
869  return theImageId;
870 }
char theImageId[11]
FIELD: IID1 Is a required 10 Alphanumeric value.

◆ getImageRect()

ossimIrect ossimNitfImageHeaderV2_1::getImageRect ( ) const
virtual

Returns the zero based image rectangle.

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 1164 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theSignificantCols, ossimNitfImageHeaderV2_X::theSignificantRows, and ossimString::toDouble().

1165 {
1166 // ossimDpt ul(ossimString((char*)(&theImageLocation[5])).toDouble(),
1167 // ossimString((char*)theImageLocation,
1168 // (char*)(&theImageLocation[5])).toDouble());
1169  ossimDpt ul(0.0,0.0);
1170  double rows = ossimString(theSignificantRows).toDouble();
1171  double cols = ossimString(theSignificantCols).toDouble();
1172 
1173 // ossimDpt lr(ul.x + cols-1,
1174 // ul.y + rows-1);
1175  ossimDpt lr(cols-1,
1176  rows-1);
1177 
1178  return ossimIrect(ul, lr);
1179 }
char theSignificantRows[9]
FIELD: NROWS.
double toDouble() const
char theSignificantCols[9]
FIELD: NCOLS.

◆ getImageSource()

ossimString ossimNitfImageHeaderV2_1::getImageSource ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 918 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theImageSource.

919 {
920  return theImageSource;
921 }
char theImageSource[43]
FIELD: ISORCE.

◆ getIMode()

ossimString ossimNitfImageHeaderV2_1::getIMode ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 882 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theImageMode, and ossimString::trim().

883 {
884  return ossimString(theImageMode).trim();
885 }
char theImageMode[2]
FIELD: IMODE.
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ getNumberOfBands()

ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfBands ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 845 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theNumberOfBands, theNumberOfMultispectralBands, and ossimString::toInt32().

Referenced by getBlockMaskRecordOffset(), getPadPixelMaskRecordOffset(), and setNumberOfBands().

846 {
847  if(theNumberOfBands[0] == '0')
848  {
850  }
851  else
852  {
854  }
855 }
char theNumberOfMultispectralBands[6]
FIELD: XBANDS.
char theNumberOfBands[2]
FIELD: NBANDS.
ossim_int32 toInt32() const

◆ getNumberOfBlocksPerCol()

ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfBlocksPerCol ( ) const
virtual

◆ getNumberOfBlocksPerRow()

ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfBlocksPerRow ( ) const
virtual

◆ getNumberOfCols()

ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfCols ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 862 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theSignificantCols, and ossimString::toInt32().

Referenced by getNumberOfPixelsPerBlockHoriz().

863 {
865 }
ossim_int32 toInt32() const
char theSignificantCols[9]
FIELD: NCOLS.

◆ getNumberOfPixelsPerBlockHoriz()

ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfPixelsPerBlockHoriz ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 1141 of file ossimNitfImageHeaderV2_1.cpp.

References getNumberOfBlocksPerCol(), getNumberOfCols(), ossimNitfImageHeaderV2_X::theNumberOfPixelsPerBlockHoriz, and ossimString::toInt32().

Referenced by getBlockImageRect().

1142 {
1143  // return ossimString(theNumberOfPixelsPerBlockHoriz).toInt32();
1145  if ((rval == 0) && (getNumberOfBlocksPerCol() == 1))
1146  {
1147  rval = getNumberOfCols();
1148  }
1149  return rval;
1150 
1151 }
virtual ossim_int32 getNumberOfBlocksPerCol() const
char theNumberOfPixelsPerBlockHoriz[5]
FIELD: NPPBH.
virtual ossim_int32 getNumberOfCols() const
ossim_int32 toInt32() const
int ossim_int32

◆ getNumberOfPixelsPerBlockVert()

ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfPixelsPerBlockVert ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 1153 of file ossimNitfImageHeaderV2_1.cpp.

References getNumberOfBlocksPerRow(), getNumberOfRows(), ossimNitfImageHeaderV2_X::theNumberOfPixelsPerBlockVert, and ossimString::toInt32().

Referenced by getBlockImageRect().

1154 {
1155 // return ossimString(theNumberOfPixelsPerBlockVert).toInt32();
1157  if ((rval == 0) && (getNumberOfBlocksPerRow() == 1))
1158  {
1159  rval = getNumberOfRows();
1160  }
1161  return rval;
1162 }
char theNumberOfPixelsPerBlockVert[5]
FIELD: NPPBV.
ossim_int32 toInt32() const
virtual ossim_int32 getNumberOfBlocksPerRow() const
virtual ossim_int32 getNumberOfRows() const
int ossim_int32

◆ getNumberOfRows()

ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfRows ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 857 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theSignificantRows, and ossimString::toInt32().

Referenced by getNumberOfPixelsPerBlockVert().

858 {
860 }
char theSignificantRows[9]
FIELD: NROWS.
ossim_int32 toInt32() const

◆ getPadPixelMaskRecordOffset()

ossim_uint32 ossimNitfImageHeaderV2_1::getPadPixelMaskRecordOffset ( ossim_uint32  blockNumber,
ossim_uint32  bandNumber 
) const
virtual

Implements ossimNitfImageHeader.

Definition at line 982 of file ossimNitfImageHeaderV2_1.cpp.

References getNumberOfBands(), getNumberOfBlocksPerCol(), getNumberOfBlocksPerRow(), hasPadPixelMaskRecords(), ossimNitfImageHeaderV2_X::theImageMode, and ossimNitfImageHeaderV2_X::thePadPixelMaskRecords.

984 {
986  ossim_uint32 result = 0xffffffff;
987 
988  if((hasPadPixelMaskRecords())&&
989  (blockNumber < maxBlock))
990  {
991  if(theImageMode[0] == 'S')
992  {
993  if(bandNumber < (ossim_uint32)getNumberOfBands())
994  {
995  result = thePadPixelMaskRecords[bandNumber*maxBlock + blockNumber];
996  }
997  }
998  else
999  {
1000  result = thePadPixelMaskRecords[blockNumber];
1001  }
1002  }
1003 
1004  return result;
1005 }
virtual ossim_int32 getNumberOfBlocksPerCol() const
virtual ossim_int32 getNumberOfBands() const
std::vector< ossim_uint32 > thePadPixelMaskRecords
char theImageMode[2]
FIELD: IMODE.
virtual ossim_int32 getNumberOfBlocksPerRow() const
unsigned int ossim_uint32
virtual bool hasPadPixelMaskRecords() const

◆ getPixelValueType()

ossimString ossimNitfImageHeaderV2_1::getPixelValueType ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 1200 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::thePixelValueType, and ossimString::trim().

1201 {
1203 }
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
char thePixelValueType[4]
FIELD: PVTYPE.

◆ getProperty()

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

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 1547 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::getProperty(), ISCATP_KW, ISCAUT_KW, ISCLSY_KW, ISCLTX_KW, ISCODE_KW, ISCRSN_KW, ISCTLH_KW, ISCTLN_KW, ISDCDT_KW, ISDCTP_KW, ISDCXM_KW, ISDG_KW, ISDGDT_KW, ISREL_KW, ISSRDT_KW, theClassificationAuthority, theClassificationAuthType, theClassificationReason, theClassificationText, theCodewords, theControlAndHandling, theDeclassificationDate, theDeclassificationExempt, theDeclassificationType, theDowngrade, theDowngradeDate, theReleasingInstructions, theSecurityClassificationSys, theSecurityControlNumber, and theSecuritySourceDate.

1548 {
1549  ossimProperty* property = 0;
1550 
1551  if(name == ISCLSY_KW)
1552  {
1553  property = new ossimStringProperty(name,
1555  }
1556  else if(name == ISCODE_KW)
1557  {
1558  property = new ossimStringProperty(name,
1559  ossimString(theCodewords).trim());
1560  }
1561  else if(name == ISCTLH_KW)
1562  {
1563  property = new ossimStringProperty(name,
1565  }
1566  else if(name == ISREL_KW)
1567  {
1568  property = new ossimStringProperty(name,
1570  }
1571  else if(name == ISDCTP_KW)
1572  {
1573  property = new ossimStringProperty(name,
1575  }
1576  else if(name == ISDCDT_KW)
1577  {
1578  property = new ossimStringProperty(name,
1580  }
1581  else if(name == ISDCXM_KW)
1582  {
1583  property = new ossimStringProperty(name,
1585  }
1586  else if(name == ISDG_KW)
1587  {
1588  property = new ossimStringProperty(name,
1589  ossimString(theDowngrade).trim());
1590  }
1591  else if(name == ISDGDT_KW)
1592  {
1593  property = new ossimStringProperty(name,
1594  ossimString(theDowngradeDate).trim());
1595  }
1596  else if(name == ISCLTX_KW)
1597  {
1598  property = new ossimStringProperty(name,
1600  }
1601  else if(name == ISCATP_KW)
1602  {
1603  property = new ossimStringProperty(name,
1605  }
1606  else if(name == ISCAUT_KW)
1607  {
1608  property = new ossimStringProperty(name,
1610  }
1611  else if(name == ISCRSN_KW)
1612  {
1613  property = new ossimStringProperty(name,
1615  }
1616  else if(name == ISSRDT_KW)
1617  {
1618  property = new ossimStringProperty(name,
1620  }
1621  else if(name == ISCTLN_KW)
1622  {
1623  property = new ossimStringProperty(name,
1625  }
1626  else
1627  {
1629  }
1630 
1631  return property;
1632 }
char theReleasingInstructions[21]
FIELD: ISREL.
static const ossimString ISDGDT_KW
char theClassificationAuthority[41]
FIELD: ISCAUT.
static const ossimString ISCODE_KW
char theSecuritySourceDate[9]
FIELD: ISSRDT.
static const ossimString ISCLSY_KW
static const ossimString ISDCTP_KW
static const ossimString ISSRDT_KW
char theCodewords[12]
FIELD: ISCODE.
char theControlAndHandling[3]
FIELD: ISCTLH.
char theSecurityClassificationSys[3]
FIELD: ISCLSY.
char theClassificationReason[2]
FIELD: ISCRSN.
char theDeclassificationDate[9]
FIELD: ISDCDT.
char theSecurityControlNumber[16]
FIELD: ISCTLN.
static const ossimString ISDCDT_KW
char theDeclassificationType[3]
FIELD: ISDCTP.
static const ossimString ISREL_KW
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
char theDeclassificationExempt[5]
FIELD: ISDCXM.
static const ossimString ISCTLH_KW
char theDowngradeDate[9]
FIELD: ISDGDT.
static const ossimString ISCAUT_KW
static const ossimString ISCRSN_KW
static const ossimString ISDCXM_KW
static const ossimString ISCTLN_KW
static const ossimString ISCATP_KW
static const ossimString ISCLTX_KW
static const ossimString ISDG_KW
char theClassificationText[44]
FIELD: ISCLTX.
char theClassificationAuthType[2]
FIELD: ISCATP.

◆ getPropertyNames()

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

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 1634 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::getPropertyNames(), ISCATP_KW, ISCAUT_KW, ISCLSY_KW, ISCLTX_KW, ISCODE_KW, ISCRSN_KW, ISCTLH_KW, ISCTLN_KW, ISDCDT_KW, ISDCTP_KW, ISDCXM_KW, ISDG_KW, ISDGDT_KW, ISREL_KW, ISSRDT_KW, and XBANDS_KW.

1635 {
1637 
1638  propertyNames.push_back(ISCLSY_KW);
1639  propertyNames.push_back(ISCODE_KW);
1640  propertyNames.push_back(ISCTLH_KW);
1641  propertyNames.push_back(ISREL_KW);
1642  propertyNames.push_back(ISDCTP_KW);
1643  propertyNames.push_back(ISDCDT_KW);
1644  propertyNames.push_back(ISDCXM_KW);
1645  propertyNames.push_back(ISDG_KW);
1646  propertyNames.push_back(ISDGDT_KW);
1647  propertyNames.push_back(ISCLTX_KW);
1648  propertyNames.push_back(ISCATP_KW);
1649  propertyNames.push_back(ISCAUT_KW);
1650  propertyNames.push_back(ISCRSN_KW);
1651  propertyNames.push_back(ISSRDT_KW);
1652  propertyNames.push_back(ISCTLN_KW);
1653  propertyNames.push_back(XBANDS_KW);
1654 }
static const ossimString ISDGDT_KW
static const ossimString ISCODE_KW
static const ossimString ISCLSY_KW
static const ossimString ISDCTP_KW
static const ossimString ISSRDT_KW
static const ossimString XBANDS_KW
static const ossimString ISDCDT_KW
static const ossimString ISREL_KW
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
static const ossimString ISCTLH_KW
static const ossimString ISCAUT_KW
static const ossimString ISCRSN_KW
static const ossimString ISDCXM_KW
static const ossimString ISCTLN_KW
static const ossimString ISCATP_KW
static const ossimString ISCLTX_KW
static const ossimString ISDG_KW

◆ getRepresentation()

ossimString ossimNitfImageHeaderV2_1::getRepresentation ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 923 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theRepresentation.

924 {
925  return theRepresentation;
926 }
char theRepresentation[9]
FIELD: IREP.

◆ getSecurityClassification()

ossimString ossimNitfImageHeaderV2_1::getSecurityClassification ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 887 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theSecurityClassification.

888 {
890 }
char theSecurityClassification[2]
FIELD: ISCLAS.

◆ getTransparentCode()

ossim_uint32 ossimNitfImageHeaderV2_1::getTransparentCode ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 952 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::thePadOutputPixelCode.

953 {
954  return thePadOutputPixelCode;
955 }
ossim_uint16 thePadOutputPixelCode
FIELD: TPXCD.

◆ hasBlockMaskRecords()

bool ossimNitfImageHeaderV2_1::hasBlockMaskRecords ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 937 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theBlockMaskRecords.

Referenced by getBlockMaskRecordOffset().

938 {
939  return (theBlockMaskRecords.size() > 0);
940 }
std::vector< ossim_uint32 > theBlockMaskRecords

◆ hasPadPixelMaskRecords()

bool ossimNitfImageHeaderV2_1::hasPadPixelMaskRecords ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 942 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::thePadPixelMaskRecords.

Referenced by getPadPixelMaskRecordOffset().

943 {
944  return (thePadPixelMaskRecords.size()>0);
945 }
std::vector< ossim_uint32 > thePadPixelMaskRecords

◆ hasTransparentCode()

bool ossimNitfImageHeaderV2_1::hasTransparentCode ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 947 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theTransparentOutputPixelCodeLength.

948 {
950 }
ossim_uint16 theTransparentOutputPixelCodeLength
FIELD: TPXCDLNTH.

◆ isCompressed()

bool ossimNitfImageHeaderV2_1::isCompressed ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 833 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theCompression, and ossimString::trim().

834 {
836  temp = temp.trim();
837  return ((temp != "NC") && (temp != "NM"));
838 }
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.

◆ isEncrypted()

bool ossimNitfImageHeaderV2_1::isEncrypted ( ) const
virtual

Implements ossimNitfImageHeader.

Definition at line 840 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theEncryption.

841 {
842  return (theEncryption[0] == '1');
843 }

◆ isValid()

bool ossimNitfImageHeaderV2_1::isValid ( ) const
virtual

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

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 725 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::isValid().

726 {
727  bool result = ossimNitfImageHeaderV2_X::isValid();
728 
729  if(result)
730  {
731 
732  }
733 
734  return result;
735 }
virtual bool isValid() const
isValid will test if the fields are valid and will return true or false.

◆ loadState()

bool ossimNitfImageHeaderV2_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 ISCLAS, 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 ossimNitfImageHeaderV2_X.

Definition at line 737 of file ossimNitfImageHeaderV2_1.cpp.

References ossimKeywordlist::find(), ISCATP_KW, ISCAUT_KW, ISCLSY_KW, ISCLTX_KW, ISCODE_KW, ISCRSN_KW, ISCTLH_KW, ISCTLN_KW, ISDCDT_KW, ISDCTP_KW, ISDCXM_KW, ISDG_KW, ISDGDT_KW, ISREL_KW, ISSRDT_KW, ossimNitfImageHeaderV2_X::loadState(), ossimNitfImageHeaderV2_X::NBANDS_KW, setClassificationAuthority(), setClassificationAuthorityType(), setClassificationReason(), setClassificationText(), setCodewords(), setControlAndHandling(), setDeclassificationDate(), setDeclassificationExempt(), setDeclassificationType(), setDowngrade(), setDowngradeDate(), setNumberOfBands(), setReleasingInstructions(), setSecurityClassificationSystem(), setSecurityControlNumber(), and setSecuritySourceDate().

738 {
739  // Note: Currently not looking up all fieds only ones that make sense.
740 
741  const char* lookup;
742 
743  lookup = kwl.find( prefix, ISCLSY_KW );
744  if ( lookup )
745  {
747  }
748  lookup = kwl.find( prefix, ISCODE_KW );
749  if ( lookup )
750  {
751  setCodewords( ossimString(lookup) );
752  }
753  lookup = kwl.find( prefix, ISCTLH_KW );
754  if ( lookup )
755  {
757  }
758  lookup = kwl.find( prefix, ISREL_KW);
759  if ( lookup )
760  {
762  }
763  lookup = kwl.find( prefix, ISDCTP_KW );
764  if ( lookup )
765  {
767  }
768  lookup = kwl.find( prefix, ISDCDT_KW );
769  if ( lookup )
770  {
772  }
773  lookup = kwl.find( prefix, ISDCXM_KW );
774  if ( lookup )
775  {
777  }
778  lookup = kwl.find( prefix, ISDG_KW );
779  if ( lookup )
780  {
781  setDowngrade( ossimString(lookup) );
782  }
783  lookup = kwl.find( prefix, ISDGDT_KW );
784  if ( lookup )
785  {
786  setDowngradeDate( ossimString(lookup) );
787  }
788  lookup = kwl.find( prefix, ISCLTX_KW );
789  if ( lookup )
790  {
792  }
793  lookup = kwl.find( prefix, ISCATP_KW );
794  if ( lookup )
795  {
797  }
798  lookup = kwl.find( prefix, ISCAUT_KW );
799  if ( lookup )
800  {
802  }
803  lookup = kwl.find( prefix, ISCRSN_KW );
804  if ( lookup )
805  {
807  }
808  lookup = kwl.find( prefix, ISSRDT_KW );
809  if ( lookup )
810  {
812  }
813  lookup = kwl.find( prefix, ISCTLN_KW );
814  if ( lookup )
815  {
817  }
818  lookup = kwl.find( prefix, NBANDS_KW );
819  if ( lookup )
820  {
821  setNumberOfBands( ossimString(lookup).toUInt32() );
822  }
823  /* Setting this in the writer versus loadstate right now
824  for (int i=0; i < theImageBands.size(); ++i)
825  {
826  theImageBands[i]->loadState(kwl, prefix, i);
827  }
828  */
829 
830  return ossimNitfImageHeaderV2_X::loadState(kwl, prefix);
831 }
virtual void setClassificationAuthorityType(const ossimString &value)
static const ossimString ISDGDT_KW
virtual void setNumberOfBands(ossim_uint32 nbands)
static const ossimString ISCODE_KW
const char * find(const char *key) const
virtual void setClassificationReason(const ossimString &value)
virtual void setDeclassificationDate(const ossimString &value)
static const ossimString ISCLSY_KW
static const ossimString ISDCTP_KW
static const ossimString ISSRDT_KW
virtual void setControlAndHandling(const ossimString &value)
virtual void setSecuritySourceDate(const ossimString &value)
virtual void setDeclassificationExempt(const ossimString &value)
static const ossimString ISDCDT_KW
static const ossimString ISREL_KW
virtual void setClassificationText(const ossimString &value)
virtual void setCodewords(const ossimString &value)
virtual void setDeclassificationType(const ossimString &value)
virtual void setReleasingInstructions(const ossimString &value)
static const ossimString ISCTLH_KW
virtual void setDowngradeDate(const ossimString &value)
virtual void setClassificationAuthority(const ossimString &value)
static const ossimString ISCAUT_KW
static const ossimString ISCRSN_KW
static const ossimString ISDCXM_KW
virtual void setSecurityControlNumber(const ossimString &value)
static const ossimString NBANDS_KW
static const ossimString ISCTLN_KW
static const ossimString ISCATP_KW
static const ossimString ISCLTX_KW
static const ossimString ISDG_KW
virtual void setSecurityClassificationSystem(const ossimString &value)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to set fields from a keyword list.
virtual void setDowngrade(const ossimString &value)

◆ parseStream() [1/2]

virtual void ossimNitfImageHeaderV2_1::parseStream ( std::istream &  in,
const ossimNitfFileHeaderV2_1 file 
)
virtual

◆ parseStream() [2/2]

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

◆ print()

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

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

Implements ossimNitfImageHeader.

Definition at line 527 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeaderV2_X::theActualBitsPerPixelPerBand, ossimNitfImageHeaderV2_X::theAttachmentLevel, ossimNitfImageHeaderV2_X::theBlockedImageDataOffset, ossimNitfImageHeaderV2_X::theBlockMaskRecordLength, ossimNitfImageHeaderV2_X::theCategory, theClassificationAuthority, theClassificationAuthType, theClassificationReason, theClassificationText, theCodewords, ossimNitfImageHeaderV2_X::theCompression, ossimNitfImageHeaderV2_X::theCompressionRateCode, theControlAndHandling, ossimNitfImageHeaderV2_X::theCoordinateSystem, ossimNitfImageHeaderV2_X::theDateTime, theDeclassificationDate, theDeclassificationExempt, theDeclassificationType, ossimNitfImageHeaderV2_X::theDisplayLevel, theDowngrade, theDowngradeDate, ossimNitfImageHeaderV2_X::theEncryption, ossimNitfImageHeaderV2_X::theExtendedSubheaderDataLen, ossimNitfImageHeaderV2_X::theExtendedSubheaderOverflow, ossimNitfImageHeaderV2_X::theGeographicLocation, theImageBands, ossimNitfImageHeaderV2_X::theImageComments, ossimNitfImageHeaderV2_X::theImageId, ossimNitfImageHeaderV2_X::theImageLocation, ossimNitfImageHeaderV2_X::theImageMagnification, ossimNitfImageHeaderV2_X::theImageMode, ossimNitfImageHeaderV2_X::theImageSource, ossimNitfImageHeaderV2_X::theImageSyncCode, ossimNitfImageHeaderV2_X::theJustification, ossimNitfImageHeaderV2_X::theNumberOfBands, ossimNitfImageHeaderV2_X::theNumberOfBitsPerPixelPerBand, ossimNitfImageHeaderV2_X::theNumberOfBlocksPerCol, ossimNitfImageHeaderV2_X::theNumberOfBlocksPerRow, ossimNitfImageHeaderV2_X::theNumberOfComments, theNumberOfMultispectralBands, ossimNitfImageHeaderV2_X::theNumberOfPixelsPerBlockHoriz, ossimNitfImageHeaderV2_X::theNumberOfPixelsPerBlockVert, ossimNitfImageHeaderV2_X::thePadOutputPixelCode, ossimNitfImageHeaderV2_X::thePadPixelMaskRecordLength, ossimNitfImageHeaderV2_X::thePixelValueType, theReleasingInstructions, ossimNitfImageHeaderV2_X::theRepresentation, ossimNitfImageHeaderV2_X::theSecurityClassification, theSecurityClassificationSys, theSecurityControlNumber, theSecuritySourceDate, ossimNitfImageHeaderV2_X::theSignificantCols, ossimNitfImageHeaderV2_X::theSignificantRows, ossimNitfImageHeaderV2_X::theTargetId, ossimNitfImageHeaderV2_X::theTitle, ossimNitfImageHeaderV2_X::theTransparentOutputPixelCodeLength, ossimNitfImageHeaderV2_X::theType, ossimNitfImageHeaderV2_X::theUserDefinedImageDataLength, ossimNitfImageHeaderV2_X::theUserDefinedOverflow, and ossimString::toString().

529 {
530  out << setiosflags(ios::left)
531  << prefix << setw(24)
532  << "IM:" << theType << "\n"
533  << prefix << setw(24)
534  << "IID1:" << theImageId << "\n"
535  << prefix << setw(24)
536  << "IDATIM:" << theDateTime << "\n"
537  << prefix << setw(24)
538  << "TGTID:" << theTargetId << "\n"
539  << prefix << setw(24)
540  << "IID2:" << theTitle << "\n"
541  << prefix << setw(24)
542  << "ISCLAS:" << theSecurityClassification << "\n"
543  << prefix << setw(24)
544  << "ISCLSY:" << theSecurityClassificationSys << "\n"
545  << prefix << setw(24)
546  << "ISCODE:" << theCodewords << "\n"
547  << prefix << setw(24)
548  << "ISCTLH:" << theControlAndHandling << "\n"
549  << prefix << setw(24)
550  << "ISREL:" << theReleasingInstructions << "\n"
551  << prefix << setw(24)
552  << "ISDCTP:" << theDeclassificationType << "\n"
553  << prefix << setw(24)
554  << "ISDCDT:" << theDeclassificationDate << "\n"
555  << prefix << setw(24)
556  << "ISDCXM:" << theDeclassificationExempt << "\n"
557  << prefix << setw(24)
558  << "ISDG:" << theDowngrade << "\n"
559  << prefix << setw(24)
560  << "ISDGDT:" << theDowngradeDate << "\n"
561  << prefix << setw(24)
562  << "ISCLTX:" << theClassificationText << "\n"
563  << prefix << setw(24)
564  << "ISCATP:" << theClassificationAuthType << "\n"
565  << prefix << setw(24)
566  << "ISCAUT:" << theClassificationAuthority << "\n"
567  << prefix << setw(24)
568  << "ISCRSN:" << theClassificationReason << "\n"
569  << prefix << setw(24)
570  << "ISSRDT:" << theSecuritySourceDate << "\n"
571  << prefix << setw(24)
572  << "ISCTLN:" << theSecurityControlNumber << "\n"
573  << prefix << setw(24)
574  << "ENCRYP:" << theEncryption << "\n"
575  << prefix << setw(24)
576  << "ISORCE:" << theImageSource << "\n"
577  << prefix << setw(24)
578  << "NROWS:" << theSignificantRows << "\n"
579  << prefix << setw(24)
580  << "NCOLS:" << theSignificantCols << "\n"
581  << prefix << setw(24)
582  << "PVTYPE:" << thePixelValueType << "\n"
583  << prefix << setw(24)
584  << "IREP:" << theRepresentation << "\n"
585  << prefix << setw(24)
586  << "ICAT:" << theCategory << "\n"
587  << prefix << setw(24)
588  << "ABPP:" << theActualBitsPerPixelPerBand << "\n"
589  << prefix << setw(24)
590  << "PJUST:" << theJustification << "\n"
591  << prefix << setw(24)
592  << "ICORDS:" << theCoordinateSystem << "\n"
593  << prefix << setw(24)
594  << "IGEOLO:" << theGeographicLocation << "\n"
595  << prefix << setw(24)
596  << "NICOM:" << theNumberOfComments << "\n";
597 
598  ossim_uint32 idx = 0;
599  for(idx = 0; idx < theImageComments.size(); ++idx)
600  {
601  ossimString icpre = "ICOM" + ossimString::toString(idx) + ":";
602  out << prefix << std::setw(24) << icpre << theImageComments[idx].trim() << "\n";
603  }
604 
605  out << prefix << setw(24)
606  << "IC:" << theCompression << "\n"
607  << prefix << setw(24)
608  << "COMRAT:" << theCompressionRateCode << "\n"
609  << prefix << setw(24)
610  << "NBANDS:" << theNumberOfBands << "\n"
611  << prefix << setw(24)
612  << "XBANDS:" << theNumberOfMultispectralBands << "\n";
613 
614  for(idx = 0; idx < theImageBands.size(); ++idx)
615  {
616  if(theImageBands[idx].valid())
617  {
618  theImageBands[idx]->print(out, prefix, idx);
619  }
620  }
621 
622  out << prefix << setw(24)
623  << "ISYNC:" << theImageSyncCode << "\n"
624  << prefix << setw(24)
625  << "IMODE:" << theImageMode << "\n"
626  << prefix << setw(24)
627  << "NBPR:" << theNumberOfBlocksPerRow << "\n"
628  << prefix << setw(24)
629  << "NBPC:" << theNumberOfBlocksPerCol << "\n"
630  << prefix << setw(24)
631  << "NPPBH:" << theNumberOfPixelsPerBlockHoriz << "\n"
632  << prefix << setw(24)
633  << "NPPBV:" << theNumberOfPixelsPerBlockVert << "\n"
634  << prefix << setw(24)
635  << "NBPP:" << theNumberOfBitsPerPixelPerBand << "\n"
636  << prefix << setw(24)
637  << "IDLVL:" << theDisplayLevel << "\n"
638  << prefix << setw(24)
639  << "IALVL:" << theAttachmentLevel << "\n"
640  << prefix << setw(24)
641  << "ILOC:" << theImageLocation << "\n"
642  << prefix << setw(24)
643  << "IMAG:" << theImageMagnification << "\n"
644  << prefix << setw(24)
645  << "UDIDL:" << theUserDefinedImageDataLength << "\n"
646  << prefix << setw(24)
647  << "UDOFL:" << theUserDefinedOverflow << "\n"
648  << prefix << setw(24)
649  << "IXSHDL:" << theExtendedSubheaderDataLen << "\n"
650  << prefix << setw(24)
651  << "IXSOFL:" << theExtendedSubheaderOverflow << "\n"
652  << prefix << setw(24)
653  << "IMDATOFF:" << theBlockedImageDataOffset << "\n"
654  << prefix << setw(24)
655  << "BMRLNTH:" << theBlockMaskRecordLength << "\n"
656  << prefix << setw(24)
657  << "TMRLNTH:" << thePadPixelMaskRecordLength << "\n"
658  << prefix << setw(24)
659  << "TPXCDLNTH:" << theTransparentOutputPixelCodeLength << "\n"
660  << prefix << setw(24)
661  << "TPXCD:" << thePadOutputPixelCode << "\n";
662 
663  if ( traceDebug() )
664  {
665  out << prefix << setw(24)
666  << "theDataLocation:" << theDataLocation << "\n";
667  }
668 
669  out << std::endl;
670 
671  return printTags(out, prefix);
672 }
char theSignificantRows[9]
FIELD: NROWS.
ossim_uint16 theBlockMaskRecordLength
FIELD NAME: BMRLNTH.
char theNumberOfMultispectralBands[6]
FIELD: XBANDS.
char theReleasingInstructions[21]
FIELD: ISREL.
char theNumberOfPixelsPerBlockVert[5]
FIELD: NPPBV.
char theNumberOfPixelsPerBlockHoriz[5]
FIELD: NPPBH.
char theCompressionRateCode[5]
FIELD COMRAT.
ossim_uint32 theBlockedImageDataOffset
FIELD NAME: IMDATOFF.
char theRepresentation[9]
FIELD: IREP.
char theClassificationAuthority[41]
FIELD: ISCAUT.
ossim_uint16 thePadPixelMaskRecordLength
FIELD: TMRLNTH.
char theNumberOfBands[2]
FIELD: NBANDS.
char theSecuritySourceDate[9]
FIELD: ISSRDT.
char theUserDefinedImageDataLength[6]
FIELD: UDIDL.
ossim_uint16 thePadOutputPixelCode
FIELD: TPXCD.
static ossimString toString(bool aValue)
Numeric to string methods.
std::vector< ossimRefPtr< ossimNitfImageBandV2_1 > > theImageBands
char theActualBitsPerPixelPerBand[3]
FIELD: ABPP.
char theCodewords[12]
FIELD: ISCODE.
char theNumberOfBitsPerPixelPerBand[3]
FIELD: NBPP.
char theNumberOfBlocksPerRow[5]
FIELD: NBPR.
char theGeographicLocation[61]
FIELD: IGEOLO.
char theControlAndHandling[3]
FIELD: ISCTLH.
char theSecurityClassificationSys[3]
FIELD: ISCLSY.
char theClassificationReason[2]
FIELD: ISCRSN.
char theDeclassificationDate[9]
FIELD: ISDCDT.
char theImageId[11]
FIELD: IID1 Is a required 10 Alphanumeric value.
char theSecurityControlNumber[16]
FIELD: ISCTLN.
char theExtendedSubheaderDataLen[6]
FIELD: IXSHDL.
char theImageMode[2]
FIELD: IMODE.
char theTargetId[18]
FIELD: TGTID.
char theImageLocation[11]
FIELD: ILOC.
char theImageSyncCode[2]
FIELD: ISYNC.
char theDeclassificationType[3]
FIELD: ISDCTP.
char theAttachmentLevel[4]
FIELD: IALVL.
char theJustification[2]
FIELD: PJUST.
unsigned int ossim_uint32
char theUserDefinedOverflow[4]
FIELD: UDOFL.
char theDeclassificationExempt[5]
FIELD: ISDCXM.
char theNumberOfBlocksPerCol[5]
FIELD: NBPC.
char theDisplayLevel[4]
FIELD: IDLVL.
char theDowngradeDate[9]
FIELD: ISDGDT.
char theImageSource[43]
FIELD: ISORCE.
char theSecurityClassification[2]
FIELD: ISCLAS.
ossim_uint16 theTransparentOutputPixelCodeLength
FIELD: TPXCDLNTH.
char theCoordinateSystem[2]
FIELD: ICORDS.
char theSignificantCols[9]
FIELD: NCOLS.
char theClassificationText[44]
FIELD: ISCLTX.
virtual std::ostream & printTags(std::ostream &out, const std::string &prefix=std::string()) const
print method that outputs a key/value type format adding prefix to keys.
char theExtendedSubheaderOverflow[4]
FIELD: IXSOFL.
std::vector< ossimString > theImageComments
char thePixelValueType[4]
FIELD: PVTYPE.
char theClassificationAuthType[2]
FIELD: ISCATP.
char theImageMagnification[5]
FIELD: IMAG.

◆ saveState()

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

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 675 of file ossimNitfImageHeaderV2_1.cpp.

References ossimKeywordlist::add(), ossimKeywordlist::parseStream(), ossimNitfCompressionHeader::saveState(), ossimNitfImageHeaderV2_X::saveState(), theClassificationAuthority, theClassificationAuthType, theClassificationReason, theClassificationText, theCodewords, ossimNitfImageHeaderV2_X::theCompressionHeader, theControlAndHandling, theDeclassificationDate, theDeclassificationExempt, theDeclassificationType, theDowngrade, theDowngradeDate, theImageBands, theNumberOfMultispectralBands, theReleasingInstructions, theSecurityClassificationSys, theSecurityControlNumber, theSecuritySourceDate, and ossimRefPtr< T >::valid().

676 {
678 
679  kwl.add(prefix, "ISCLSY", theSecurityClassificationSys);
680  kwl.add(prefix, "ISCODE", theCodewords);
681  kwl.add(prefix, "ISCTLH", theControlAndHandling);
682  kwl.add(prefix, "ISREL", theReleasingInstructions);
683  kwl.add(prefix, "ISDCTP", theDeclassificationType);
684  kwl.add(prefix, "ISDCDT", theDeclassificationDate);
685  kwl.add(prefix, "ISDCXM", theDeclassificationExempt);
686  kwl.add(prefix, "ISDG", theDowngrade);
687  kwl.add(prefix, "ISDGDT", theDowngradeDate);
688  kwl.add(prefix, "ISCLTX", theClassificationText);
689  kwl.add(prefix, "ISCATP", theClassificationAuthType);
690  kwl.add(prefix, "ISCAUT", theClassificationAuthority);
691  kwl.add(prefix, "ISCRSN", theClassificationReason);
692  kwl.add(prefix, "ISSRDT", theSecuritySourceDate);
693  kwl.add(prefix, "ISCTLN", theSecurityControlNumber);
694  kwl.add(prefix, "XBANDS", theNumberOfMultispectralBands);
695 
696  ossim_uint32 idx = 0;
697 
698  std::ostringstream out;
700  {
701  theCompressionHeader->saveState(kwl, prefix);
702  }
703 
704  for(idx = 0; idx < theImageBands.size(); ++idx)
705  {
706  if(theImageBands[idx].valid())
707  {
708  theImageBands[idx]->print(out, "", idx);
709  }
710  }
711 
712  out << std::endl;
713 
714  ossimKeywordlist kwlTemp;
715 
716  std::istringstream in(out.str());
717  if(kwlTemp.parseStream(in))
718  {
719  kwl.add(prefix, kwlTemp);
720  }
721 
722  return true;
723 }
char theNumberOfMultispectralBands[6]
FIELD: XBANDS.
char theReleasingInstructions[21]
FIELD: ISREL.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theClassificationAuthority[41]
FIELD: ISCAUT.
virtual bool saveState(ossimKeywordlist &kwl, const ossimString &prefix="") const
Represents serializable keyword/value map.
bool valid() const
Definition: ossimRefPtr.h:75
char theSecuritySourceDate[9]
FIELD: ISSRDT.
std::vector< ossimRefPtr< ossimNitfImageBandV2_1 > > theImageBands
char theCodewords[12]
FIELD: ISCODE.
ossimRefPtr< ossimNitfCompressionHeader > theCompressionHeader
char theControlAndHandling[3]
FIELD: ISCTLH.
char theSecurityClassificationSys[3]
FIELD: ISCLSY.
char theClassificationReason[2]
FIELD: ISCRSN.
char theDeclassificationDate[9]
FIELD: ISDCDT.
char theSecurityControlNumber[16]
FIELD: ISCTLN.
virtual bool saveState(ossimKeywordlist &kwl, const ossimString &prefix="") const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
char theDeclassificationType[3]
FIELD: ISDCTP.
unsigned int ossim_uint32
char theDeclassificationExempt[5]
FIELD: ISDCXM.
char theDowngradeDate[9]
FIELD: ISDGDT.
virtual bool parseStream(ossim::istream &is, bool ignoreBinaryChars)
deprecated method
char theClassificationText[44]
FIELD: ISCLTX.
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
char theClassificationAuthType[2]
FIELD: ISCATP.

◆ setBandInfo()

void ossimNitfImageHeaderV2_1::setBandInfo ( ossim_uint32  idx,
const ossimNitfImageBandV2_1 info 
)
virtual

Definition at line 1229 of file ossimNitfImageHeaderV2_1.cpp.

References theImageBands.

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

1231 {
1232  if(idx < theImageBands.size())
1233  {
1234  if(!theImageBands[idx].valid())
1235  {
1237  }
1238  (*theImageBands[idx]) = info;
1239  }
1240 }
std::vector< ossimRefPtr< ossimNitfImageBandV2_1 > > theImageBands

◆ setClassificationAuthority()

void ossimNitfImageHeaderV2_1::setClassificationAuthority ( const ossimString value)
virtual

Definition at line 1440 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theClassificationAuthority.

Referenced by loadState(), and setProperty().

1441 {
1443 }
char theClassificationAuthority[41]
FIELD: ISCAUT.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setClassificationAuthorityType()

void ossimNitfImageHeaderV2_1::setClassificationAuthorityType ( const ossimString value)
virtual

Definition at line 1435 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theClassificationAuthType.

Referenced by loadState(), and setProperty().

1436 {
1438 }
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.
char theClassificationAuthType[2]
FIELD: ISCATP.

◆ setClassificationReason()

void ossimNitfImageHeaderV2_1::setClassificationReason ( const ossimString value)
virtual

Definition at line 1445 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theClassificationReason.

Referenced by loadState(), and setProperty().

1446 {
1448 }
char theClassificationReason[2]
FIELD: ISCRSN.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setClassificationText()

void ossimNitfImageHeaderV2_1::setClassificationText ( const ossimString value)
virtual

Definition at line 1430 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theClassificationText.

Referenced by loadState(), and setProperty().

1431 {
1433 }
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.
char theClassificationText[44]
FIELD: ISCLTX.

◆ setCodewords()

void ossimNitfImageHeaderV2_1::setCodewords ( const ossimString value)
virtual

Definition at line 1390 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theCodewords.

Referenced by loadState(), and setProperty().

1391 {
1393 }
char theCodewords[12]
FIELD: ISCODE.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setControlAndHandling()

void ossimNitfImageHeaderV2_1::setControlAndHandling ( const ossimString value)
virtual

Definition at line 1395 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theControlAndHandling.

Referenced by loadState(), and setProperty().

1396 {
1398 }
char theControlAndHandling[3]
FIELD: ISCTLH.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setDeclassificationDate()

void ossimNitfImageHeaderV2_1::setDeclassificationDate ( const ossimString value)
virtual

Definition at line 1410 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theDeclassificationDate.

Referenced by loadState(), and setProperty().

1411 {
1413 }
char theDeclassificationDate[9]
FIELD: ISDCDT.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setDeclassificationExempt()

void ossimNitfImageHeaderV2_1::setDeclassificationExempt ( const ossimString value)
virtual

Definition at line 1415 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theDeclassificationExempt.

Referenced by loadState(), and setProperty().

1416 {
1418 }
char theDeclassificationExempt[5]
FIELD: ISDCXM.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setDeclassificationType()

void ossimNitfImageHeaderV2_1::setDeclassificationType ( const ossimString value)
virtual

Definition at line 1405 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theDeclassificationType.

Referenced by loadState(), and setProperty().

1406 {
1408 }
char theDeclassificationType[3]
FIELD: ISDCTP.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setDowngrade()

void ossimNitfImageHeaderV2_1::setDowngrade ( const ossimString value)
virtual

Definition at line 1420 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theDowngrade.

Referenced by loadState(), and setProperty().

1421 {
1423 }
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setDowngradeDate()

void ossimNitfImageHeaderV2_1::setDowngradeDate ( const ossimString value)
virtual

Definition at line 1425 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theDowngradeDate.

Referenced by loadState(), and setProperty().

1426 {
1428 }
char theDowngradeDate[9]
FIELD: ISDGDT.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setGeographicLocationDecimalDegrees()

void ossimNitfImageHeaderV2_1::setGeographicLocationDecimalDegrees ( const ossimDpt ul,
const ossimDpt ur,
const ossimDpt lr,
const ossimDpt ll 
)
virtual

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 1299 of file ossimNitfImageHeaderV2_1.cpp.

References ossimDpt::lat, ossimDpt::lon, ossimNitfImageHeaderV2_X::theCoordinateSystem, and ossimNitfImageHeaderV2_X::theGeographicLocation.

1304 {
1305  theCoordinateSystem[0] = 'D';
1306  ostringstream out;
1307 
1308  out << (ul.lat >= 0.0?"+":"")
1309  << std::setw(6)
1310  << std::setfill('0')
1311  << std::setprecision(3)
1312  << std::setiosflags(std::ios::fixed)
1313  << ul.lat
1314  << (ul.lon >= 0.0?"+":"")
1315  << std::setw(7)
1316  << std::setfill('0')
1317  << std::setprecision(3)
1318  << std::setiosflags(std::ios::fixed)
1319  << ul.lon;
1320  out << (ur.lat >= 0.0?"+":"")
1321  << std::setw(6)
1322  << std::setfill('0')
1323  << std::setprecision(3)
1324  << std::setiosflags(std::ios::fixed)
1325  << ur.lat
1326  << (ur.lon >= 0.0?"+":"")
1327  << std::setw(7)
1328  << std::setfill('0')
1329  << std::setprecision(3)
1330  << std::setiosflags(std::ios::fixed)
1331  << ur.lon;
1332  out << (lr.lat >= 0.0?"+":"")
1333  << std::setw(6)
1334  << std::setfill('0')
1335  << std::setprecision(3)
1336  << std::setiosflags(std::ios::fixed)
1337  << lr.lat
1338  << (lr.lon >= 0.0?"+":"")
1339  << std::setw(7)
1340  << std::setfill('0')
1341  << std::setprecision(3)
1342  << std::setiosflags(std::ios::fixed)
1343  << lr.lon;
1344  out << (ll.lat >= 0.0?"+":"")
1345  << std::setw(6)
1346  << std::setfill('0')
1347  << std::setprecision(3)
1348  << std::setiosflags(std::ios::fixed)
1349  << ll.lat
1350  << (ll.lon >= 0.0?"+":"")
1351  << std::setw(7)
1352  << std::setfill('0')
1353  << std::setprecision(3)
1354  << std::setiosflags(std::ios::fixed)
1355  << ll.lon;
1356 
1357  memcpy(theGeographicLocation, out.str().c_str(), 60);
1358 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theGeographicLocation[61]
FIELD: IGEOLO.
double lat
Definition: ossimDpt.h:165
double lon
Definition: ossimDpt.h:164
char theCoordinateSystem[2]
FIELD: ICORDS.

◆ setGeographicLocationDms()

void ossimNitfImageHeaderV2_1::setGeographicLocationDms ( const ossimDpt ul,
const ossimDpt ur,
const ossimDpt lr,
const ossimDpt ll 
)
virtual

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 1260 of file ossimNitfImageHeaderV2_1.cpp.

1264 {
1265  if (traceDebug())
1266  {
1268  << ossimDms(ul.y, true).toString("ddmmss.ssssC").c_str()
1269  << ossimDms(ul.x, false).toString("dddmmss.ssssC").c_str()
1270  << ossimDms(ur.y, true).toString("ddmmss.ssssC").c_str()
1271  << ossimDms(ur.x, false).toString("dddmmss.ssssC").c_str()
1272  << ossimDms(lr.y, true).toString("ddmmss.ssssC").c_str()
1273  << ossimDms(lr.x, false).toString("dddmmss.ssssC").c_str()
1274  << ossimDms(ll.y, true).toString("ddmmss.ssssC").c_str()
1275  << ossimDms(ll.x, false).toString("dddmmss.ssssC").c_str()
1276  << std::endl;
1277 
1282  }
1283 
1284  theCoordinateSystem[0] = 'G';
1285  std::ostringstream out;
1286 
1287  out << ossimDms(ul.y, true).toString("ddmmssC").c_str();
1288  out << ossimDms(ul.x, false).toString("dddmmssC").c_str();
1289  out << ossimDms(ur.y, true).toString("ddmmssC").c_str();
1290  out << ossimDms(ur.x, false).toString("dddmmssC").c_str();
1291  out << ossimDms(lr.y, true).toString("ddmmssC").c_str();
1292  out << ossimDms(lr.x, false).toString("dddmmssC").c_str();
1293  out << ossimDms(ll.y, true).toString("ddmmssC").c_str();
1294  out << ossimDms(ll.x, false).toString("dddmmssC").c_str();
1295 
1296  memcpy(theGeographicLocation, out.str().c_str(), 60);
1297 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
double y
Definition: ossimDpt.h:165
char theGeographicLocation[61]
FIELD: IGEOLO.
void checkForGeographicTiePointTruncation(const ossimDpt &tie) const
Method to check tie point to see if it will be truncated in field IGEOLO which has only arc second re...
double x
Definition: ossimDpt.h:164
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 theCoordinateSystem[2]
FIELD: ICORDS.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
ossimString toString(const ossimString &formatString=ossimString("")) const
You can specify a number of different formats.
Definition: ossimDms.cpp:294

◆ setImageMagnification()

void ossimNitfImageHeaderV2_1::setImageMagnification ( const ossimString value)
virtual

Definition at line 1460 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and ossimNitfImageHeaderV2_X::theImageMagnification.

Referenced by ossimKakaduNitfOverviewBuilder::setImagField().

1461 {
1463 }
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.
char theImageMagnification[5]
FIELD: IMAG.

◆ setNumberOfBands()

void ossimNitfImageHeaderV2_1::setNumberOfBands ( ossim_uint32  nbands)
virtual

Definition at line 1206 of file ossimNitfImageHeaderV2_1.cpp.

References getNumberOfBands(), theImageBands, ossimNitfImageHeaderV2_X::theNumberOfBands, and theNumberOfMultispectralBands.

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

1207 {
1208  std::ostringstream out;
1209 
1210  if(nbands > 9)
1211  {
1212  out << std::setw(5)
1213  << std::setfill('0')
1214  << std::setiosflags(ios::right)
1215  << nbands;
1216 
1217  theNumberOfBands[0] = '0';
1218  memcpy(theNumberOfMultispectralBands, out.str().c_str(), 5);
1219  }
1220  else
1221  {
1222  out << nbands;
1223  theNumberOfBands[0] = out.str().c_str()[0];
1224  }
1225 
1226  theImageBands.resize(getNumberOfBands());
1227 }
char theNumberOfMultispectralBands[6]
FIELD: XBANDS.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theNumberOfBands[2]
FIELD: NBANDS.
std::vector< ossimRefPtr< ossimNitfImageBandV2_1 > > theImageBands
virtual ossim_int32 getNumberOfBands() const

◆ setNumberOfCols()

void ossimNitfImageHeaderV2_1::setNumberOfCols ( ossim_uint32  cols)
virtual

Definition at line 1251 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and ossimNitfImageHeaderV2_X::theSignificantCols.

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

1252 {
1253  std::ostringstream out;
1254  if(cols > 99999999) cols = 99999999;
1255 
1256  out << cols;
1257  ossimNitfCommon::setField(theSignificantCols, out.str(), 8, ios::right, '0');
1258 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.
char theSignificantCols[9]
FIELD: NCOLS.

◆ setNumberOfRows()

void ossimNitfImageHeaderV2_1::setNumberOfRows ( ossim_uint32  rows)
virtual

Definition at line 1242 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and ossimNitfImageHeaderV2_X::theSignificantRows.

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

1243 {
1244  std::ostringstream out;
1245  if(rows > 99999999) rows = 99999999;
1246 
1247  out << rows;
1248  ossimNitfCommon::setField(theSignificantRows, out.str(), 8, ios::right, '0');
1249 }
char theSignificantRows[9]
FIELD: NROWS.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setProperty()

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

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 1465 of file ossimNitfImageHeaderV2_1.cpp.

References ossimString::contains(), ossimString::downcase(), ISCATP_KW, ISCAUT_KW, ISCLSY_KW, ISCLTX_KW, ISCODE_KW, ISCRSN_KW, ISCTLH_KW, ISCTLN_KW, ISDCDT_KW, ISDCTP_KW, ISDCXM_KW, ISDG_KW, ISDGDT_KW, ISREL_KW, ISSRDT_KW, setClassificationAuthority(), setClassificationAuthorityType(), setClassificationReason(), setClassificationText(), setCodewords(), setControlAndHandling(), setDeclassificationDate(), setDeclassificationExempt(), setDeclassificationType(), setDowngrade(), setDowngradeDate(), ossimNitfImageHeaderV2_X::setProperty(), setReleasingInstructions(), setSecurityClassificationSystem(), setSecurityControlNumber(), setSecuritySourceDate(), theClassificationReason, and ossimProperty::valueToString().

1466 {
1467  ossimString name = property->getName();
1468 
1469  // Make case insensitive:
1470  name.downcase();
1471 
1472  std::ostringstream out;
1473 
1474  if(!property) return;
1475 
1476  if(name.contains(ISCLSY_KW))
1477  {
1479  }
1480  else if(name.contains(ISCODE_KW))
1481  {
1482  setCodewords(property->valueToString());
1483  }
1484  else if(name.contains(ISCTLH_KW))
1485  {
1486  setControlAndHandling(property->valueToString());
1487  }
1488  else if(name.contains(ISREL_KW))
1489  {
1491  }
1492  else if(name.contains(ISDCTP_KW))
1493  {
1495  }
1496  else if(name.contains(ISDCDT_KW))
1497  {
1499  }
1500  else if(name.contains(ISDCXM_KW))
1501  {
1503  }
1504  else if(name.contains(ISDGDT_KW)) // Must be before: "ISDG_KW"
1505  {
1506  setDowngradeDate(property->valueToString());
1507  }
1508  else if(name.contains(ISDG_KW))
1509  {
1510  setDowngrade(property->valueToString());
1511  }
1512  else if(name.contains(ISCLTX_KW))
1513  {
1514  setClassificationText(property->valueToString());
1515  }
1516  else if(name.contains(ISCATP_KW))
1517  {
1519  }
1520  else if(name.contains(ISCAUT_KW))
1521  {
1523  }
1524  else if(name.contains(ISCRSN_KW))
1525  {
1527  }
1528  else if(name == ISCRSN_KW)
1529  {
1530  property = new ossimStringProperty(name,
1532  }
1533  else if(name.contains(ISSRDT_KW))
1534  {
1535  setSecuritySourceDate(property->valueToString());
1536  }
1537  else if(name.contains(ISCTLN_KW))
1538  {
1540  }
1541  else
1542  {
1544  }
1545 }
virtual void valueToString(ossimString &valueResult) const =0
virtual void setClassificationAuthorityType(const ossimString &value)
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
virtual void setProperty(ossimRefPtr< ossimProperty > property)
static const ossimString ISDGDT_KW
static const ossimString ISCODE_KW
virtual void setClassificationReason(const ossimString &value)
virtual void setDeclassificationDate(const ossimString &value)
static const ossimString ISCLSY_KW
static const ossimString ISDCTP_KW
bool contains(char aChar) const
Definition: ossimString.h:58
static const ossimString ISSRDT_KW
char theClassificationReason[2]
FIELD: ISCRSN.
virtual void setControlAndHandling(const ossimString &value)
virtual void setSecuritySourceDate(const ossimString &value)
virtual void setDeclassificationExempt(const ossimString &value)
static const ossimString ISDCDT_KW
static const ossimString ISREL_KW
virtual void setClassificationText(const ossimString &value)
virtual void setCodewords(const ossimString &value)
virtual void setDeclassificationType(const ossimString &value)
virtual void setReleasingInstructions(const ossimString &value)
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
static const ossimString ISCTLH_KW
virtual void setDowngradeDate(const ossimString &value)
virtual void setClassificationAuthority(const ossimString &value)
static const ossimString ISCAUT_KW
static const ossimString ISCRSN_KW
static const ossimString ISDCXM_KW
virtual void setSecurityControlNumber(const ossimString &value)
static const ossimString ISCTLN_KW
static const ossimString ISCATP_KW
static const ossimString ISCLTX_KW
static const ossimString ISDG_KW
virtual void setSecurityClassificationSystem(const ossimString &value)
virtual void setDowngrade(const ossimString &value)

◆ setReleasingInstructions()

void ossimNitfImageHeaderV2_1::setReleasingInstructions ( const ossimString value)
virtual

Definition at line 1400 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theReleasingInstructions.

Referenced by loadState(), and setProperty().

1401 {
1403 }
char theReleasingInstructions[21]
FIELD: ISREL.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setSecurityClassificationSystem()

void ossimNitfImageHeaderV2_1::setSecurityClassificationSystem ( const ossimString value)
virtual

Definition at line 1385 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theSecurityClassificationSys.

Referenced by loadState(), and setProperty().

1386 {
1388 }
char theSecurityClassificationSys[3]
FIELD: ISCLSY.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setSecurityControlNumber()

void ossimNitfImageHeaderV2_1::setSecurityControlNumber ( const ossimString value)
virtual

Definition at line 1455 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theSecurityControlNumber.

Referenced by loadState(), and setProperty().

1456 {
1458 }
char theSecurityControlNumber[16]
FIELD: ISCTLN.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setSecuritySourceDate()

void ossimNitfImageHeaderV2_1::setSecuritySourceDate ( const ossimString value)
virtual

Definition at line 1450 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfCommon::setField(), and theSecuritySourceDate.

Referenced by loadState(), and setProperty().

1451 {
1453 }
char theSecuritySourceDate[9]
FIELD: ISSRDT.
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.

◆ setUtmNorth()

void ossimNitfImageHeaderV2_1::setUtmNorth ( ossim_uint32  zone,
const ossimDpt ul,
const ossimDpt ur,
const ossimDpt lr,
const ossimDpt ll 
)
virtual

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 1360 of file ossimNitfImageHeaderV2_1.cpp.

References encodeUtm(), ossimNitfImageHeaderV2_X::theCoordinateSystem, and ossimNitfImageHeaderV2_X::theGeographicLocation.

1365 {
1366  theCoordinateSystem[0] = 'N';
1367 
1368  memcpy(theGeographicLocation,
1369  encodeUtm(zone, ul, ur, lr, ll).c_str(), 60);
1370 }
ossimString encodeUtm(ossim_uint32 zone, const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll) const
char theGeographicLocation[61]
FIELD: IGEOLO.
char theCoordinateSystem[2]
FIELD: ICORDS.

◆ setUtmSouth()

void ossimNitfImageHeaderV2_1::setUtmSouth ( ossim_uint32  zone,
const ossimDpt ul,
const ossimDpt ur,
const ossimDpt lr,
const ossimDpt ll 
)
virtual

Reimplemented from ossimNitfImageHeaderV2_X.

Definition at line 1372 of file ossimNitfImageHeaderV2_1.cpp.

References encodeUtm(), ossimNitfImageHeaderV2_X::theCoordinateSystem, and ossimNitfImageHeaderV2_X::theGeographicLocation.

1377 {
1378  theCoordinateSystem[0] = 'S';
1379 
1380  memcpy(theGeographicLocation,
1381  encodeUtm(zone, ul, ur, lr, ll).c_str(), 60);
1382 }
ossimString encodeUtm(ossim_uint32 zone, const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll) const
char theGeographicLocation[61]
FIELD: IGEOLO.
char theCoordinateSystem[2]
FIELD: ICORDS.

◆ takeOverflowTags()

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

Definition at line 1826 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeader::removeTag(), ossimNitfImageHeaderV2_X::theExtendedSubheaderDataLen, ossimNitfImageHeaderV2_X::theExtendedSubheaderOverflow, ossimNitfImageHeader::theTagList, ossimNitfImageHeaderV2_X::theUserDefinedImageDataLength, and ossimNitfImageHeaderV2_X::theUserDefinedOverflow.

Referenced by ossimNitfWriter::takeOverflowTags().

1828 {
1829  overflowTags.clear();
1830  std::vector<ossimNitfTagInformation>::iterator iter;
1831  std::vector<ossimNitfTagInformation> specifiedTags;
1832  const ossimString tagType(userDefinedTags ? "UDID" : "IXSHD");
1833  for (iter = theTagList.begin(); iter != theTagList.end(); ++iter)
1834  {
1835  if (iter->getTagType() == tagType)
1836  {
1837  specifiedTags.push_back(*iter);
1838  }
1839  }
1840 
1841  std::sort(specifiedTags.begin(), specifiedTags.end());
1842 
1843  ossim_uint32 totalSize = 0;
1844  const ossim_uint32 maxSize = 9996;
1845  for (iter = specifiedTags.begin(); iter != specifiedTags.end() &&
1846  totalSize + iter->getTotalTagLength() <= maxSize; ++iter)
1847  {
1848  totalSize += iter->getTotalTagLength();
1849  }
1850 
1851  for (; iter != specifiedTags.end(); ++iter)
1852  {
1853  overflowTags.push_back(*iter);
1854  removeTag(iter->getTagName());
1855  }
1856 
1857  // If there are no overflow tags, then no DES is required
1858  if (overflowTags.empty() == true)
1859  {
1860  potentialDesIndex = 0;
1861  }
1862 
1863  std::ostringstream overflowDes;
1864  overflowDes << std::setw(3)
1865  << std::setfill('0')
1866  << std::setiosflags(ios::right)
1867  << potentialDesIndex;
1868 
1869  std::ostringstream tagLength;
1870  tagLength << std::setw(5)
1871  << std::setfill('0')
1872  << std::setiosflags(ios::right)
1873  << totalSize;
1874 
1875  if (userDefinedTags)
1876  {
1877  strcpy(theUserDefinedOverflow, overflowDes.str().c_str());
1878  strcpy(theUserDefinedImageDataLength, tagLength.str().c_str());
1879  }
1880  else
1881  {
1882  strcpy(theExtendedSubheaderOverflow, overflowDes.str().c_str());
1883  strcpy(theExtendedSubheaderDataLen, tagLength.str().c_str());
1884  }
1885 
1886  return (overflowTags.empty() == false);
1887 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theUserDefinedImageDataLength[6]
FIELD: UDIDL.
virtual void removeTag(const ossimString &tagName)
char theExtendedSubheaderDataLen[6]
FIELD: IXSHDL.
std::vector< ossimNitfTagInformation > theTagList
unsigned int ossim_uint32
char theUserDefinedOverflow[4]
FIELD: UDOFL.
char theExtendedSubheaderOverflow[4]
FIELD: IXSOFL.

◆ writeStream()

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

Definition at line 372 of file ossimNitfImageHeaderV2_1.cpp.

References ossimNitfImageHeader::getTotalTagLength(), ossimNotify(), ossimNotifyLevel_WARN, ossimNitfImageHeaderV2_X::theActualBitsPerPixelPerBand, ossimNitfImageHeaderV2_X::theAttachmentLevel, ossimNitfImageHeaderV2_X::theCategory, theClassificationAuthority, theClassificationAuthType, theClassificationReason, theClassificationText, theCodewords, ossimNitfImageHeaderV2_X::theCompression, ossimNitfImageHeaderV2_X::theCompressionRateCode, theControlAndHandling, ossimNitfImageHeaderV2_X::theCoordinateSystem, ossimNitfImageHeaderV2_X::theDateTime, theDeclassificationDate, theDeclassificationExempt, theDeclassificationType, ossimNitfImageHeaderV2_X::theDisplayLevel, theDowngrade, theDowngradeDate, ossimNitfImageHeaderV2_X::theEncryption, ossimNitfImageHeaderV2_X::theExtendedSubheaderDataLen, ossimNitfImageHeaderV2_X::theExtendedSubheaderOverflow, ossimNitfImageHeaderV2_X::theGeographicLocation, theImageBands, ossimNitfImageHeaderV2_X::theImageComments, ossimNitfImageHeaderV2_X::theImageId, ossimNitfImageHeaderV2_X::theImageLocation, ossimNitfImageHeaderV2_X::theImageMagnification, ossimNitfImageHeaderV2_X::theImageMode, ossimNitfImageHeaderV2_X::theImageSource, ossimNitfImageHeaderV2_X::theImageSyncCode, ossimNitfImageHeaderV2_X::theJustification, ossimNitfImageHeaderV2_X::theNumberOfBands, ossimNitfImageHeaderV2_X::theNumberOfBitsPerPixelPerBand, ossimNitfImageHeaderV2_X::theNumberOfBlocksPerCol, ossimNitfImageHeaderV2_X::theNumberOfBlocksPerRow, ossimNitfImageHeaderV2_X::theNumberOfComments, theNumberOfMultispectralBands, ossimNitfImageHeaderV2_X::theNumberOfPixelsPerBlockHoriz, ossimNitfImageHeaderV2_X::theNumberOfPixelsPerBlockVert, ossimNitfImageHeaderV2_X::thePixelValueType, theReleasingInstructions, ossimNitfImageHeaderV2_X::theRepresentation, ossimNitfImageHeaderV2_X::theSecurityClassification, theSecurityClassificationSys, theSecurityControlNumber, theSecuritySourceDate, ossimNitfImageHeaderV2_X::theSignificantCols, ossimNitfImageHeaderV2_X::theSignificantRows, ossimNitfImageHeader::theTagList, ossimNitfImageHeaderV2_X::theTargetId, ossimNitfImageHeaderV2_X::theTitle, ossimNitfImageHeaderV2_X::theType, ossimNitfImageHeaderV2_X::theUserDefinedImageDataLength, ossimNitfImageHeaderV2_X::theUserDefinedOverflow, and ossimString::toUInt32().

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

373 {
374  out.write(theType, 2);
375  out.write(theImageId, 10);
376  out.write(theDateTime,14);
377  out.write(theTargetId, 17);
378  out.write(theTitle, 80);
379  out.write(theSecurityClassification, 1);
380  out.write(theSecurityClassificationSys, 2);
381  out.write(theCodewords, 11);
382  out.write(theControlAndHandling, 2);
383  out.write(theReleasingInstructions, 20);
384  out.write(theDeclassificationType, 2);
385  out.write(theDeclassificationDate, 8);
386  out.write(theDeclassificationExempt, 4);
387  out.write(theDowngrade, 1);
388  out.write(theDowngradeDate, 8);
389  out.write(theClassificationText, 43);
390  out.write(theClassificationAuthType, 1);
391  out.write(theClassificationAuthority, 40);
392  out.write(theClassificationReason, 1);
393  out.write(theSecuritySourceDate, 8);
394  out.write(theSecurityControlNumber, 15);
395  out.write(theEncryption, 1);
396  out.write(theImageSource, 42);
397  out.write(theSignificantRows, 8);
398  out.write(theSignificantCols, 8);
399  out.write(thePixelValueType, 3);
400  out.write(theRepresentation, 8);
401  out.write(theCategory, 8);
402  out.write(theActualBitsPerPixelPerBand, 2);
403  out.write(theJustification, 1);
404  out.write(theCoordinateSystem, 1);
405 
406  if(theCoordinateSystem[0] != ' ')
407  {
408  out.write(theGeographicLocation, 60);
409  }
410 
411  out.write(theNumberOfComments, 1);
412 
413  if (ossimString(theNumberOfComments).toUInt32() > 0)
414  {
415  for (ossim_uint32 i=0; i < theImageComments.size(); ++i)
416  {
417  char icom[81];
418  memset(icom, ' ', 80);
419  icom[80] = '\0';
420  strcpy(icom, theImageComments[i].c_str());
421  out.write(icom, 80);
422  }
423  }
424 
425  out.write(theCompression, 2);
426  ossimString compressionTest = theCompression;
427  if(compressionTest != "NC" &&
428  compressionTest != "NM")
429  {
430  out.write(theCompressionRateCode, 4);
431  }
432 
433  out.write(theNumberOfBands, 1);
434 
435  if(ossimString(theNumberOfBands).toInt32() == 0)
436  {
437  out.write(theNumberOfMultispectralBands, 5);
438  }
439 
440  if(theImageBands.size())
441  {
442  ossim_uint32 idx = 0;
443  for(idx = 0; idx < theImageBands.size(); ++idx)
444  {
445  if (theImageBands[idx].valid() == false)
446  {
448  }
449  theImageBands[idx]->writeStream(out);
450  }
451  }
452 
453  out.write(theImageSyncCode, 1);
454  out.write(theImageMode, 1);
455  out.write(theNumberOfBlocksPerRow, 4);
456  out.write(theNumberOfBlocksPerCol, 4);
457  out.write(theNumberOfPixelsPerBlockHoriz, 4);
458  out.write(theNumberOfPixelsPerBlockVert, 4);
459  out.write(theNumberOfBitsPerPixelPerBand, 2);
460  out.write(theDisplayLevel, 3);
461  out.write(theAttachmentLevel, 3);
462  out.write(theImageLocation, 10);
463  out.write(theImageMagnification, 4);
464  out.write(theUserDefinedImageDataLength, 5);
465 
466  if(ossimString(theUserDefinedImageDataLength).toInt32() > 0)
467  {
468  out.write(theUserDefinedOverflow, 3);
469  }
470 
471  // need to output tagged data
472  // here
473  //
474  ossim_uint32 totalLength = getTotalTagLength();
475 
476  if (totalLength == 0)
477  {
478  out.write(theExtendedSubheaderDataLen, 5);
479  }
480  else
481  {
482  totalLength += 3; // per Table A-3 of MIL-STD-2500B
483 
484  if(totalLength <= 99999)
485  {
486  std::ostringstream tempOut;
487 
488  tempOut << std::setw(5)
489  << std::setfill('0')
490  << std::setiosflags(ios::right)
491  << totalLength;
492 
493  memcpy(theExtendedSubheaderDataLen, tempOut.str().c_str(), 5);
494 
495  out.write(theExtendedSubheaderDataLen, 5);
496  ossim_uint32 theExtendedSubheaderDataLenBytes = ossimString(theExtendedSubheaderDataLen).toUInt32();
497 
498  if (theExtendedSubheaderDataLenBytes > 0)
499  {
500  strcpy(theExtendedSubheaderOverflow, ossimString("001").c_str());
501  }
502  else
503  {
504  memset(theExtendedSubheaderOverflow, '0', 3);
505  }
506 
507  if(totalLength > 0)
508  {
509  out.write(theExtendedSubheaderOverflow, 3);
510 
511  ossim_uint32 i = 0;
512 
513  for(i = 0; i < theTagList.size(); ++i)
514  {
515  theTagList[i].writeStream(out);
516  }
517  }
518  }
519  else
520  {
522  << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length < 99999" << std::endl;
523  }
524  }
525 }
char theSignificantRows[9]
FIELD: NROWS.
char theNumberOfMultispectralBands[6]
FIELD: XBANDS.
char theReleasingInstructions[21]
FIELD: ISREL.
virtual ossim_uint32 getTotalTagLength() const
char theNumberOfPixelsPerBlockVert[5]
FIELD: NPPBV.
char theNumberOfPixelsPerBlockHoriz[5]
FIELD: NPPBH.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theCompressionRateCode[5]
FIELD COMRAT.
char theRepresentation[9]
FIELD: IREP.
char theClassificationAuthority[41]
FIELD: ISCAUT.
char theNumberOfBands[2]
FIELD: NBANDS.
char theSecuritySourceDate[9]
FIELD: ISSRDT.
char theUserDefinedImageDataLength[6]
FIELD: UDIDL.
std::vector< ossimRefPtr< ossimNitfImageBandV2_1 > > theImageBands
char theActualBitsPerPixelPerBand[3]
FIELD: ABPP.
char theCodewords[12]
FIELD: ISCODE.
ossim_uint32 toUInt32() const
char theNumberOfBitsPerPixelPerBand[3]
FIELD: NBPP.
char theNumberOfBlocksPerRow[5]
FIELD: NBPR.
char theGeographicLocation[61]
FIELD: IGEOLO.
char theControlAndHandling[3]
FIELD: ISCTLH.
char theSecurityClassificationSys[3]
FIELD: ISCLSY.
char theClassificationReason[2]
FIELD: ISCRSN.
char theDeclassificationDate[9]
FIELD: ISDCDT.
char theImageId[11]
FIELD: IID1 Is a required 10 Alphanumeric value.
char theSecurityControlNumber[16]
FIELD: ISCTLN.
char theExtendedSubheaderDataLen[6]
FIELD: IXSHDL.
std::vector< ossimNitfTagInformation > theTagList
char theImageMode[2]
FIELD: IMODE.
char theTargetId[18]
FIELD: TGTID.
char theImageLocation[11]
FIELD: ILOC.
char theImageSyncCode[2]
FIELD: ISYNC.
char theDeclassificationType[3]
FIELD: ISDCTP.
char theAttachmentLevel[4]
FIELD: IALVL.
char theJustification[2]
FIELD: PJUST.
unsigned int ossim_uint32
char theUserDefinedOverflow[4]
FIELD: UDOFL.
char theDeclassificationExempt[5]
FIELD: ISDCXM.
char theNumberOfBlocksPerCol[5]
FIELD: NBPC.
char theDisplayLevel[4]
FIELD: IDLVL.
char theDowngradeDate[9]
FIELD: ISDGDT.
char theImageSource[43]
FIELD: ISORCE.
char theSecurityClassification[2]
FIELD: ISCLAS.
char theCoordinateSystem[2]
FIELD: ICORDS.
char theSignificantCols[9]
FIELD: NCOLS.
char theClassificationText[44]
FIELD: ISCLTX.
char theExtendedSubheaderOverflow[4]
FIELD: IXSOFL.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::vector< ossimString > theImageComments
char thePixelValueType[4]
FIELD: PVTYPE.
char theClassificationAuthType[2]
FIELD: ISCATP.
char theImageMagnification[5]
FIELD: IMAG.

Member Data Documentation

◆ ISCATP_KW

const ossimString ossimNitfImageHeaderV2_1::ISCATP_KW = "iscatp"
static

Definition at line 156 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISCAUT_KW

const ossimString ossimNitfImageHeaderV2_1::ISCAUT_KW = "iscaut"
static

Definition at line 157 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISCLSY_KW

const ossimString ossimNitfImageHeaderV2_1::ISCLSY_KW
static

Definition at line 146 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISCLTX_KW

const ossimString ossimNitfImageHeaderV2_1::ISCLTX_KW = "iscltx"
static

Definition at line 155 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISCODE_KW

const ossimString ossimNitfImageHeaderV2_1::ISCODE_KW
static

Definition at line 147 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISCRSN_KW

const ossimString ossimNitfImageHeaderV2_1::ISCRSN_KW = "iscrsn"
static

Definition at line 158 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISCTLH_KW

const ossimString ossimNitfImageHeaderV2_1::ISCTLH_KW = "isctlh"
static

Definition at line 148 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISCTLN_KW

const ossimString ossimNitfImageHeaderV2_1::ISCTLN_KW = "isctln"
static

Definition at line 160 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISDCDT_KW

const ossimString ossimNitfImageHeaderV2_1::ISDCDT_KW = "isdcdt"
static

Definition at line 151 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISDCTP_KW

const ossimString ossimNitfImageHeaderV2_1::ISDCTP_KW = "isdctp"
static

Definition at line 150 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISDCXM_KW

const ossimString ossimNitfImageHeaderV2_1::ISDCXM_KW = "isdcxm"
static

Definition at line 152 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISDG_KW

const ossimString ossimNitfImageHeaderV2_1::ISDG_KW = "isdg"
static

Definition at line 153 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISDGDT_KW

const ossimString ossimNitfImageHeaderV2_1::ISDGDT_KW = "isdgdt"
static

Definition at line 154 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISREL_KW

const ossimString ossimNitfImageHeaderV2_1::ISREL_KW = "isrel"
static

Definition at line 149 of file ossimNitfImageHeaderV2_1.h.

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

◆ ISSRDT_KW

const ossimString ossimNitfImageHeaderV2_1::ISSRDT_KW = "issrdt"
static

Definition at line 159 of file ossimNitfImageHeaderV2_1.h.

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

◆ theClassificationAuthority

char ossimNitfImageHeaderV2_1::theClassificationAuthority[41]
private

FIELD: ISCAUT.

Is a required 40 byte field.

Image Classification Authority.

This field shall identify the classification authority for the image dependent upon the value in Image Classification Authority Type. Values are user defined free text which should contain the following information: original classification authority name and position or personal identifier if the value in Image Classification Authority Type is O; title of the document or security classification guide used to classify the image if the value in Image Classification Authority Type is D; and Derive-Multiple if the image classification was derived from multiple sources. In the latter case, the image originator will maintain a record of the sources used in accordance with existing security directives. One of the multiple sources may also be identified in Image Classification Text if desired. If this field is all BCS spaces (0x20), it shall imply that no image classification authority applies.

Definition at line 373 of file ossimNitfImageHeaderV2_1.h.

Referenced by clearFields(), getProperty(), print(), saveState(), setClassificationAuthority(), and writeStream().

◆ theClassificationAuthType

char ossimNitfImageHeaderV2_1::theClassificationAuthType[2]
private

FIELD: ISCATP.

Is a required 1 byte field.

O = original classification Authority D = derivative from a single source M = derivative from multiple sources

Definition at line 352 of file ossimNitfImageHeaderV2_1.h.

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

◆ theClassificationReason

char ossimNitfImageHeaderV2_1::theClassificationReason[2]
private

FIELD: ISCRSN.

This is a required 1 byte field and indicates the classification reason.

Image Classification Reason.

This field shall contain values indicating the reason for classifying the image. Valid values are A through G. These correspond to the reasons for original classification per E.O. 12958, Section 1.5.(a) through (g). If this field is all BCS spaces (0x20), it shall imply that no image classification reason applies.

Definition at line 389 of file ossimNitfImageHeaderV2_1.h.

Referenced by clearFields(), getProperty(), print(), saveState(), setClassificationReason(), setProperty(), and writeStream().

◆ theClassificationText

char ossimNitfImageHeaderV2_1::theClassificationText[44]
private

FIELD: ISCLTX.

is a required 43 byte field.

Image Classification Text.

This field shall be used to provide additional information about image classification to include identification of a declassification or downgrading event if the values in Image Declassification Type are DE or GE.. It may also be used to identify multiple classification sources and/or any other special handling rules. Values are user defined free text. If this field is all BCS spaces (0x20), it shall imply that additional information about image classification does not apply.

Definition at line 340 of file ossimNitfImageHeaderV2_1.h.

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

◆ theCodewords

char ossimNitfImageHeaderV2_1::theCodewords[12]
private

FIELD: ISCODE.

is a 11 byte field

Image Codewords.

This field shall contain a valid indicator of the security compartments associated with the image. Values include one or more of the tri/digraphs found in DIAM 65-19 and/or Table A-4. Multiple entries shall be separated by single BCS spaces (0x20): The selection of a relevant set of codewords is application specific. If this field is all BCS spaces (0x20), it shall imply that no codewords apply to the image.

Definition at line 206 of file ossimNitfImageHeaderV2_1.h.

Referenced by clearFields(), getProperty(), print(), saveState(), setCodewords(), and writeStream().

◆ theControlAndHandling

char ossimNitfImageHeaderV2_1::theControlAndHandling[3]
private

FIELD: ISCTLH.

is a 2 byte field.

Image Control and Handling. This field shall contain valid additional security control and/or handling instructions (caveats) associated with the image. Values include digraphs found in DIAM 65-19 and/or Table A4. The digraph may indicate single or multiple caveats. The selection of a relevant caveat(s) is application specific. If this field is all BCS spaces (0x20), it shall imply that no additional control and handling instructions apply to the image.

Definition at line 223 of file ossimNitfImageHeaderV2_1.h.

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

◆ theDeclassificationDate

char ossimNitfImageHeaderV2_1::theDeclassificationDate[9]
private

FIELD: ISDCDT.

Is a required 8 byte field. CCYYMMDD

CC is the first 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 00-31

Definition at line 270 of file ossimNitfImageHeaderV2_1.h.

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

◆ theDeclassificationExempt

char ossimNitfImageHeaderV2_1::theDeclassificationExempt[5]
private

FIELD: ISDCXM.

is a required 4 byte field.

Image Declassification Exemption.

This field shall indicate the reason the image is exempt from automatic declassification if the value in Image Declassification Type is X. Valid values are X1 through X8 and X251 through X259. X1 through X8 correspond to the declassification exemptions found in DOD 5200.1-R, paragraphs 4-202b(1) through (8) for material exempt from the 10-year rule. X251 through X259 correspond to the declassification exemptions found in DOD 5200.1-R, paragraphs 4-301a(1) through (9) for permanently valuable material exempt from the 25-year declassification system. If this field is all BCS spaces (0x20), it shall imply that a image declassification exemption does not apply.

Definition at line 290 of file ossimNitfImageHeaderV2_1.h.

Referenced by clearFields(), getProperty(), print(), saveState(), setDeclassificationExempt(), and writeStream().

◆ theDeclassificationType

char ossimNitfImageHeaderV2_1::theDeclassificationType[3]
private

FIELD: ISDCTP.

Is a required 2 byte field. The valid values are DD = declassify on a specific date DE = Declassify upon occurence of an event GD = downgrade to a specified level upon occurence of an event O = OADR X = exempt from automatic declassification spaces = no image security declassification or downgrade instruction apply.

Definition at line 256 of file ossimNitfImageHeaderV2_1.h.

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

◆ theDowngrade

char ossimNitfImageHeaderV2_1::theDowngrade[2]
private

FIELD: ISDG.

Is a required 1 byte field with form:

Image Downgrade. This field shall indicate the classification level to which a image is to be downgraded if the values in Image Declassification Type are GD or GE.

Valid values are S (=Secret), C (=Confidential), R (= Restricted).

If this field is all BCS spaces (0x20), it shall imply that image security downgrading does not apply.

Definition at line 310 of file ossimNitfImageHeaderV2_1.h.

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

◆ theDowngradeDate

char ossimNitfImageHeaderV2_1::theDowngradeDate[9]
private

FIELD: ISDGDT.

is a required 8 byte field

CCYYMMDD

CC is the first 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 00-31

Definition at line 324 of file ossimNitfImageHeaderV2_1.h.

Referenced by clearFields(), getProperty(), print(), saveState(), setDowngradeDate(), and writeStream().

◆ theImageBands

std::vector<ossimRefPtr<ossimNitfImageBandV2_1> > ossimNitfImageHeaderV2_1::theImageBands
private

◆ theNumberOfMultispectralBands

char ossimNitfImageHeaderV2_1::theNumberOfMultispectralBands[6]
private

FIELD: XBANDS.

This is a conditional 5 byte field and ranges from 00010-99999. This exists if theNumberOfBands is 0.

Definition at line 420 of file ossimNitfImageHeaderV2_1.h.

Referenced by clearFields(), getNumberOfBands(), print(), saveState(), setNumberOfBands(), and writeStream().

◆ theReleasingInstructions

char ossimNitfImageHeaderV2_1::theReleasingInstructions[21]
private

FIELD: ISREL.

Is a 20 byte field.

Image Releasing Instructions. This field shall contain a valid list of country and/or multilateral entity codes to which countries and/or multilateral entities the image is authorized for release. Valid items in the list are one or more country codes as found in FIPS 10-4 and/or codes identifying multilateral entities as found in DIAM 65-19. If this field is all BCS spaces (0x20), it shall imply that no image release instructions apply.

Definition at line 239 of file ossimNitfImageHeaderV2_1.h.

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

◆ theSecurityClassificationSys

char ossimNitfImageHeaderV2_1::theSecurityClassificationSys[3]
private

FIELD: ISCLSY.

Is a required 2 byte field.

Image Security Classification System.

This field shall contain valid values indicating the national or multinational security system used to classify the image. Country Codes per FIPS 10-4 shall be used to indicate national security systems; codes found in DIAM 65-19 shall be used to indicate multinational security systems. If this field is all BCS spaces (0x20), it shall imply that no security classification system applies to the image.

Definition at line 187 of file ossimNitfImageHeaderV2_1.h.

Referenced by clearFields(), getProperty(), print(), saveState(), setSecurityClassificationSystem(), and writeStream().

◆ theSecurityControlNumber

char ossimNitfImageHeaderV2_1::theSecurityControlNumber[16]
private

FIELD: ISCTLN.

is a required 15 byte field.

Definition at line 411 of file ossimNitfImageHeaderV2_1.h.

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

◆ theSecuritySourceDate

char ossimNitfImageHeaderV2_1::theSecuritySourceDate[9]
private

FIELD: ISSRDT.

This is a required 8 byte field.

CCYYMMDD

CC is the first 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 00-31

Definition at line 404 of file ossimNitfImageHeaderV2_1.h.

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

◆ XBANDS_KW

const ossimString ossimNitfImageHeaderV2_1::XBANDS_KW = "xbands"
static

Definition at line 161 of file ossimNitfImageHeaderV2_1.h.

Referenced by getPropertyNames().


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