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

#include <ossimNitfSymbolHeaderV2_0.h>

Inheritance diagram for ossimNitfSymbolHeaderV2_0:
ossimNitfSymbolHeader ossimObject ossimReferenced

Public Member Functions

 ossimNitfSymbolHeaderV2_0 ()
 
virtual ~ossimNitfSymbolHeaderV2_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 ossimNitfSymbolHeader
 ossimNitfSymbolHeader ()
 
virtual ~ossimNitfSymbolHeader ()
 
- 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 theSymbolId [11]
 
char theSymbolName [21]
 
char theSymbolSecurityClass [2]
 
char theSymbolCodewords [41]
 
char theSymbolControlAndHandling [41]
 
char theSymbolReleasingInstructions [41]
 
char theSymbolClassificationAuthority [21]
 
char theSymbolSecurityControlNum [21]
 
char theSymbolSecurityDowngrade [7]
 
char theSymbolDowngradingEvent [41]
 
char theSymbolEncryption [2]
 
char theSymbolType [2]
 
char theNumberLinesPerSymbol [5]
 
char theSymbolNumberPixelsPerLine [5]
 
char theSymbolLineWidth [5]
 
char theSymbolNumberBitsPerPixel [2]
 
char theSymbolDisplayLevel [4]
 
char theSymbolAttachmentLevel [4]
 
char theSymbolLocation [11]
 
char theSecondSymbolLocation [11]
 
char theSymbolColor [2]
 
char theSymbolNumber [7]
 
char theSymbolRotation [4]
 
char theSymbolNumberOfLutEntries [4]
 
ossimNitfImageLutV2_0 theSymbolLutData
 
char theSymbolExtendedSubheaderDataLength [6]
 
char theSymbolSubheaderOverflow [4]
 

Additional Inherited Members

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

Detailed Description

Definition at line 17 of file ossimNitfSymbolHeaderV2_0.h.

Constructor & Destructor Documentation

◆ ossimNitfSymbolHeaderV2_0()

ossimNitfSymbolHeaderV2_0::ossimNitfSymbolHeaderV2_0 ( )

Definition at line 20 of file ossimNitfSymbolHeaderV2_0.cpp.

◆ ~ossimNitfSymbolHeaderV2_0()

virtual ossimNitfSymbolHeaderV2_0::~ossimNitfSymbolHeaderV2_0 ( )
inlinevirtual

Definition at line 21 of file ossimNitfSymbolHeaderV2_0.h.

21 {}

Member Function Documentation

◆ clearFields()

void ossimNitfSymbolHeaderV2_0::clearFields ( )
private

Definition at line 117 of file ossimNitfSymbolHeaderV2_0.cpp.

References theFilePartType, theNumberLinesPerSymbol, theSecondSymbolLocation, theSymbolAttachmentLevel, theSymbolClassificationAuthority, theSymbolCodewords, theSymbolColor, theSymbolControlAndHandling, theSymbolDisplayLevel, theSymbolDowngradingEvent, theSymbolEncryption, theSymbolExtendedSubheaderDataLength, theSymbolId, theSymbolLineWidth, theSymbolLocation, theSymbolName, theSymbolNumber, theSymbolNumberBitsPerPixel, theSymbolNumberOfLutEntries, theSymbolNumberPixelsPerLine, theSymbolReleasingInstructions, theSymbolRotation, theSymbolSecurityClass, theSymbolSecurityControlNum, theSymbolSecurityDowngrade, theSymbolSubheaderOverflow, and theSymbolType.

Referenced by parseStream().

118 {
119  memset(theFilePartType, ' ', 2);
120  memset(theSymbolId, ' ', 10);
121  memset(theSymbolName, ' ', 20);
122  memset(theSymbolSecurityClass, ' ', 1);
123  memset(theSymbolCodewords, ' ', 40);
124  memset(theSymbolControlAndHandling, ' ', 40);
125  memset(theSymbolReleasingInstructions, ' ', 40);
126  memset(theSymbolClassificationAuthority, ' ', 20);
127  memset(theSymbolSecurityControlNum, ' ', 20);
128  memset(theSymbolSecurityDowngrade, ' ', 6);
129  memset(theSymbolDowngradingEvent, ' ', 40);
130  memset(theSymbolEncryption, ' ', 1);
131  memset(theSymbolType, ' ', 1);
132  memset(theNumberLinesPerSymbol, ' ', 4);
133  memset(theSymbolNumberPixelsPerLine, ' ', 4);
134  memset(theSymbolLineWidth, ' ', 4);
135  memset(theSymbolNumberBitsPerPixel, ' ', 1);
136  memset(theSymbolDisplayLevel, ' ', 3);
137  memset(theSymbolAttachmentLevel, ' ', 3);
138  memset(theSymbolLocation, ' ', 10);
139  memset(theSecondSymbolLocation, ' ', 10);
140  memset(theSymbolColor, ' ', 1);
141  memset(theSymbolNumber, ' ', 6);
142  memset(theSymbolRotation, ' ', 3);
143  memset(theSymbolNumberOfLutEntries, ' ', 3);
144  memset(theSymbolExtendedSubheaderDataLength, ' ', 5);
145  memset(theSymbolSubheaderOverflow, ' ', 3);
146 
147 
148  theFilePartType[2] = '\0';
149  theSymbolId[10] = '\0';
150  theSymbolName[20] = '\0';
151  theSymbolSecurityClass[1] = '\0';
152  theSymbolCodewords[40] = '\0';
153  theSymbolControlAndHandling[40] = '\0';
156  theSymbolSecurityControlNum[20] = '\0';
157  theSymbolSecurityDowngrade[6] = '\0';
158  theSymbolDowngradingEvent[40] = '\0';
159  theSymbolEncryption[1] = '\0';
160  theSymbolType[1] = '\0';
161  theNumberLinesPerSymbol[4] = '\0';
163  theSymbolLineWidth[4] = '\0';
164  theSymbolNumberBitsPerPixel[1] = '\0';
165  theSymbolDisplayLevel[3] = '\0';
166  theSymbolAttachmentLevel[3] = '\0';
167  theSymbolLocation[10] = '\0';
168  theSecondSymbolLocation[10] = '\0';
169  theSymbolColor[1] = '\0';
170  theSymbolNumber[6] = '\0';
171  theSymbolRotation[3] = '\0';
172  theSymbolNumberOfLutEntries[3] = '\0';
175 }

◆ getDisplayLevel()

ossim_int32 ossimNitfSymbolHeaderV2_0::getDisplayLevel ( ) const
virtual

Implements ossimNitfSymbolHeader.

Definition at line 102 of file ossimNitfSymbolHeaderV2_0.cpp.

References theSymbolDisplayLevel, and ossimString::toInt32().

103 {
105 }
ossim_int32 toInt32() const

◆ getImageRect()

ossimDrect ossimNitfSymbolHeaderV2_0::getImageRect ( ) const
virtual

Implements ossimNitfSymbolHeader.

Definition at line 107 of file ossimNitfSymbolHeaderV2_0.cpp.

108 {
109  // for now we will return an empty rect. This will be more
110  // complicated to compute a symbol bound. The origin depends
111  // on the symbol and is different for different symbols.
112  // We will implement this one last.
113  return ossimDrect(0,0,0,0);
114 }

◆ parseStream()

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

Implements ossimNitfSymbolHeader.

Definition at line 25 of file ossimNitfSymbolHeaderV2_0.cpp.

References clearFields(), theFilePartType, theNumberLinesPerSymbol, theSecondSymbolLocation, theSymbolAttachmentLevel, theSymbolClassificationAuthority, theSymbolCodewords, theSymbolColor, theSymbolControlAndHandling, theSymbolDisplayLevel, theSymbolDowngradingEvent, theSymbolEncryption, theSymbolExtendedSubheaderDataLength, theSymbolId, theSymbolLineWidth, theSymbolLocation, theSymbolName, theSymbolNumber, theSymbolNumberBitsPerPixel, theSymbolNumberOfLutEntries, theSymbolNumberPixelsPerLine, theSymbolReleasingInstructions, theSymbolRotation, theSymbolSecurityClass, theSymbolSecurityControlNum, theSymbolSecurityDowngrade, theSymbolSubheaderOverflow, and theSymbolType.

26 {
27  if(in)
28  {
29  clearFields();
30 
31  in.read(theFilePartType, 2);
32  in.read(theSymbolId, 10);
33  in.read(theSymbolName, 20);
34  in.read(theSymbolSecurityClass, 1);
35  in.read(theSymbolCodewords, 40);
36  in.read(theSymbolControlAndHandling, 40);
37  in.read(theSymbolReleasingInstructions, 40);
39  in.read(theSymbolSecurityControlNum, 20);
40  in.read(theSymbolSecurityDowngrade, 6);
42  {
43  in.read(theSymbolDowngradingEvent, 40);
44  }
45  in.read(theSymbolEncryption, 1);
46  in.read(theSymbolType, 1);
47  in.read(theNumberLinesPerSymbol, 4);
48  in.read(theSymbolNumberPixelsPerLine, 4);
49  in.read(theSymbolLineWidth, 4);
50  in.read(theSymbolNumberBitsPerPixel, 1);
51  in.read(theSymbolDisplayLevel, 3);
52  in.read(theSymbolAttachmentLevel, 3);
53  in.read(theSymbolLocation, 10);
54  in.read(theSecondSymbolLocation, 10);
55  in.read(theSymbolColor, 1);
56  in.read(theSymbolNumber, 6);
57  in.read(theSymbolRotation, 3);
58  in.read(theSymbolNumberOfLutEntries, 3);
59 
60  // do lut here. we will temporarily ignore
61  in.ignore(ossimString(theSymbolNumberOfLutEntries).toLong());
62 
64  in.read(theSymbolSubheaderOverflow, 3);
65 
66  }
67 }

◆ print()

std::ostream & ossimNitfSymbolHeaderV2_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 ossimNitfSymbolHeaderV2_0.cpp.

References theFilePartType, theNumberLinesPerSymbol, theSecondSymbolLocation, theSymbolAttachmentLevel, theSymbolClassificationAuthority, theSymbolCodewords, theSymbolColor, theSymbolControlAndHandling, theSymbolDisplayLevel, theSymbolDowngradingEvent, theSymbolEncryption, theSymbolExtendedSubheaderDataLength, theSymbolId, theSymbolLineWidth, theSymbolLocation, theSymbolName, theSymbolNumber, theSymbolNumberBitsPerPixel, theSymbolNumberOfLutEntries, theSymbolNumberPixelsPerLine, theSymbolReleasingInstructions, theSymbolRotation, theSymbolSecurityClass, theSymbolSecurityControlNum, theSymbolSecurityDowngrade, theSymbolSubheaderOverflow, and theSymbolType.

70 {
71 
72  out << "theFilePartType: " << theFilePartType << std::endl
73  << "theSymbolId: " << theSymbolId << std::endl
74  << "theSymbolName: " << theSymbolName << std::endl
75  << "theSymbolSecurityClass: " << theSymbolSecurityClass << std::endl
76  << "theSymbolCodewords: " << theSymbolCodewords << std::endl
77  << "theSymbolControlAndHandling: " << theSymbolControlAndHandling << std::endl
78  << "theSymbolReleasingInstructions: " << theSymbolReleasingInstructions << std::endl
79  << "theSymbolClassificationAuthority: " << theSymbolClassificationAuthority << std::endl
80  << "theSymbolSecurityControlNum: " << theSymbolSecurityControlNum << std::endl
81  << "theSymbolSecurityDowngrade: " << theSymbolSecurityDowngrade << std::endl
82  << "theSymbolDowngradingEvent: " << theSymbolDowngradingEvent << std::endl
83  << "theSymbolEncryption: " << theSymbolEncryption << std::endl
84  << "theSymbolType: " << theSymbolType << std::endl
85  << "theNumberLinesPerSymbol: " << theNumberLinesPerSymbol << std::endl
86  << "theSymbolNumberPixelsPerLine: " << theSymbolNumberPixelsPerLine << std::endl
87  << "theSymbolLineWidth: " << theSymbolLineWidth << std::endl
88  << "theSymbolNumberBitsPerPixel: " << theSymbolNumberBitsPerPixel << std::endl
89  << "theSymbolDisplayLevel: " << theSymbolDisplayLevel << std::endl
90  << "theSymbolAttachmentLevel: " << theSymbolAttachmentLevel << std::endl
91  << "theSymbolLocation: " << theSymbolLocation << std::endl
92  << "theSecondSymbolLocation: " << theSecondSymbolLocation << std::endl
93  << "theSymbolColor: " << theSymbolColor << std::endl
94  << "theSymbolNumber: " << theSymbolNumber << std::endl
95  << "theSymbolRotation: " << theSymbolRotation << std::endl
96  << "theSymbolNumberOfLutEntries: " << theSymbolNumberOfLutEntries << std::endl
97  << "theSymbolExtendedSubheaderDataLength: " << theSymbolExtendedSubheaderDataLength << std::endl
98  << "theSymbolSubheaderOverflow: " << theSymbolSubheaderOverflow << std::endl;
99  return out;
100 }

Member Data Documentation

◆ theFilePartType

char ossimNitfSymbolHeaderV2_0::theFilePartType[3]
private

Is a required 2 byte field. The expected value is SY.

Definition at line 36 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theNumberLinesPerSymbol

char ossimNitfSymbolHeaderV2_0::theNumberLinesPerSymbol[5]
private

This is a required 4 byte field. Ranges from 0-9999.

if theSymbolType is B or O this field will contain the number of rows (lines) in the symbol image. This field shall contain 0 if theSymbolType is C

Definition at line 131 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSecondSymbolLocation

char ossimNitfSymbolHeaderV2_0::theSecondSymbolLocation[11]
private

This is an optional 10 byte field. Has format rrrrrccccc where r is row c is column.

Definition at line 180 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolAttachmentLevel

char ossimNitfSymbolHeaderV2_0::theSymbolAttachmentLevel[4]
private

This is a required 3 byte field. Ranges from 0-998

Definition at line 166 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolClassificationAuthority

char ossimNitfSymbolHeaderV2_0::theSymbolClassificationAuthority[21]
private

optional 20 byte field.

Definition at line 79 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolCodewords

char ossimNitfSymbolHeaderV2_0::theSymbolCodewords[41]
private

40 byte optional field

Definition at line 64 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolColor

char ossimNitfSymbolHeaderV2_0::theSymbolColor[2]
private

This is a required 1 byte field.

Definition at line 185 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolControlAndHandling

char ossimNitfSymbolHeaderV2_0::theSymbolControlAndHandling[41]
private

40 byte optional field.

Definition at line 69 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolDisplayLevel

char ossimNitfSymbolHeaderV2_0::theSymbolDisplayLevel[4]
private

This is a required 3 byte field. Ranges from 1-999

Definition at line 161 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolDowngradingEvent

char ossimNitfSymbolHeaderV2_0::theSymbolDowngradingEvent[41]
private

Conditional field. This field exists if theSymbolSecurityDowngrade has the value of

  1. If it exists it will be a 40 byte field.

Definition at line 97 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolEncryption

char ossimNitfSymbolHeaderV2_0::theSymbolEncryption[2]
private

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

0 Not encrypted 1 Encrytped

Definition at line 107 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolExtendedSubheaderDataLength

char ossimNitfSymbolHeaderV2_0::theSymbolExtendedSubheaderDataLength[6]
private

This is is a required 5 byte field. Will range from 0-08833.

Definition at line 215 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolId

char ossimNitfSymbolHeaderV2_0::theSymbolId[11]
private

is a 10 byte required alphanumeric field.

Definition at line 41 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolLineWidth

char ossimNitfSymbolHeaderV2_0::theSymbolLineWidth[5]
private

This is a required 4 byte field. Ranges from 0-9999

if theSymbolType is O this field will contain the line width for the object symbol in pixels.

if this field equals theNumberLinesPerSymbol then the symbol should be drawn solid and filled in.

Definition at line 151 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolLocation

char ossimNitfSymbolHeaderV2_0::theSymbolLocation[11]
private

This is a required 10 byte field. This indicates the location in image space.

rrrrrccccc five characters for r followed by five for the column

Definition at line 174 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolLutData

ossimNitfImageLutV2_0 ossimNitfSymbolHeaderV2_0::theSymbolLutData
private

This will hold the lookup table values for the pixel data. This is a conditional field and will exist if theSymbolNumberOfLutEntries is not 0.

Definition at line 209 of file ossimNitfSymbolHeaderV2_0.h.

◆ theSymbolName

char ossimNitfSymbolHeaderV2_0::theSymbolName[21]
private

is an optional 20 byte alphanumeric field

Definition at line 46 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolNumber

char ossimNitfSymbolHeaderV2_0::theSymbolNumber[7]
private

This is an optional 6 byte field.

Definition at line 192 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolNumberBitsPerPixel

char ossimNitfSymbolHeaderV2_0::theSymbolNumberBitsPerPixel[2]
private

This is a required 1 byte field. Ranges from 0-8

Definition at line 156 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolNumberOfLutEntries

char ossimNitfSymbolHeaderV2_0::theSymbolNumberOfLutEntries[4]
private

This is a required 3 byte field. Ranges from 0-256

Definition at line 202 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolNumberPixelsPerLine

char ossimNitfSymbolHeaderV2_0::theSymbolNumberPixelsPerLine[5]
private

This is a required 4 byte field. Ranges from 0-9999

if theSymbolType is B or O this field will contain the number of pixels in each row. This field shall contain 0 if theSymbolType is C

Definition at line 140 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolReleasingInstructions

char ossimNitfSymbolHeaderV2_0::theSymbolReleasingInstructions[41]
private

40 byte optional field.

Definition at line 74 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolRotation

char ossimNitfSymbolHeaderV2_0::theSymbolRotation[4]
private

This is a required 3 byte field. Ranges from 0-359

Definition at line 197 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolSecurityClass

char ossimNitfSymbolHeaderV2_0::theSymbolSecurityClass[2]
private

Security classification is a required 1 byte field. Expected values can either be:

T Top secret S Secret C Confidential R Restricted U UnClassified

Definition at line 59 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolSecurityControlNum

char ossimNitfSymbolHeaderV2_0::theSymbolSecurityControlNum[21]
private

optional 20 byte field.

Definition at line 84 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolSecurityDowngrade

char ossimNitfSymbolHeaderV2_0::theSymbolSecurityDowngrade[7]
private

optional 6 byte value.

Definition at line 89 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolSubheaderOverflow

char ossimNitfSymbolHeaderV2_0::theSymbolSubheaderOverflow[4]
private

This is a conditional 3 byte field that ranges from 0-999. This field will depend on theSymbolExtendedSubheaderDataLength not being 0.

Definition at line 222 of file ossimNitfSymbolHeaderV2_0.h.

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

◆ theSymbolType

char ossimNitfSymbolHeaderV2_0::theSymbolType[2]
private

This is a required one byte field and can have the value of either:

B Bit-mapped C for CGM O for object

if it's O then theSymbolNumber will hold a number to the symbol object to draw. See field theSymbolNumber for object numbers and object types.

Definition at line 122 of file ossimNitfSymbolHeaderV2_0.h.

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


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