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

#include <ossimNitfLabelHeaderV2_0.h>

Inheritance diagram for ossimNitfLabelHeaderV2_0:
ossimNitfLabelHeader ossimObject ossimReferenced

Public Member Functions

 ossimNitfLabelHeaderV2_0 ()
 
virtual ~ossimNitfLabelHeaderV2_0 ()
 
virtual void parseStream (std::istream &in)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual ossim_int32 getDisplayLevel () const
 
virtual ossimDrect getImageRect () const
 
- Public Member Functions inherited from ossimNitfLabelHeader
 ossimNitfLabelHeader ()
 
virtual ~ossimNitfLabelHeader ()
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual 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
 

Private Member Functions

void clearFields ()
 

Private Attributes

char theFilePartType [3]
 
char theLabelId [11]
 
char theLabelSecurityClassification [2]
 
char theLabelCodewords [41]
 
char theLabelControlAndHandling [41]
 
char theLabelReleasingInstructions [41]
 
char theLabelClassificationAuthority [21]
 
char theLabelSecurityControlNumber [21]
 
char theLabelSecurityDowngrade [7]
 
char theLabelDowngradingEvent [41]
 
char theLabelEncryption [2]
 
char theLabelFontStyle [2]
 
char theLabelCellWidth [3]
 
char theLabelCellHeight [3]
 
char theLabelDisplayLevel [4]
 
char theLabelAttachmentLevel [4]
 
char theLabelLocation [11]
 
char theLabelTextColor [4]
 
char theLabelBackgroundColor [4]
 
char theExtendedHeaderDataLength [6]
 
char theExtendedSubheaderOverflow [4]
 

Additional Inherited Members

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

Detailed Description

Definition at line 17 of file ossimNitfLabelHeaderV2_0.h.

Constructor & Destructor Documentation

◆ ossimNitfLabelHeaderV2_0()

ossimNitfLabelHeaderV2_0::ossimNitfLabelHeaderV2_0 ( )

◆ ~ossimNitfLabelHeaderV2_0()

virtual ossimNitfLabelHeaderV2_0::~ossimNitfLabelHeaderV2_0 ( )
inlinevirtual

Definition at line 21 of file ossimNitfLabelHeaderV2_0.h.

21 {}

Member Function Documentation

◆ clearFields()

void ossimNitfLabelHeaderV2_0::clearFields ( )
private

Definition at line 112 of file ossimNitfLabelHeaderV2_0.cpp.

References theExtendedHeaderDataLength, theExtendedSubheaderOverflow, theFilePartType, theLabelAttachmentLevel, theLabelBackgroundColor, theLabelCellHeight, theLabelCellWidth, theLabelClassificationAuthority, theLabelCodewords, theLabelControlAndHandling, theLabelDisplayLevel, theLabelDowngradingEvent, theLabelEncryption, theLabelFontStyle, theLabelId, theLabelLocation, theLabelReleasingInstructions, theLabelSecurityClassification, theLabelSecurityControlNumber, theLabelSecurityDowngrade, and theLabelTextColor.

Referenced by parseStream(), and RTTI_DEF1().

113 {
114  memset(theFilePartType, ' ', 2);
115  memset(theLabelId, ' ', 10);
116  memset(theLabelSecurityClassification, ' ', 1);
117  memset(theLabelCodewords, ' ', 40);
118  memset(theLabelControlAndHandling, ' ', 40);
119  memset(theLabelReleasingInstructions, ' ', 40);
120  memset(theLabelClassificationAuthority, ' ', 20);
121  memset(theLabelSecurityControlNumber, ' ', 20);
122  memset(theLabelSecurityDowngrade, ' ', 6);
123  memset(theLabelDowngradingEvent, ' ', 40);
124  memset(theLabelEncryption, ' ', 1);
125  memset(theLabelFontStyle, ' ', 1);
126  memset(theLabelCellWidth, ' ', 2);
127  memset(theLabelCellHeight, ' ', 2);
128  memset(theLabelDisplayLevel, ' ', 3);
129  memset(theLabelAttachmentLevel, ' ', 3);
130  memset(theLabelLocation, ' ', 10);
131  memset(theLabelTextColor, ' ', 3);
132  memset(theLabelBackgroundColor, ' ', 3);
133  memset(theExtendedHeaderDataLength, ' ', 5);
134  memset(theExtendedSubheaderOverflow, ' ', 3);
135 
136  theFilePartType[2] = '\0';
137  theLabelId[10] = '\0';
139  theLabelCodewords[40] = '\0';
140  theLabelControlAndHandling[40] = '\0';
144  theLabelSecurityDowngrade[6] = '\0';
145  theLabelDowngradingEvent[40] = '\0';
146  theLabelEncryption[1] = '\0';
147  theLabelFontStyle[1] = '\0';
148  theLabelCellWidth[2] = '\0';
149  theLabelCellHeight[2] = '\0';
150  theLabelDisplayLevel[3] = '\0';
151  theLabelAttachmentLevel[3] = '\0';
152  theLabelLocation[10] = '\0';
153  theLabelTextColor[3] = '\0';
154  theLabelBackgroundColor[3] = '\0';
155  theExtendedHeaderDataLength[5] = '\0';
157 }

◆ getDisplayLevel()

ossim_int32 ossimNitfLabelHeaderV2_0::getDisplayLevel ( ) const
virtual

Implements ossimNitfLabelHeader.

Definition at line 94 of file ossimNitfLabelHeaderV2_0.cpp.

References theLabelDisplayLevel, and ossimString::toInt32().

95 {
97 }
ossim_int32 toInt32() const

◆ getImageRect()

ossimDrect ossimNitfLabelHeaderV2_0::getImageRect ( ) const
virtual

Implements ossimNitfLabelHeader.

Definition at line 99 of file ossimNitfLabelHeaderV2_0.cpp.

References theLabelCellHeight, theLabelCellWidth, theLabelLocation, and ossimString::toDouble().

100 {
101  double ulx = ossimString((const char*)(&theLabelLocation[5]),
102  (const char*)(&theLabelLocation[10])).toDouble();
103  double uly = ossimString((const char*)theLabelLocation,
104  (const char*)(&theLabelLocation[5])).toDouble();
105 
106  return ossimDrect(ulx,
107  uly,
108  ulx + ossimString(theLabelCellWidth).toDouble(),
109  uly + ossimString(theLabelCellHeight).toDouble());
110 }
double toDouble() const

◆ parseStream()

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

Implements ossimNitfLabelHeader.

Definition at line 28 of file ossimNitfLabelHeaderV2_0.cpp.

References clearFields(), theExtendedHeaderDataLength, theExtendedSubheaderOverflow, theFilePartType, theLabelAttachmentLevel, theLabelBackgroundColor, theLabelCellHeight, theLabelCellWidth, theLabelClassificationAuthority, theLabelCodewords, theLabelControlAndHandling, theLabelDisplayLevel, theLabelDowngradingEvent, theLabelEncryption, theLabelFontStyle, theLabelId, theLabelLocation, theLabelReleasingInstructions, theLabelSecurityClassification, theLabelSecurityControlNumber, theLabelSecurityDowngrade, theLabelTextColor, and ossimString::toLong().

29 {
30  if(in)
31  {
32  clearFields();
33 
34  in.read(theFilePartType, 2);
35  in.read(theLabelId, 10);
37  in.read(theLabelCodewords, 40);
38  in.read(theLabelControlAndHandling, 40);
39  in.read(theLabelReleasingInstructions, 40);
41  in.read(theLabelSecurityControlNumber, 20);
42  in.read(theLabelSecurityDowngrade, 6);
43  if(ossimString(theLabelSecurityDowngrade) == "999998")
44  {
45  in.read(theLabelDowngradingEvent, 40);
46  }
47  in.read(theLabelEncryption, 1);
48  in.read(theLabelFontStyle, 1);
49  in.read(theLabelCellWidth, 2);
50  in.read(theLabelCellHeight, 2);
51  in.read(theLabelDisplayLevel, 3);
52  in.read(theLabelAttachmentLevel, 3);
53  in.read(theLabelLocation, 10);
54  in.read(theLabelTextColor, 3);
55  in.read(theLabelBackgroundColor, 3);
56  in.read(theExtendedHeaderDataLength, 5);
57 
58  long dataLength = ossimString(theExtendedHeaderDataLength).toLong();
59  if(dataLength > 0)
60  {
61  in.read(theExtendedSubheaderOverflow, 3);
62 
63  // for now just ignore the extended header data
64  in.ignore(dataLength-3);
65  }
66  }
67 }
long toLong() const
toLong&#39;s deprecated, please use the toInts...

◆ print()

std::ostream & ossimNitfLabelHeaderV2_0::print ( std::ostream &  out) const
virtual

Generic print method.

Derived classes should re-implement as they see fit.

Returns
std::ostream&

Reimplemented from ossimObject.

Definition at line 69 of file ossimNitfLabelHeaderV2_0.cpp.

References theExtendedHeaderDataLength, theExtendedSubheaderOverflow, theFilePartType, theLabelAttachmentLevel, theLabelBackgroundColor, theLabelCellHeight, theLabelCellWidth, theLabelClassificationAuthority, theLabelCodewords, theLabelControlAndHandling, theLabelDisplayLevel, theLabelEncryption, theLabelFontStyle, theLabelId, theLabelLocation, theLabelReleasingInstructions, theLabelSecurityClassification, theLabelSecurityControlNumber, theLabelSecurityDowngrade, and theLabelTextColor.

70 {
71  out << "theFilePartType: " << theFilePartType << std::endl
72  << "theLabelId: " << theLabelId << std::endl
73  << "theLabelSecurityClassification: " << theLabelSecurityClassification << std::endl
74  << "theLabelCodewords: " << theLabelCodewords << std::endl
75  << "theLabelControlAndHandling: " << theLabelControlAndHandling << std::endl
76  << "theLabelReleasingInstructions: " << theLabelReleasingInstructions << std::endl
77  << "theLabelClassificationAuthority: " << theLabelClassificationAuthority << std::endl
78  << "theLabelSecurityControlNumber: " << theLabelSecurityControlNumber << std::endl
79  << "theLabelSecurityDowngrade: " << theLabelSecurityDowngrade << std::endl
80  << "theLabelEncryption: " << theLabelEncryption << std::endl
81  << "theLabelFontStyle: " << theLabelFontStyle << std::endl
82  << "theLabelCellWidth: " << theLabelCellWidth << std::endl
83  << "theLabelCellHeight: " << theLabelCellHeight << std::endl
84  << "theLabelDisplayLevel: " << theLabelDisplayLevel << std::endl
85  << "theLabelAttachmentLevel: " << theLabelAttachmentLevel << std::endl
86  << "theLabelLocation: " << theLabelLocation << std::endl
87  << "theLabelTextColor: " << theLabelTextColor << std::endl
88  << "theLabelBackgroundColor: " << theLabelBackgroundColor << std::endl
89  << "theExtendedHeaderDataLength: " << theExtendedHeaderDataLength << std::endl
90  << "theExtendedSubheaderOverflow: " << theExtendedSubheaderOverflow;
91  return out;
92 }

Member Data Documentation

◆ theExtendedHeaderDataLength

char ossimNitfLabelHeaderV2_0::theExtendedHeaderDataLength[6]
private

Required 5 byte field. Ranges from 0-09747

Definition at line 152 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theExtendedSubheaderOverflow

char ossimNitfLabelHeaderV2_0::theExtendedSubheaderOverflow[4]
private

Conditional 3 byte field. Will exist if theExtendedHeaderDataLength is not 0

Definition at line 158 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theFilePartType

char ossimNitfLabelHeaderV2_0::theFilePartType[3]
private

This is a required 2 byte field and has the value LA

Definition at line 36 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelAttachmentLevel

char ossimNitfLabelHeaderV2_0::theLabelAttachmentLevel[4]
private

Required 3 byte field. Ranges from 1-998.

Definition at line 122 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelBackgroundColor

char ossimNitfLabelHeaderV2_0::theLabelBackgroundColor[4]
private

Required 3 byte field. Has format:

RGB First byte is red, second is blue, and third is green

Definition at line 147 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelCellHeight

char ossimNitfLabelHeaderV2_0::theLabelCellHeight[3]
private

optional 2 byte field. Ranges from 1-99

Definition at line 112 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelCellWidth

char ossimNitfLabelHeaderV2_0::theLabelCellWidth[3]
private

optional 2 byte field. Ranges from 1-99

Definition at line 107 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelClassificationAuthority

char ossimNitfLabelHeaderV2_0::theLabelClassificationAuthority[21]
private

optional 20 byte field

Definition at line 73 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelCodewords

char ossimNitfLabelHeaderV2_0::theLabelCodewords[41]
private

optional 40 byte field

Definition at line 58 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelControlAndHandling

char ossimNitfLabelHeaderV2_0::theLabelControlAndHandling[41]
private

optional 40 byte field

Definition at line 63 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelDisplayLevel

char ossimNitfLabelHeaderV2_0::theLabelDisplayLevel[4]
private

Required 3 byte field. Ranges from 1-999.

Definition at line 117 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelDowngradingEvent

char ossimNitfLabelHeaderV2_0::theLabelDowngradingEvent[41]
private

conditional 40 byte field. It exists only if theLabelSecurityDowngrade is = 999998

Definition at line 89 of file ossimNitfLabelHeaderV2_0.h.

Referenced by clearFields(), and parseStream().

◆ theLabelEncryption

char ossimNitfLabelHeaderV2_0::theLabelEncryption[2]
private

required 1 byte field and can have value 0 = not encrypted 1 = encrypted

Definition at line 96 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelFontStyle

char ossimNitfLabelHeaderV2_0::theLabelFontStyle[2]
private

required 1 byte field. Is reserved for future use. Will contain 1 blank.

Definition at line 102 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelId

char ossimNitfLabelHeaderV2_0::theLabelId[11]
private

This is a required 10 byte field.

Definition at line 41 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelLocation

char ossimNitfLabelHeaderV2_0::theLabelLocation[11]
private

Required 10 byte field. Has format:

rrrrrccccc the first five chars is the row location and the second is the column location.

Definition at line 131 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelReleasingInstructions

char ossimNitfLabelHeaderV2_0::theLabelReleasingInstructions[41]
private

optional 40 byte field

Definition at line 68 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelSecurityClassification

char ossimNitfLabelHeaderV2_0::theLabelSecurityClassification[2]
private

This is a required 1 byte field and will have a value of either:

T Top secret S Secret C Confidential R Restricted U Unclassified

Definition at line 53 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelSecurityControlNumber

char ossimNitfLabelHeaderV2_0::theLabelSecurityControlNumber[21]
private

optional 20 byte field

Definition at line 78 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelSecurityDowngrade

char ossimNitfLabelHeaderV2_0::theLabelSecurityDowngrade[7]
private

optional 6 byte field

Definition at line 83 of file ossimNitfLabelHeaderV2_0.h.

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

◆ theLabelTextColor

char ossimNitfLabelHeaderV2_0::theLabelTextColor[4]
private

Required 3 byte field. Has format:

RGB First byte is red, second is blue, and third is green

Definition at line 139 of file ossimNitfLabelHeaderV2_0.h.

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


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