OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimNitfFileHeaderV2_1.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: MIT
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: Garrett Potts
8 //
9 // Description: Nitf support class
10 //
11 //********************************************************************
12 // $Id$
13 
16 #include <ossim/base/ossimString.h>
22 #include <ossim/base/ossimTrace.h>
28 
29 #include <iostream>
30 #include <iomanip>
31 #include <sstream>
32 #include <cstring> // for memset
33 
35  "ossimNitfFileHeaderV2_1",
37 
49 const ossimString FL_KW = "FL";
50 const ossimString HL_KW = "HL";
51 const ossimString NUMI_KW = "NUMI";
52 
53 static const
54 ossimTrace traceDebug(ossimString("ossimNitfFileHeaderV2_1:debug"));
55 
57  const ossimNitfImageInfoRecordV2_1 &data)
58 {
59  return out << "theImageSubheaderLength: "
61  << "\ntheImageLength: "
62  << data.theImageLength
63  << std::endl;
64 }
65 
67 {
69 }
70 
72 {
74 }
75 
77 {
78  return (getHeaderLength() + getImageLength());
79 }
80 
83 {
84  return out << "theGraphicSubheaderLength: "
86  << "\ntheGraphicLength: "
87  << data.theGraphicLength
88  << std::endl;
89 }
90 
93 {
94  return out << "theTextFileSubheaderLength: "
96  << "\ntheTextFileLength: "
97  << data.theTextFileLength
98  << std::endl;
99 }
101 {
103 }
104 
106 {
108 }
109 
111 {
112  return getGraphicLength() + getHeaderLength();
113 }
114 
116 {
117  std::ostringstream out;
118 
119  out << std::setw(4)
120  << std::setfill('0')
121  << std::setiosflags(ios::right)
122  << length;
123 
124  memcpy(theTextFileSubheaderLength, out.str().c_str(), 4);
125  theTextFileSubheaderLength[4] = '\0';
126 }
127 
129 {
130  std::ostringstream out;
131 
132  out << std::setw(5)
133  << std::setfill('0')
134  << std::setiosflags(ios::right)
135  << length;
136 
137  memcpy(theTextFileLength, out.str().c_str(), 5);
138  theTextFileLength[5] = '\0';
139 }
140 
142 {
144 }
145 
147 {
149 }
150 
152 {
153  return (getHeaderLength() + getTextLength());
154 }
155 
156 
159 {
160  return out << "theDataExtSegSubheaderLength: "
162  << "\ntheDataExtSegLength: "
163  << data.theDataExtSegLength
164  << std::endl;
165 }
166 
168 {
170 }
171 
173 {
175 }
176 
178 {
180 }
181 
184 {
185  return out << "theResExtSegSubheaderLength: "
187  << "\ntheResExtSegLength: "
188  << data.theResExtSegLength
189  << std::endl;
190 }
191 
193 {
195 }
196 
198 {
200 }
201 
203 {
204  return getResExtSegLength() + getHeaderLength();
205 }
206 
208 {
209  std::ostringstream out;
210 
211  out << std::setw(6)
212  << std::setfill('0')
213  << std::setiosflags(ios::right)
214  << length;
215 
216  memcpy(theImageSubheaderLength, out.str().c_str(), 6);
217  theImageSubheaderLength[6] = '\0';
218 }
219 
221 {
222  std::ostringstream out;
223 
224  out << std::setw(10)
225  << std::setfill('0')
226  << std::setiosflags(ios::right)
227  << length;
228 
229  memcpy(theImageLength, out.str().c_str(), 10);
230  theImageLength[10] = '\0';
231 }
232 
233 //
234 
237 {
238  clearFields();
239 }
240 
242 {
243 }
244 
246 {
247  clearFields();
248 
249  // identification and origination group
250  in.read(theFileTypeVersion, 9);
251  theHeaderSize += 9;
252  in.read(theComplexityLevel, 2);
253  theHeaderSize += 2;
254  in.read(theSystemType, 4);
255  theHeaderSize += 4;
256  in.read(theOriginatingStationId, 10);
257  theHeaderSize += 10;
258  in.read(theDateTime, 14);
259  theHeaderSize += 14;
260  in.read(theFileTitle, 80);
261  theHeaderSize += 80;
262 
263  // read security group
264  in.read(theSecurityClassification, 1);
265  theHeaderSize ++;
266  in.read(theSecurityClassificationSys, 2);
267  theHeaderSize += 2;
268  in.read(theCodewords, 11);
269  theHeaderSize += 11;
270  in.read(theControlAndHandling, 2);
271  theHeaderSize += 2;
272  in.read(theReleasingInstructions, 20);
273  theHeaderSize += 20;
274  in.read(theDeclassificationType, 2);
275  theHeaderSize += 2;
276  in.read(theDeclassificationDate, 8);
277  theHeaderSize += 8;
278  in.read(theDeclassificationExemption, 4);
279  theHeaderSize += 4;
280 
281  in.read(theDowngrade, 1);
282  theHeaderSize ++;
283  in.read(theDowngradingDate, 8);
284  theHeaderSize += 8;
285  in.read(theClassificationText, 43);
286  theHeaderSize += 43;
287  in.read(theClassificationAuthorityType, 1);
288  theHeaderSize ++;
289  in.read(theClassificationAuthority, 40);
290  theHeaderSize += 40;
291  in.read(theClassificationReason, 1);
292  theHeaderSize ++;
293  in.read(theSecuritySourceDate, 8);
294  theHeaderSize += 8;
295  in.read(theSecurityControlNumber, 15);
296  theHeaderSize += 15;
297  in.read(theCopyNumber, 5);
298  theHeaderSize += 5;
299  in.read(theNumberOfCopies, 5);
300  theHeaderSize += 5;
301  in.read(theEncryption, 1);
302  theHeaderSize ++;
303  in.read((char*)theFileBackgroundColor, 3);
304  theHeaderSize += 3;
305  in.read(theOriginatorsName, 24);
306  theHeaderSize += 24;
307  in.read(theOriginatorsPhone, 18);
308  theHeaderSize += 18;
309  in.read(theFileLength, 12);
310  theHeaderSize += 12;
311  in.read(theHeaderLength, 6);
312  theHeaderSize += 6;
313 
314  // image description group
315  in.read(theNumberOfImageInfoRecords, 3);
316  theHeaderSize += 3;
318 
319  // symbol description group
320  in.read(theNumberOfGraphicInfoRecords, 3);
321  theHeaderSize += 3;
323 
324  in.read(theReservedForFutureUse1, 3);
325  theHeaderSize += 3;
326 
327  // text file information group
328  in.read(theNumberOfTextFileInfoRecords, 3);
329  theHeaderSize += 3;
331 
332  // Data extension group
334  theHeaderSize += 3;
336 
337  // Reserve Extension Segment group
338  in.read(theNumberOfResExtSegInfoRecords, 3);
339  theHeaderSize += 3;
341 
342  in.read(theUserDefinedHeaderDataLength, 5);
343  theHeaderSize += 5;
344 
345  // only get the header overflow if there even exists
346  // user defined data.
347  std::streampos userDefinedHeaderLength = ossimString(theUserDefinedHeaderDataLength).toInt32();
348  ossimNitfTagInformation headerTag;
349  std::streampos start = in.tellg();
350  std::streampos current = in.tellg();
351  if(userDefinedHeaderLength > 0)
352  {
353  in.read(theUserDefinedHeaderOverflow, 3);
354  current = in.tellg();
355 
356  while((current - start) < userDefinedHeaderLength)
357  {
358  headerTag.parseStream(in);
359  headerTag.setTagType("UDHD");
360  theTagList.push_back(headerTag);
361  // in.ignore(headerTag.getTagLength());
362  // headerTag.clearFields();
363  current = in.tellg();
364  }
365  //in.seekg(start + userDefinedHeaderLength);
366  theHeaderSize += (userDefinedHeaderLength);
367  }
368  in.read(theExtendedHeaderDataLength, 5);
369  theHeaderSize += 5;
370  std::streampos extendedHeaderDataLength = ossimString(theExtendedHeaderDataLength).toInt32();
371 
372  start = in.tellg();
373  current = in.tellg();
374  // for now let's just ignore it
375  if(extendedHeaderDataLength > 0)
376  {
377  in.read(theExtendedHeaderDataOverflow, 3);
378  current = in.tellg();
379  while((current - start) < extendedHeaderDataLength)
380  {
381  headerTag.parseStream(in);
382  headerTag.setTagType("XHD");
383  theTagList.push_back(headerTag);
384 
385  // in.ignore(headerTag.getTagLength());
386  // headerTag.clearFields();
387  current = in.tellg();
388  }
389  theHeaderSize += extendedHeaderDataLength;
390  in.seekg(start + extendedHeaderDataLength);
391  }
392 
393  // this need to be re-thought
395  readOverflowTags(in);
396  // custom DES parsers
397  bool parseDes = ossimString(ossimPreferences::instance()->findPreference("des_parser")).toBool();
398  if (parseDes) readDes(in);
399 }
400 
402 {
403  bool result = ossimNitfFileHeaderV2_X::isValid();
404 
405  if(result)
406  {
407 
408  }
409 
410  return result;
411 }
412 
414 {
416  if (overflow != 0)
417  {
419  if (des != NULL)
420  {
421  const vector<ossimNitfTagInformation> &desTags = des->getTagList();
422  for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
423  {
424  iter->setTagType("UDHD");
425  theTagList.push_back(*iter);
426  }
427  }
428  delete des;
429  }
430 
432  if (overflow != 0)
433  {
435  if (des != NULL)
436  {
437  const vector<ossimNitfTagInformation> &desTags = des->getTagList();
438  for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
439  {
440  iter->setTagType("XHD");
441  theTagList.push_back(*iter);
442  }
443  }
444  delete des;
445  }
446 }
447 
449 {
451 
452  for (int i=0; i<getNumberOfDataExtSegments(); ++i)
453  {
454  ossimIFStream64::seekg64(in, theDataExtSegOffsetList[i].theDataExtSegHeaderOffset, ios::beg);
455  des.parseStream(in, theNitfDataExtSegInfoRecords[i].getDataExtSegLength());
456  theDesList.push_back(des);
457 
458  }
459 }
460 
462 {
463  out.write(theFileTypeVersion, 9);
464  out.write(theComplexityLevel, 2);
465  out.write(theSystemType, 4);
466  out.write(theOriginatingStationId, 10);
467  out.write(theDateTime, 14);
468  out.write(theFileTitle, 80);
469  out.write(theSecurityClassification, 1);
470  out.write(theSecurityClassificationSys, 2);
471  out.write(theCodewords, 11);
472  out.write(theControlAndHandling, 2);
473  out.write(theReleasingInstructions, 20);
474  out.write(theDeclassificationType, 2);
475  out.write(theDeclassificationDate, 8);
476  out.write(theDeclassificationExemption, 4);
477  out.write(theDowngrade, 1);
478  out.write(theDowngradingDate, 8);
479  out.write(theClassificationText, 43);
480  out.write(theClassificationAuthorityType, 1);
481  out.write(theClassificationAuthority, 40);
482  out.write(theClassificationReason, 1);
483  out.write(theSecuritySourceDate, 8);
484  out.write(theSecurityControlNumber, 15);
485  out.write(theCopyNumber, 5);
486  out.write(theNumberOfCopies, 5);
487  out.write(theEncryption, 1);
488  out.write((char*)theFileBackgroundColor, 3);
489  out.write(theOriginatorsName, 24);
490  out.write(theOriginatorsPhone, 18);
491  out.write(theFileLength, 12);
492  out.write(theHeaderLength, 6);
493  ossim_uint32 idx = 0;
494  {
495  std::ostringstream outString;
496 
497  outString << std::setw(3)
498  << std::setfill('0')
499  << std::setiosflags(ios::right)
500  << theNitfImageInfoRecords.size();
501 
502  out.write(outString.str().c_str(), 3);
503 
504  for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
505  {
506  out.write(theNitfImageInfoRecords[idx].theImageSubheaderLength, 6);
507  out.write(theNitfImageInfoRecords[idx].theImageLength, 10);
508  }
509  }
510  {
511  std::ostringstream outString;
512 
513  outString << std::setw(3)
514  << std::setfill('0')
515  << std::setiosflags(ios::right)
516  << theNitfGraphicInfoRecords.size();
517 
518  out.write(outString.str().c_str(), 3);
519  for(idx = 0; idx < theNitfGraphicInfoRecords.size(); ++idx)
520  {
521  out.write(theNitfGraphicInfoRecords[idx].theGraphicSubheaderLength, 4);
522  out.write(theNitfGraphicInfoRecords[idx].theGraphicLength, 6);
523  }
524  }
525  out.write(theReservedForFutureUse1, 3);
526  {
527  std::ostringstream outString;
528 
529  outString << std::setw(3)
530  << std::setfill('0')
531  << std::setiosflags(ios::right)
532  << theNitfTextFileInfoRecords.size();
533 
534  out.write(outString.str().c_str(), 3);
535  for(idx = 0; idx < theNitfTextFileInfoRecords.size(); ++idx)
536  {
537  out.write(theNitfTextFileInfoRecords[idx].theTextFileSubheaderLength, 4);
538  out.write(theNitfTextFileInfoRecords[idx].theTextFileLength, 5);
539  }
540  }
541  {
542  std::ostringstream outString;
543 
544  outString << std::setw(3)
545  << std::setfill('0')
546  << std::setiosflags(ios::right)
548 
549  out.write(outString.str().c_str(), 3);
550  for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
551  {
552  out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegSubheaderLength, 4);
553  out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegLength, 9);
554  }
555  }
556  {
557  std::ostringstream outString;
558 
559  outString << std::setw(3)
560  << std::setfill('0')
561  << std::setiosflags(ios::right)
562  << theNitfResExtSegInfoRecords.size();
563 
564  out.write(outString.str().c_str(), 3);
565  for(idx = 0; idx < theNitfResExtSegInfoRecords.size(); ++idx)
566  {
567  out.write(theNitfResExtSegInfoRecords[idx].theResExtSegSubheaderLength, 4);
568  out.write(theNitfResExtSegInfoRecords[idx].theResExtSegLength, 7);
569  }
570  }
571 /*
572  out.write(theUserDefinedHeaderDataLength, 5);
573  if(ossimString(theUserDefinedHeaderDataLength).toInt32() > 0)
574  {
575  out.write(theUserDefinedHeaderOverflow, 3);
576  }
577  ossim_uint32 totalLength = getTotalTagLength();
578  if(totalLength <= 99999)
579  {
580  std::ostringstream tempOut;
581 
582  tempOut << std::setw(5)
583  << std::setfill('0')
584  << std::setiosflags(ios::right)
585  << totalLength;
586 
587  memcpy(theExtendedHeaderDataLength, tempOut.str().c_str(), 5);
588 
589  out.write(theExtendedHeaderDataLength, 5);
590 
591  // for now we hard code the 000 for we do not currently support writing to the DES if the total tag length is
592  // larger than supported
593  //
594  memset(theExtendedHeaderDataOverflow, '0', 3);
595 
596  if(totalLength > 0)
597  {
598  out.write(theExtendedHeaderDataOverflow, 3);
599  ossim_uint32 i = 0;
600 
601  for(i = 0; i < theTagList.size(); ++i)
602  {
603  theTagList[i].writeStream(out);
604  }
605  }
606  }
607  else
608  {
609  ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length < 99999" << std::endl;
610  }
611  */
613  if (totalLength > 0)
614  {
615  totalLength += 3;
616  }
617 
618  // Scope tempOut
619  {
620  std::ostringstream tempOut;
621  tempOut << std::setw(5)
622  << std::setfill('0')
623  << std::setiosflags(ios::right)
624  << totalLength;
625 
626  out.write(tempOut.str().c_str(), 5);
627  }
628 
629  if (totalLength > 0)
630  {
631  if(totalLength <= 99999)
632  {
633  out.write(theUserDefinedHeaderOverflow, 3);
634 
635  for (unsigned int i = 0; i < theTagList.size(); ++i)
636  {
637  if (theTagList[i].getTagType() == "UDHD")
638  {
639  theTagList[i].writeStream(out);
640  }
641  }
642  }
643  else
644  {
645  ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length <= 99999" << std::endl;
646  }
647  }
648 
650  if (totalLength > 0)
651  {
652  totalLength += 3;
653  }
654 
655  // Scope tempOut
656  {
657  std::ostringstream tempOut;
658  tempOut << std::setw(5)
659  << std::setfill('0')
660  << std::setiosflags(ios::right)
661  << totalLength;
662 
663  out.write(tempOut.str().c_str(), 5);
664  }
665 
666  if (totalLength > 0)
667  {
668  if(totalLength <= 99999)
669  {
670  out.write(theExtendedHeaderDataOverflow, 3);
671 
672  for(unsigned int i = 0; i < theTagList.size(); ++i)
673  {
674  if (theTagList[i].getTagType() == "XHD")
675  {
676  theTagList[i].writeStream(out);
677  }
678  }
679  }
680  else
681  {
682  ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length <= 99999" << std::endl;
683  }
684  }
685 
686 }
687 
689  const std::string& prefix) const
690 {
691  out << setiosflags(ios::left)
692  << prefix << std::setw(24) << "FHDR:"
693  << theFileTypeVersion << "\n"
694  << prefix << std::setw(24) << "CLEVEL:"
695  << theComplexityLevel << "\n"
696  << prefix << std::setw(24) << "STYPE:"
697  << theSystemType << "\n"
698  << prefix << std::setw(24) << "OSTAID:"
699  << theOriginatingStationId << "\n"
700  << prefix << std::setw(24) << "FDT:"
701  << theDateTime << "\n"
702  << prefix << std::setw(24) << "FTITLE:"
703  << theFileTitle << "\n"
704  << prefix << std::setw(24) << "FSCLAS:"
705  << theSecurityClassification<< "\n"
706  << prefix << std::setw(24) << "FSCLSY:"
708  << prefix << std::setw(24) << "FSCODE:"
709  << theCodewords << "\n"
710  << prefix << std::setw(24) << "FSCTLH:"
711  << theControlAndHandling << "\n"
712  << prefix << std::setw(24) << "FSREL:"
713  << theReleasingInstructions << "\n"
714  << prefix << std::setw(24) << "FSDCTP:"
715  << theDeclassificationType << "\n"
716  << prefix << std::setw(24) << "FSDCDT:"
717  << theDeclassificationDate << "\n"
718  << prefix << std::setw(24) << "FSDCXM:"
720  << prefix << std::setw(24) << "FSDG:"
721  << theDowngrade << "\n"
722  << prefix << std::setw(24) << "FSDGDT:"
723  << theDowngradingDate << "\n"
724  << prefix << std::setw(24) << "FSCLTX:"
725  << theClassificationText << "\n"
726  << prefix << std::setw(24) << "FSCATP:"
728  << prefix << std::setw(24) << "FSCAUT:"
729  << theClassificationAuthority << "\n"
730  << prefix << std::setw(24) << "FSCRSN:"
731  << theClassificationReason << "\n"
732  << prefix << std::setw(24) << "FSSRDT:"
733  << theSecuritySourceDate << "\n"
734  << prefix << std::setw(24) << "FSCTLN:"
735  << theSecurityControlNumber << "\n"
736  << prefix << std::setw(24) << "FSCOP:"
737  << theCopyNumber << "\n"
738  << prefix << std::setw(24) << "FSCOPYS:"
739  << theNumberOfCopies << "\n"
740  << prefix << std::setw(24) << "ENCRYP:"
741  << theEncryption << "\n"
742  << prefix << std::setw(24) << "FBKGC[0]:"
743  << (int)theFileBackgroundColor[0] << "\n"
744  << prefix << std::setw(24) << "FBKGC[1]:"
745  << (int)theFileBackgroundColor[1] << "\n"
746  << prefix << std::setw(24) << "FBKGC[2]:"
747  << (int)theFileBackgroundColor[2] << "\n"
748  << prefix << std::setw(24) << "ONAME:"
749  << theOriginatorsName<< "\n"
750  << prefix << std::setw(24) << "OPHONE:"
751  << theOriginatorsPhone << "\n"
752  << prefix << std::setw(24) << "FL:"
753  << theFileLength << "\n"
754  << prefix << std::setw(24) << "HL:"
755  << theHeaderLength << "\n"
756  << prefix << std::setw(24) << "NUMI:"
757  << theNumberOfImageInfoRecords << "\n";
758 
759  ossim_uint32 index;
760 
761  for (index = 0; index < theNitfImageInfoRecords.size(); ++index)
762  {
764  os << setw(3) << setfill('0') << (index+1) << ":";
765 
766  ossimString tmpStr = "LISH";
767  tmpStr += os.str();
768 
769  out << prefix << std::setw(24) << tmpStr
770  << theNitfImageInfoRecords[index].theImageSubheaderLength << "\n";
771  tmpStr = "LI";
772  tmpStr += os.str();
773 
774  out << prefix << std::setw(24) << tmpStr
775  << theNitfImageInfoRecords[index].theImageLength << "\n";
776  }
777 
778  out << prefix << std::setw(24) << "NUMS:" << theNumberOfGraphicInfoRecords
779  << "\n";
780 
781  for (index = 0; index < theNitfGraphicInfoRecords.size(); ++index)
782  {
784  os << setw(3) << setfill('0') << (index+1) << ":";
785 
786  ossimString tmpStr = "LSSH";
787  tmpStr += os.str();
788 
789  out << prefix << std::setw(24) << tmpStr
790  << theNitfGraphicInfoRecords[index].theGraphicSubheaderLength
791  << "\n";
792 
793  tmpStr = "LS";
794  tmpStr += os.str();
795 
796  out << prefix << std::setw(24) << tmpStr
797  << theNitfGraphicInfoRecords[index].theGraphicLength
798  << "\n";
799  }
800 
801  out << prefix << std::setw(24) << "NUMX:" << theReservedForFutureUse1 << "\n"
802  << prefix << std::setw(24) << "NUMT:"
804 
805  for (index = 0; index < theNitfTextFileInfoRecords.size(); ++index)
806  {
808  os << setw(3) << setfill('0') << (index+1) << ":";
809 
810  ossimString tmpStr = "LTSH";
811  tmpStr += os.str();
812 
813  out << prefix << std::setw(24) << tmpStr
814  << theNitfTextFileInfoRecords[index].theTextFileSubheaderLength
815  << "\n";
816 
817  tmpStr = "LT";
818  tmpStr += os.str();
819 
820  out << prefix << std::setw(24) << tmpStr
821  << theNitfTextFileInfoRecords[index].theTextFileLength << "\n";
822  }
823 
824  out << prefix << std::setw(24) << "NUMDES:" << theNumberOfDataExtSegInfoRecords
825  << "\n";
826 
827  for (index = 0; index < theNitfDataExtSegInfoRecords.size(); ++index)
828  {
830  os << setw(3) << setfill('0') << (index+1) << ":";
831 
832  ossimString tmpStr = "LDSH";
833  tmpStr += os.str();
834 
835  out << prefix << std::setw(24) << tmpStr
836  << theNitfDataExtSegInfoRecords[index].theDataExtSegSubheaderLength
837  << "\n";
838 
839  tmpStr = "LD";
840  tmpStr += os.str();
841 
842  out << prefix << std::setw(24) << tmpStr
843  << theNitfDataExtSegInfoRecords[index].theDataExtSegLength
844  << "\n";
845  }
846 
847  out << prefix << std::setw(24) << "NUMRES:"
849 
850  for (index = 0; index < theNitfResExtSegInfoRecords.size(); ++index)
851  {
853  os << setw(3) << setfill('0') << (index+1) << ":";
854 
855  ossimString tmpStr = "LRESSH";
856  tmpStr += os.str();
857 
858  out << prefix << std::setw(24) << tmpStr
859  << theNitfResExtSegInfoRecords[index].theResExtSegSubheaderLength
860  << "\n";
861 
862  tmpStr = "LRE";
863  tmpStr += os.str();
864 
865  out << prefix << std::setw(24) << tmpStr
866  << theNitfResExtSegInfoRecords[index].theResExtSegLength
867  << "\n";
868  }
869 
870  out << prefix << std::setw(24) << "UDHDL:"
872  << "\n"
873  << prefix << std::setw(24) << "UDHOFL:"
875  << "\n"
876  << prefix << std::setw(24) << "XHDL:"
878  << "\n"
879  << prefix << std::setw(24) << "XHDLOFL:"
881  << "\n";
882 
883  // Call DES PRINT
884  for (int i=0; i<theDesList.size(); ++i)
885  {
886  theDesList[i].print(out, prefix);
887  }
888 
889  return ossimNitfFileHeader::print(out, prefix);
890 }
891 
893 {
894  return new ossimNitfImageHeaderV2_1;
895 }
896 
898 {
899  return new ossimNitfTextHeaderV2_0;
900 }
901 
903 {
905 }
906 
908 {
909  return (theEncryption[0]=='1');
910 }
911 
913 {
914  return (ossim_int32)theNitfImageInfoRecords.size();
915 }
916 
918 {
919  return static_cast<ossim_int32>(theNitfTextFileInfoRecords.size());
920 }
921 
923 {
924  return theHeaderSize;
925 }
926 
928 {
929  ossimString temp = theFileLength;
930 
931  if(temp == "999999999999")
932  {
933  return -1;
934  }
935  else
936  {
937  return temp.toInt64();
938  }
939 }
940 
942 {
943  return &theFileTypeVersion[4];
944 }
945 
946 
948 {
949  memcpy(theFileTypeVersion, "NITF02.10", 9);
950  memcpy(theComplexityLevel, "01", 2);
951  memcpy(theSystemType, "BF01", 4);
952  memset(theOriginatingStationId, ' ', 10);
953  memset(theDateTime, ' ', 14);
954  memset(theFileTitle, ' ', 80);
955  memset(theSecurityClassification, ' ', 1);
956  memset(theSecurityClassificationSys, ' ', 2);
957  memset(theCodewords, ' ', 11);
958  memset(theControlAndHandling, ' ', 2);
959  memset(theReleasingInstructions, ' ', 20);
960  memset(theDeclassificationType, ' ', 2);
961  memset(theDeclassificationDate, ' ', 8);
962  memset(theDeclassificationExemption, ' ', 4);
963  memset(theDowngrade, ' ', 1);
964  memset(theDowngradingDate, ' ', 8);
965  memset(theClassificationText, ' ', 43);
966  memset(theClassificationAuthorityType, ' ', 1);
967  memset(theClassificationAuthority, ' ', 40);
968  memset(theClassificationReason, ' ', 1);
969  memset(theSecuritySourceDate, ' ', 8);
970  memset(theSecurityControlNumber, ' ', 15);
971  memset(theCopyNumber, '0', 5);
972  memset(theNumberOfCopies, '0', 5);
973  memset(theEncryption, ' ', 1);
974  memset(theFileBackgroundColor, 0, 3);
975  memset(theOriginatorsName, ' ', 24);
976  memset(theOriginatorsPhone, ' ', 18);
977  memset(theFileLength, ' ', 12);
978  memset(theHeaderLength, ' ', 6);
979  memset(theNumberOfImageInfoRecords, '0', 3);
980  memset(theNumberOfGraphicInfoRecords, '0', 3);
981  memset(theReservedForFutureUse1, '0', 3);
982  memset(theNumberOfTextFileInfoRecords, '0', 3);
983  memset(theNumberOfDataExtSegInfoRecords, '0', 3);
984  memset(theNumberOfResExtSegInfoRecords, '0', 3);
985  memset(theUserDefinedHeaderDataLength, '0', 5);
986  memset(theUserDefinedHeaderOverflow, '0',3);
987  memset(theExtendedHeaderDataLength, '0',5);
988  memset(theExtendedHeaderDataOverflow, '0', 3);
989  theFileTypeVersion[9] = '\0';
990  theComplexityLevel[2] = '\0';
991  theSystemType[4] = '\0';
992  theOriginatingStationId[10] = '\0';
993  theDateTime[14] = '\0';
994  theFileTitle[80] = '\0';
995  theSecurityClassification[1] = '\0';
997  theCodewords[11] = '\0';
998  theControlAndHandling[2] = '\0';
999  theReleasingInstructions[20] = '\0';
1000  theDeclassificationType[2] = '\0';
1001  theDeclassificationDate[8] = '\0';
1002  theDeclassificationExemption[4] = '\0';
1003  theDowngrade[1] = '\0';
1004  theDowngradingDate[8] = '\0';
1005  theClassificationText[43] = '\0';
1007  theClassificationAuthority[40] = '\0';
1008  theClassificationReason[1] = '\0';
1009  theSecuritySourceDate[8] = '\0';
1010  theSecurityControlNumber[15] = '\0';
1011  theCopyNumber[5] = '\0';
1012  theNumberOfCopies[5] = '\0';
1013  theEncryption[1] = '\0';
1014  theOriginatorsName[24] = '\0';
1015  theOriginatorsPhone[18] = '\0';
1016  theFileLength[12] = '\0';
1017  theHeaderLength[6] = '\0';
1018  theNumberOfImageInfoRecords[3] = '\0';
1020  theReservedForFutureUse1[3] = '\0';
1025  theUserDefinedHeaderOverflow[3] = '\0';
1026  theExtendedHeaderDataLength[5] = '\0';
1028 
1029  theHeaderSize = 0;
1030 }
1031 
1033 {
1035  ossim_int32 index;
1036 
1037  theNitfImageInfoRecords.clear();
1038  for(index=0; index < numberOfImages; index++)
1039  {
1041 
1042 
1043  in.read(temp.theImageSubheaderLength, 6);
1044  in.read(temp.theImageLength, 10);
1045  theHeaderSize += 16;
1046 
1047  temp.theImageSubheaderLength[6] = '\0';
1048  temp.theImageLength[10] = '\0';
1049 
1050  theNitfImageInfoRecords.push_back(temp);
1051  }
1052 }
1053 
1055 {
1057  ossim_int32 index;
1058 
1059  theNitfGraphicInfoRecords.clear();
1060 
1061  for(index=0; index < numberOfGraphics; index++)
1062  {
1064 
1065 
1066  in.read(temp.theGraphicSubheaderLength, 4);
1067  in.read(temp.theGraphicLength, 6);
1068  theHeaderSize += 10;
1069 
1070  temp.theGraphicSubheaderLength[4] = '\0';
1071  temp.theGraphicLength[6] = '\0';
1072 
1073  theNitfGraphicInfoRecords.push_back(temp);
1074  }
1075 }
1076 
1078 {
1080  ossim_int32 index;
1081 
1083  for(index=0; index < numberOfTextFiles; index++)
1084  {
1086 
1087  in.read(temp.theTextFileSubheaderLength, 4);
1088  in.read(temp.theTextFileLength, 5);
1089  theHeaderSize += 9;
1090 
1091  temp.theTextFileSubheaderLength[4] = '\0';
1092  temp.theTextFileLength[5] = '\0';
1093 
1094  theNitfTextFileInfoRecords.push_back(temp);
1095  }
1096 }
1097 
1099 {
1101  ossim_int32 index;
1102 
1104  for(index=0; index < numberOfDataExtSegs; index++)
1105  {
1107 
1108  in.read(temp.theDataExtSegSubheaderLength, 4);
1109  in.read(temp.theDataExtSegLength, 9);
1110  theHeaderSize += 13;
1111 
1112  temp.theDataExtSegSubheaderLength[4] = '\0';
1113  temp.theDataExtSegLength[9] = '\0';
1114 
1115  theNitfDataExtSegInfoRecords.push_back(temp);
1116  }
1117 }
1118 
1120 {
1122 
1124 }
1125 
1127 {
1129  ossim_int32 index;
1130 
1132  for(index=0; index < numberOfResExtSegs; index++)
1133  {
1135 
1136  in.read(temp.theResExtSegSubheaderLength, 4);
1137  in.read(temp.theResExtSegLength, 7);
1138  theHeaderSize += 11;
1139 
1140  temp.theResExtSegSubheaderLength[4] = '\0';
1141  temp.theResExtSegLength[7] = '\0';
1142 
1143  theNitfResExtSegInfoRecords.push_back(temp);
1144  }
1145 }
1146 
1148 {
1149  if (theNitfImageInfoRecords.size()) theNitfImageInfoRecords.pop_back();
1150 
1152 }
1153 
1155 {
1156  return 0;
1157 }
1158 
1160 {
1161  return 0;
1162 }
1163 
1165 {
1166  return theNitfGraphicInfoRecords.size();
1167 }
1168 
1170 {
1171  return theNitfDataExtSegInfoRecords.size();
1172 }
1173 
1175 {
1176  return theNitfResExtSegInfoRecords.size();
1177 }
1178 
1180 {
1181  return theDateTime;
1182 }
1183 
1185 {
1186  return theImageRect;
1187 }
1188 
1190 {
1191  theNitfImageInfoRecords.push_back(recordInfo);
1192 
1194 }
1195 
1197 {
1198  theNitfTextFileInfoRecords.push_back(recordInfo);
1199 
1201 }
1202 
1204 {
1205  bool result = ossimNitfFileHeaderV2_X::saveState(kwl, prefix);
1206 
1207  if(result)
1208  {
1210  kwl.add(prefix, FSCODE_KW.c_str(), theCodewords);
1211  kwl.add(prefix, FSCTLH_KW.c_str(), theControlAndHandling);
1212  kwl.add(prefix, FSREL_KW.c_str(), theReleasingInstructions);
1213  kwl.add(prefix, FSDCTP_KW.c_str(), theDeclassificationType);
1214  kwl.add(prefix, FSDCDT_KW.c_str(), theDeclassificationDate);
1216  kwl.add(prefix, FSDG_KW.c_str(), theDowngrade);
1217  kwl.add(prefix, FSDGDT_KW.c_str(), theDowngradingDate);
1218  kwl.add(prefix, FSCLTX_KW.c_str(), theClassificationText);
1221  kwl.add(prefix, FSCRSN_KW.c_str(), theClassificationReason);
1222  kwl.add(prefix, FSSRDT_KW.c_str(), theSecuritySourceDate);
1223  kwl.add(prefix, FSCTLN_KW.c_str(), theSecurityControlNumber);
1224  //kwl.add(prefix, FBKGC_KW.c_str(), theFileBackgroundColor);
1225  kwl.add(prefix, ONAME_KW.c_str(), theOriginatorsName);
1226  kwl.add(prefix, OPHONE_KW.c_str(), theOriginatorsPhone);
1227  kwl.add(prefix, FL_KW.c_str(), theFileLength);
1228  kwl.add(prefix, HL_KW.c_str(), theHeaderLength);
1229  kwl.add(prefix, NUMI_KW.c_str(), theNumberOfImageInfoRecords);
1230  }
1231 
1232  return result;
1233 }
1234 
1236 {
1237  theNitfDataExtSegInfoRecords.push_back(recordInfo);
1238 
1240 }
1241 
1242 
1244 {
1245  if ( i < static_cast<int>(theNitfImageInfoRecords.size()) )
1246  {
1247  theNitfImageInfoRecords[i] = recordInfo;
1248  }
1249 }
1250 
1252 {
1253  return 0;
1254 }
1255 
1257 {
1258  return 0;
1259 }
1260 
1262 {
1263  // this will be a running tally
1264  ossim_uint64 tally = theHeaderSize;
1265  ossim_uint64 idx = 0;
1266 
1267  // clear out all offset inforamtion and begin populating them
1268  theImageOffsetList.clear();
1269  theGraphicOffsetList.clear();
1270  theTextFileOffsetList.clear();
1271  theDataExtSegOffsetList.clear();
1272 
1273  for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
1274  {
1276  tally + theNitfImageInfoRecords[idx].getHeaderLength()));
1277  tally += theNitfImageInfoRecords[idx].getTotalLength();
1278  }
1279  for(idx = 0; idx < theNitfGraphicInfoRecords.size(); ++idx)
1280  {
1282  tally + theNitfGraphicInfoRecords[idx].getHeaderLength()));
1283  tally += theNitfGraphicInfoRecords[idx].getTotalLength();
1284  }
1285 
1286  for(idx = 0; idx < theNitfTextFileInfoRecords.size(); ++idx)
1287  {
1289  tally + theNitfTextFileInfoRecords[idx].getHeaderLength()));
1290  tally += theNitfTextFileInfoRecords[idx].getTotalLength();
1291  }
1292 
1293  for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
1294  {
1296  tally + theNitfDataExtSegInfoRecords[idx].getHeaderLength()));
1297  tally += theNitfDataExtSegInfoRecords[idx].getTotalLength();
1298  }
1299 }
1300 
1303  ossim::istream& in)const
1304 {
1305  ossimNitfImageHeader *result = 0;
1306 
1307  if( (getNumberOfImages() > 0) && (imageNumber < theImageOffsetList.size()) )
1308  {
1309  result = allocateImageHeader();
1310  in.seekg(theImageOffsetList[imageNumber].theImageHeaderOffset, ios::beg);
1311  ((ossimNitfImageHeaderV2_1*)result)->parseStream(in, this);
1312  }
1313  else
1314  {
1315 #if 0
1316  ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimNitfFileHeaderV2_1::getNewImageHeader: "
1317  << "\nNo images in file or image number (" << imageNumber
1318  << ") is out of range!\n";
1319 #endif
1320  }
1321 
1322  return result;
1323 }
1324 
1327  ossim::istream& /* in */)const
1328 {
1329  // Currently not implemented...
1330 
1331  ossimNitfSymbolHeader *result = 0;
1332 
1333 
1334 
1335  return result;
1336 }
1337 
1340  ossim::istream& /* in */)const
1341 {
1342  // Currently not implemented...
1343  ossimNitfLabelHeader *result = 0;
1344 
1345  return result;
1346 }
1347 
1350  ossim::istream& /* in */)const
1351 {
1352  // Currently not implemented...
1353  ossimNitfTextHeader *result = 0;
1354 
1355  return result;
1356 }
1357 
1360  ossim_int32 dataExtNumber, ossim::istream& in )const
1361 {
1362  ossimNitfDataExtensionSegment *result = 0;
1363 
1364  if((getNumberOfDataExtSegments() > 0) &&
1365  (dataExtNumber < (ossim_int32)theNitfDataExtSegInfoRecords.size()) &&
1366  (dataExtNumber >= 0))
1367  {
1368  result = allocateDataExtSegment();
1369  // ossimIFStream64::seekg64(in, theDataExtSegOffsetList[dataExtNumber].theDataExtSegHeaderOffset, ios::beg);
1370  in.seekg(theDataExtSegOffsetList[dataExtNumber].theDataExtSegHeaderOffset, ios::beg);
1371  result->parseStream(in, theNitfDataExtSegInfoRecords[dataExtNumber].getDataExtSegLength());
1372  }
1373 
1374  return result;
1375 }
1376 
1378 {
1380 }
1381 
1383 {
1384  return theCodewords;
1385 }
1386 
1388 {
1389  return theControlAndHandling;
1390 }
1391 
1393 {
1394  return theReleasingInstructions;
1395 }
1396 
1398 {
1399  return theDeclassificationType;
1400 }
1401 
1403 {
1404  return theDeclassificationDate;
1405 }
1406 
1408 {
1410 }
1411 
1413 {
1414  return theDowngrade;
1415 }
1416 
1418 {
1419  return theDowngradingDate;
1420 }
1421 
1423 {
1424  return theClassificationText;
1425 }
1426 
1428 {
1430 }
1431 
1433 {
1435 }
1436 
1438 {
1439  return theClassificationReason;
1440 }
1441 
1443 {
1444  return theSecuritySourceDate;
1445 }
1446 
1448 {
1449  return theSecurityControlNumber;
1450 }
1451 
1453  ossim_uint8& g,
1454  ossim_uint8& b)const
1455 {
1456  r = theFileBackgroundColor[0];
1457  g = theFileBackgroundColor[1];
1458  b = theFileBackgroundColor[2];
1459 }
1460 
1462 {
1463  return theOriginatorsName;
1464 }
1465 
1467 {
1468  return theOriginatorsPhone;
1469 }
1470 
1472 {
1473  std::ostringstream out;
1474 
1475  out << std::setw(12)
1476  << std::setfill('0')
1477  << std::setiosflags(ios::right)
1478  << fileLength;
1479 
1480  memcpy(theFileLength, out.str().c_str(), 12);
1481 }
1482 
1483 
1484 
1486  {
1487  if (num < 1000)
1488  {
1489  std::ostringstream out;
1490 
1491  out << std::setw(3)
1492  << std::setfill('0')
1493  << std::setiosflags(ios::right)
1494  << num;
1495 
1496  memcpy(theNumberOfGraphicInfoRecords, out.str().c_str(), 3);
1497  }
1498  else
1499  {
1500  std::string s = "ossimNitfFileHeaderV2_1::setNumberOfGraphicInfoRecords:";
1501  s += " ERROR\nExceeded max number of 999!";
1502  if (traceDebug())
1503  {
1504  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1505  }
1506  throw std::out_of_range(s);
1507  }
1508 
1509  }
1510 
1512 {
1513  if (num < 1000)
1514  {
1515  std::ostringstream out;
1516 
1517  out << std::setw(3)
1518  << std::setfill('0')
1519  << std::setiosflags(ios::right)
1520  << num;
1521 
1522  memcpy(theNumberOfDataExtSegInfoRecords, out.str().c_str(), 3);
1523  }
1524  else
1525  {
1526  std::string s = "ossimNitfFileHeaderV2_1::setNumberOfDataExtSegInfoRecords:";
1527  s += " ERROR\nExceeded max number of 999!";
1528  if (traceDebug())
1529  {
1530  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1531  }
1532  throw std::out_of_range(s);
1533  }
1534 }
1535 
1536 
1538 {
1539  if (num < 1000)
1540  {
1541  std::ostringstream out;
1542 
1543  out << std::setw(3)
1544  << std::setfill('0')
1545  << std::setiosflags(ios::right)
1546  << num;
1547 
1548  memcpy(theNumberOfTextFileInfoRecords, out.str().c_str(), 3);
1549  }
1550  else
1551  {
1552  std::string s = "ossimNitfFileHeaderV2_1::setNumberOfTextRecords:";
1553  s += " ERROR\nExceeded max number of 999!";
1554  if (traceDebug())
1555  {
1556  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1557  }
1558  throw std::out_of_range(s);
1559  }
1560 }
1561 
1562 
1564 {
1565  if (num < 1000)
1566  {
1567  std::ostringstream out;
1568 
1569  out << std::setw(3)
1570  << std::setfill('0')
1571  << std::setiosflags(ios::right)
1572  << num;
1573 
1574  memcpy(theNumberOfImageInfoRecords, out.str().c_str(), 3);
1575  }
1576  else
1577  {
1578  std::string s = "ossimNitfFileHeaderV2_1::setNumberOfImageInfoRecords:";
1579  s += " ERROR\nExceeded max image info number of 999!";
1580  if (traceDebug())
1581  {
1582  ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
1583  }
1584  throw std::out_of_range(s);
1585  }
1586 }
1587 
1589 {
1590  std::ostringstream out;
1591 
1592  out << std::setw(6)
1593  << std::setfill('0')
1594  << std::setiosflags(ios::right)
1595  << headerLength;
1596 
1597  memcpy(theHeaderLength, out.str().c_str(), 6);
1598 }
1599 
1601 {
1602  std::ostringstream out;
1603 
1604  out << std::setw(2)
1605  << std::setfill(' ')
1606  << std::setiosflags(ios::left)
1607  << ossimString(value).trim();
1608 
1609  memcpy(theSecurityClassificationSys, out.str().c_str(), 2);
1610 }
1611 
1613 {
1614  std::ostringstream out;
1615 
1616  out << std::setw(11)
1617  << std::setfill(' ')
1618  << std::setiosflags(ios::left)
1619  << ossimString(codeWords).trim();
1620 
1621  memcpy(theCodewords, out.str().c_str(), 11);
1622 }
1623 
1625 {
1626  std::ostringstream out;
1627 
1628  out << std::setw(2)
1629  << std::setfill(' ')
1630  << std::setiosflags(ios::left)
1631  << ossimString(controlAndHandling).trim();
1632 
1633  memcpy(theControlAndHandling, out.str().c_str(), 2);
1634 }
1635 
1637 {
1638  std::ostringstream out;
1639 
1640  out << std::setw(20)
1641  << std::setfill(' ')
1642  << std::setiosflags(ios::left)
1643  << ossimString(releasingInstructions).trim();
1644 
1645  memcpy(theReleasingInstructions, out.str().c_str(), 20);
1646 }
1647 
1649 {
1650  std::ostringstream out;
1651 
1652  out << std::setw(2)
1653  << std::setfill(' ')
1654  << std::setiosflags(ios::left)
1655  << declassType.trim();
1656 
1657  memcpy(theDeclassificationType, out.str().c_str(), 2);
1658 }
1659 
1661 {
1662  memcpy(theDeclassificationDate, formatDate(getVersion(), d).c_str(), 8);
1663 }
1664 
1666 {
1667  if(d.size() >=8)
1668  {
1669  memcpy(theDeclassificationDate, d.c_str(), 8);
1670  }
1671 }
1672 
1674 {
1675  std::ostringstream out;
1676 
1677  out << std::setw(4)
1678  << std::setfill(' ')
1679  << std::setiosflags(ios::left)
1680  << exemption.trim();
1681 
1682  memcpy(theDeclassificationExemption, out.str().c_str(), 4);
1683 }
1684 
1686 {
1687  std::ostringstream out;
1688 
1689  out << std::setw(1)
1690  << std::setfill(' ')
1691  << std::setiosflags(ios::left)
1692  << downgrade.trim();
1693 
1694  memcpy(theDowngrade, out.str().c_str(), 1);
1695 }
1696 
1698 {
1699  memcpy(theDowngradingDate, formatDate(getVersion(), d).c_str(), 8);
1700 }
1701 
1703 {
1704  if(d.size() >=8)
1705  {
1706  memcpy(theDowngradingDate, d.c_str(), 8);
1707  }
1708 }
1709 
1711 {
1712  std::ostringstream out;
1713 
1714  out << std::setw(43)
1715  << std::setfill(' ')
1716  << std::setiosflags(ios::left)
1717  << classificationText.trim();
1718 
1719  memcpy(theClassificationText, out.str().c_str(), 43);
1720 }
1721 
1723 {
1724  std::ostringstream out;
1725 
1726  out << std::setw(1)
1727  << std::setfill(' ')
1728  << std::setiosflags(ios::left)
1729  << authorityType.trim();
1730 
1731  memcpy(theClassificationAuthorityType, out.str().c_str(), 1);
1732 }
1733 
1735 {
1736  std::ostringstream out;
1737 
1738  out << std::setw(40)
1739  << std::setfill(' ')
1740  << std::setiosflags(ios::left)
1741  << authority.trim();
1742 
1743  memcpy(theClassificationAuthority, out.str().c_str(), 40);
1744 }
1745 
1747 {
1748  std::ostringstream out;
1749 
1750  out << std::setw(1)
1751  << std::setfill(' ')
1752  << std::setiosflags(ios::left)
1753  << reason.trim();
1754 
1755  memcpy(theClassificationReason, out.str().c_str(), 1);
1756 }
1757 
1759 {
1760  memcpy(theSecuritySourceDate, formatDate(getVersion(), d).c_str(), 8);
1761 }
1762 
1764 {
1765  if(d.size() >=8)
1766  {
1767  memcpy(theSecuritySourceDate, d.c_str(), 8);
1768  }
1769 }
1770 
1772 {
1773  std::ostringstream out;
1774 
1775  out << std::setw(15)
1776  << std::setfill(' ')
1777  << std::setiosflags(ios::left)
1778  << number.trim();
1779 
1780  memcpy(theSecurityControlNumber, out.str().c_str(), 15);
1781 }
1782 
1784  ossim_uint8 g,
1785  ossim_uint8 b)
1786 {
1787  theFileBackgroundColor[0] = r;
1788  theFileBackgroundColor[1] = g;
1789  theFileBackgroundColor[2] = b;
1790 }
1791 
1793 {
1794  std::ostringstream out;
1795 
1796  out << std::setw(24)
1797  << std::setfill(' ')
1798  << std::setiosflags(ios::left)
1799  << name.trim();
1800 
1801  memcpy(theOriginatorsName, out.str().c_str(), 24);
1802 }
1803 
1805 {
1806  std::ostringstream out;
1807 
1808  out << std::setw(18)
1809  << std::setfill(' ')
1810  << std::setiosflags(ios::left)
1811  << phone.trim();
1812 
1813  memcpy(theOriginatorsPhone, out.str().c_str(), 18);
1814 }
1815 
1817  const char* prefix)
1818 {
1819  // Note: Currently not looking up all fieds only ones that make sense.
1820 
1821  const char* lookup;
1822 
1823  lookup = kwl.find( prefix, FSCLSY_KW);
1824  if ( lookup )
1825  {
1827  }
1828  lookup = kwl.find( prefix, FSDCTP_KW);
1829  if ( lookup )
1830  {
1832  }
1833  lookup = kwl.find( prefix, FSDCDT_KW);
1834  if ( lookup )
1835  {
1837  }
1838  lookup = kwl.find( prefix, FSDCXM_KW);
1839  if ( lookup )
1840  {
1842  }
1843  lookup = kwl.find( prefix, FSDG_KW);
1844  if ( lookup )
1845  {
1846  setDowngrade( ossimString(lookup) );
1847  }
1848  lookup = kwl.find( prefix, FSDGDT_KW);
1849  if ( lookup )
1850  {
1851  setDowngradingDate( ossimString(lookup) );
1852  }
1853  lookup = kwl.find( prefix, FSCLTX_KW );
1854  if ( lookup )
1855  {
1857  }
1858  lookup = kwl.find( prefix, FSCATP_KW );
1859  if ( lookup )
1860  {
1862  }
1863  lookup = kwl.find( prefix, FSCRSN_KW );
1864  if ( lookup )
1865  {
1867  }
1868  lookup = kwl.find( prefix, FSSRDT_KW);
1869  if ( lookup )
1870  {
1872  }
1873  lookup = kwl.find( prefix, FBKGC_KW );
1874  if ( lookup )
1875  {
1876  ossimString value = lookup;
1877  std::vector<ossimString> splitString;
1878  value = value.trim();
1879  value.split(splitString, " ");
1880  if(splitString.size() == 3)
1881  {
1882  setFileBackgroundColor((ossim_uint8)splitString[0].toUInt32(),
1883  (ossim_uint8)splitString[1].toUInt32(),
1884  (ossim_uint8)splitString[2].toUInt32());
1885  }
1886  }
1887 
1888  return ossimNitfFileHeaderV2_X::loadState(kwl, prefix);
1889 }
1890 
1892 {
1893  if(!property.valid()) return;
1894 
1895  ossimString name = property->getName();
1896 
1897  // Make case insensitive:
1898  name.upcase();
1899 
1900  if(name == FSCLSY_KW)
1901  {
1903  }
1904  else if(name == FSDCTP_KW)
1905  {
1907  }
1908  else if(name == FSDCDT_KW)
1909  {
1911  }
1912  else if(name == FSDCXM_KW)
1913  {
1915  }
1916  else if(name == FSDG_KW)
1917  {
1918  setDowngrade(property->valueToString());
1919  }
1920  else if(name == FSDGDT_KW)
1921  {
1922  setDowngradingDate(property->valueToString());
1923  }
1924  else if(name == FSCLTX_KW)
1925  {
1926  setClassificationText(property->valueToString());
1927  }
1928  else if(name == FSCATP_KW)
1929  {
1931  }
1932  else if(name == FSCRSN_KW)
1933  {
1935  }
1936  else if(name == FSSRDT_KW)
1937  {
1938  setSecuritySourceDate(property->valueToString());
1939  }
1940  else if(name == FBKGC_KW)
1941  {
1942  ossimColorProperty* colorProp = PTR_CAST(ossimColorProperty, property.get());
1943  if (colorProp)
1944  {
1945  ossim_uint8 r = colorProp->getRed();
1946  ossim_uint8 g = colorProp->getGreen();
1947  ossim_uint8 b = colorProp->getBlue();
1948 
1949  setFileBackgroundColor(r, g, b);
1950  }
1951  else
1952  {
1953  ossimString value = property->valueToString();
1954  std::vector<ossimString> splitString;
1955  value = value.trim();
1956  value.split(splitString, " ");
1957  if(splitString.size() == 3)
1958  {
1959  setFileBackgroundColor((ossim_uint8)splitString[0].toUInt32(),
1960  (ossim_uint8)splitString[1].toUInt32(),
1961  (ossim_uint8)splitString[2].toUInt32());
1962  }
1963  }
1964 
1965  }
1966  else
1967  {
1969  }
1970 }
1971 
1973 {
1974  ossimProperty* property = 0;
1975  ossimStringProperty* stringProperty = 0;
1976  ossimColorProperty* colorProperty = 0;
1977 
1978  if(name == CLEVEL_KW)
1979  {
1980  property = new ossimStringProperty(name, getComplexityLevel().trim());
1981  }
1982  else if(name == FSCLSY_KW)
1983  {
1984  property = new ossimStringProperty(name,
1985  getSecurityClassificationSys().trim());
1986  }
1987  else if(name == FSDCTP_KW)
1988  {
1989  property = new ossimStringProperty(name,
1990  getDeclassificationType().trim());
1991  }
1992  else if(name == FSDCDT_KW)
1993  {
1994  property = new ossimStringProperty(name,
1995  getDeclassificationDate().trim());
1996  }
1997  else if(name == FSDCXM_KW)
1998  {
1999  property = new ossimStringProperty(name,
2000  getDeclassificationExemption().trim());
2001  }
2002  else if(name == FSDG_KW)
2003  {
2004  stringProperty = new ossimStringProperty(name,
2005  getDowngrade().trim(),
2006  false);
2007 
2008  stringProperty->addConstraint("");
2009  stringProperty->addConstraint("S");
2010  stringProperty->addConstraint("C");
2011  stringProperty->addConstraint("R");
2012 
2013  property = stringProperty;
2014  }
2015  else if(name == FSDGDT_KW)
2016  {
2017  property = new ossimStringProperty(name,
2018  getDowngradingDate().trim());
2019  }
2020  else if(name == FSCLTX_KW)
2021  {
2022  property = new ossimStringProperty(name,
2023  getClassificationText().trim());
2024  }
2025  else if(name == FSCATP_KW)
2026  {
2027  stringProperty = new ossimStringProperty(name,
2029  false);
2030 
2031  stringProperty->addConstraint("");
2032  stringProperty->addConstraint("O");
2033  stringProperty->addConstraint("D");
2034  stringProperty->addConstraint("M");
2035 
2036  property = stringProperty;
2037  }
2038  else if(name == FSCRSN_KW)
2039  {
2040  stringProperty = new ossimStringProperty(name,
2041  getClassificationReason().trim(),
2042  false);
2043 
2044  stringProperty->addConstraint("");
2045  stringProperty->addConstraint("A");
2046  stringProperty->addConstraint("B");
2047  stringProperty->addConstraint("C");
2048  stringProperty->addConstraint("D");
2049  stringProperty->addConstraint("E");
2050  stringProperty->addConstraint("F");
2051  stringProperty->addConstraint("G");
2052 
2053  property = stringProperty;
2054  }
2055  else if(name == FSSRDT_KW)
2056  {
2057  property = new ossimStringProperty(name,
2058  getSecuritySourceDate().trim());
2059  }
2060  else if(name == FBKGC_KW)
2061  {
2062  ossim_uint8 r, g, b;
2063  getBackgroundColor(r, g, b);
2064 
2065  colorProperty = new ossimColorProperty(name,
2066  ossimRgbVector(r, g, b));
2067 
2068  property = colorProperty;
2069  }
2070  else if(name == ONAME_KW)
2071  {
2072  property = new ossimStringProperty(name, ossimString(theOriginatorsName).trim());
2073  }
2074  else if(name == OPHONE_KW)
2075  {
2076  property = new ossimStringProperty(name, ossimString(theOriginatorsPhone).trim());
2077  }
2078  else
2079  {
2081  }
2082  return property;
2083 }
2084 
2085 
2086 void ossimNitfFileHeaderV2_1::getPropertyNames(std::vector<ossimString>& propertyNames)const
2087 {
2089 
2090  propertyNames.push_back(FSCLSY_KW);
2091  propertyNames.push_back(FSDCTP_KW);
2092  propertyNames.push_back(FSDCDT_KW);
2093  propertyNames.push_back(FSDCXM_KW);
2094  propertyNames.push_back(FSDG_KW);
2095  propertyNames.push_back(FSDGDT_KW);
2096  propertyNames.push_back(FSCLTX_KW);
2097  propertyNames.push_back(FSCATP_KW);
2098  propertyNames.push_back(FSCRSN_KW);
2099  propertyNames.push_back(FSSRDT_KW);
2100  propertyNames.push_back(FBKGC_KW);
2101 }
2102 
2104 {
2105  if (unique)
2106  {
2107  removeTag(tag.getTagName());
2108  }
2109  theTagList.push_back(tag);
2110 }
2111 
2113 {
2114  ossim_uint32 idx = 0;
2115  for(idx = 0; idx < theTagList.size(); ++idx)
2116  {
2117  if(theTagList[idx].getTagName() == tagName)
2118  {
2119  theTagList.erase(theTagList.begin() + idx);
2120  return;
2121  }
2122  }
2123 }
2124 
2125 bool ossimNitfFileHeaderV2_1::takeOverflowTags(std::vector<ossimNitfTagInformation> &overflowTags,
2126  ossim_uint32 potentialDesIndex, bool userDefinedTags)
2127 {
2128  overflowTags.clear();
2129  std::vector<ossimNitfTagInformation>::iterator iter;
2130  std::vector<ossimNitfTagInformation> specifiedTags;
2131  const ossimString tagType(userDefinedTags ? "UDHD" : "XHD");
2132  for (iter = theTagList.begin(); iter != theTagList.end(); ++iter)
2133  {
2134  if (iter->getTagType() == tagType)
2135  {
2136  specifiedTags.push_back(*iter);
2137  }
2138  }
2139 
2140  std::sort(specifiedTags.begin(), specifiedTags.end());
2141 
2142  ossim_uint32 totalSize = 0;
2143  const ossim_uint32 maxSize = 9996;
2144  for (iter = specifiedTags.begin(); iter != specifiedTags.end() &&
2145  totalSize + iter->getTotalTagLength() <= maxSize; ++iter)
2146  {
2147  totalSize += iter->getTotalTagLength();
2148  }
2149 
2150  for (; iter != specifiedTags.end(); ++iter)
2151  {
2152  overflowTags.push_back(*iter);
2153  removeTag(iter->getTagName());
2154  }
2155 
2156  // If there are no overflow tags, then no DES is required
2157  if (overflowTags.empty() == true)
2158  {
2159  potentialDesIndex = 0;
2160  }
2161 
2162  std::ostringstream overflowDes;
2163  overflowDes << std::setw(3)
2164  << std::setfill('0')
2165  << std::setiosflags(ios::right)
2166  << potentialDesIndex;
2167 
2168  std::ostringstream tagLength;
2169  tagLength << std::setw(5)
2170  << std::setfill('0')
2171  << std::setiosflags(ios::right)
2172  << totalSize;
2173 
2174  // Even if no overflow tags exist, update the fields
2175  if (userDefinedTags)
2176  {
2177  strcpy(theUserDefinedHeaderOverflow, overflowDes.str().c_str());
2178  strcpy(theUserDefinedHeaderDataLength, tagLength.str().c_str());
2179  }
2180  else
2181  {
2182  strcpy(theExtendedHeaderDataOverflow, overflowDes.str().c_str());
2183  strcpy(theExtendedHeaderDataLength, tagLength.str().c_str());
2184  }
2185 
2186  return (overflowTags.empty() == false);
2187 }
2188 
ossimDrect theImageRect
This will be pre-computed when the header file is opened.
char theReleasingInstructions[21]
Field: FSREL.
void initializeAllOffsets()
If the header was parsed this method will initialize the offsets to whare all data resides within the...
virtual void valueToString(ossimString &valueResult) const =0
char theComplexityLevel[3]
Field: CLEVEL.
char theClassificationAuthorityType[2]
Field: FSCATP.
virtual ossim_int32 getNumberOfReservedExtSegments() const
virtual ossimNitfDataExtensionSegment * allocateDataExtSegment() const
virtual std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
Print method that outputs a key/value type format adding prefix to keys.
char theNumberOfGraphicInfoRecords[4]
Field: NUMS.
virtual bool saveState(ossimKeywordlist &kwl, const ossimString &prefix="") const
virtual void setDowngradingDate(const ossimLocalTm &date)
char theOriginatingStationId[11]
Field: OSTAID.
ossim_uint8 theFileBackgroundColor[3]
Field: FBKGC.
char theNumberOfResExtSegInfoRecords[4]
Field: NUMRES.
virtual void setFileLength(ossim_uint64 fileLength)
Sets file length (FL) field.
static ossimString upcase(const ossimString &aString)
Definition: ossimString.cpp:34
char theReservedForFutureUse1[4]
Field: NUMX.
void readDes(std::istream &in)
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
char theOriginatorsName[25]
Field: ONAME.
char theResExtSegSubheaderLength[5]
Is a 4 byte numeric 0-9999.
char theImageLength[11]
Is a 10 byte numeric 0000000001-9999999999.
void readOverflowTags(ossim::istream &in)
If the header was parsed and the offsets have been initialized, this method will parse all overflow t...
virtual ossimString getClassificationAuthority() const
char theFileTypeVersion[10]
Field: FHDR Required field for NITF and is a 9 byte value.
virtual ossimString getDowngrade() const
virtual ossimString getClassificationReason() const
void setNumberOfImageInfoRecords(ossim_uint64 num)
Sets the number of image records in the NITF 2.1 File Header.
virtual ossimNitfLabelHeader * allocateLabelHeader() const
virtual const char * getDateTime() const
static const ossimString FSREL_KW
static const ossimString FSDCDT_KW
char theDeclassificationExemption[5]
Field: FSDCXM.
Represents serializable keyword/value map.
virtual ossimNitfSymbolHeader * allocateSymbolHeader() const
void setNumberOfTextInfoRecords(ossim_uint64 num)
char theClassificationAuthority[41]
Field: FSCAUT.
std::vector< ossimNitfGraphicOffsetInformation > theGraphicOffsetList
char theHeaderLength[7]
Field: HL.
virtual void addDataExtSegInfoRecord(const ossimNitfDataExtSegInfoRecordV2_1 &recordInfo)
std::vector< ossimNitfDesInformation > theDesList
bool valid() const
Definition: ossimRefPtr.h:75
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to set fields from a keyword list.
const char * find(const char *key) const
virtual ossim_int64 getFileSize() const
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
static const ossimString FSCLTX_KW
virtual void parseStream(ossim::istream &in)
virtual void setSecurityControlNumber(const ossimString &number)
virtual ossim_int32 getHeaderSize() const
char theNumberOfImageInfoRecords[4]
Field: NUMI.
void setSubheaderLength(ossim_uint32 length)
char theFileLength[13]
Field: FL.
static const ossimString FBKGC_KW
virtual bool isValid() const
isValid will test if the fields are valid and will return true or false.
void addTag(ossimNitfTagInformation tag, bool unique=true)
char theDataExtSegLength[10]
Is a 9 byte numeric 0-999999999.
std::vector< ossimNitfTextOffsetInformation > theTextFileOffsetList
char theControlAndHandling[3]
Field: FSCTLH.
void setTagType(const ossimString &tagType) const
bool takeOverflowTags(std::vector< ossimNitfTagInformation > &overflowTags, ossim_uint32 potentialDesIndex, bool userDefinedTags=false)
virtual void setOriginatorsPhone(const ossimString &phone)
virtual void setHeaderLength(ossim_uint64 headerLength)
Sets header length (HL) field.
virtual void setDeclassificationExemption(const ossimString &exemption)
virtual const char * getVersion() const
virtual void replaceImageInfoRecord(int i, const ossimNitfImageInfoRecordV2_1 &recordInfo)
virtual ossimString getSecuritySourceDate() const
void split(std::vector< ossimString > &result, const ossimString &separatorList, bool skipBlankFields=false) const
Splits this string into a vector of strings (fields) using the delimiter list specified.
static const ossimString FSCATP_KW
char theDeclassificationType[3]
Field: FSDCTP.
char theOriginatorsPhone[19]
Field: OPHONE.
virtual ossimDrect getImageRect() const
char theSystemType[5]
Field: STYPE.
ossim_uint32 toUInt32() const
virtual ossimString getOriginatorsPhone() const
char theSecurityClassificationSys[3]
Field: FSCLSY.
void addConstraint(const ossimString &value)
char theDataExtSegSubheaderLength[5]
Is a 4 byte numeric 200-9999.
const ossimString HL_KW
virtual ossimString getClassificationAuthorityType() const
std::vector< ossimNitfGraphicInfoRecordV2_1 > theNitfGraphicInfoRecords
This is an optional field and will depend on theNumberOfGraphicInfoRecords.
virtual ossimString getCodeWords() const
char theTextFileLength[6]
Is a 5 byte numeric 0-99999.
char theClassificationReason[2]
Field: FSCRSN.
std::vector< ossimNitfTagInformation > theTagList
std::ostream & operator<<(std::ostream &out, const ossimNitfImageInfoRecordV2_1 &data)
void removeTag(const ossimString &tagName)
void setNumberOfGraphicInfoRecords(ossim_uint64 num)
virtual void setDowngrade(const ossimString &downgrade)
char theDowngradingDate[9]
Field: FSDGDT.
virtual bool isValid() const
isValid will test if the fields are valid and will return true or false.
ossim_int32 toInt32() const
void readTextFileInfoRecords(ossim::istream &in)
virtual ossimString getSecurityControlNumber() const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
char theCodewords[12]
Field: FSCODE.
virtual ossimNitfImageHeader * getNewImageHeader(ossim_uint32 imageNumber, ossim::istream &in) const
char theNumberOfDataExtSegInfoRecords[4]
Field: NUMDES.
char theClassificationText[44]
Field: FSCLTX.
virtual void setOriginatorsName(const ossimString &name)
static const ossimString FSSRDT_KW
virtual void setDeclassificationType(const ossimString &declassType)
virtual ossimString getDowngradingDate() const
virtual void setClassificationReason(const ossimString &reason)
static const ossimString ONAME_KW
static const ossimString FSCODE_KW
virtual void setClassificationAuthority(const ossimString &authorityType)
virtual void parseStream(ossim::istream &in)
static const ossimString FSCLSY_KW
Properties of a NITF 2.1 Header file.
virtual ossimString getClassificationText() const
std::string::size_type size() const
Definition: ossimString.h:405
char theEncryption[2]
Field: ENCRYP.
bool toBool() const
String to numeric methods.
ossim_uint8 getRed() const
virtual ossimString getSecurityClassificationSys() const
static const ossimString FSCAUT_KW
unsigned long long ossim_uint64
char theGraphicSubheaderLength[5]
Is a 4 byte numeric 0258-9999.
void setImageLength(ossim_uint64 length)
char theUserDefinedHeaderOverflow[4]
Field: UDHOFL.
unsigned int ossim_uint32
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
std::vector< ossimNitfDataExtSegInfoRecordV2_1 > theNitfDataExtSegInfoRecords
This information is conditional on the number of info records field.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual ossimString getControlAndHandling() const
virtual ossimString getDeclassificationDate() const
char theDateTime[15]
Field: FDT.
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
ossim_uint8 getGreen() const
virtual void parseStream(std::istream &in, ossim_uint64 dataLength)=0
char theExtendedHeaderDataLength[6]
Field: XHDL.
virtual void setCodeWords(const ossimString &codeWords)
virtual ossim_int32 getNumberOfImages() const
virtual void setClassificationText(const ossimString &classificationText)
static const ossimString FSDG_KW
ossim_uint32 theHeaderSize
This is not part of the NITF file header.
virtual ossimNitfTextHeader * getNewTextHeader(ossim_uint32 textNumber, ossim::istream &in) const
virtual ossimString getDeclassificationExemption() const
virtual ossim_int32 getNumberOfDataExtSegments() const
virtual void parseStream(std::istream &in, ossim_uint64 dataLength=0)
static ossimPreferences * instance()
static const ossimString FSCRSN_KW
char theSecurityControlNumber[16]
Field: FSCTLN.
virtual ossimString getDeclassificationType() const
virtual ossimNitfImageHeader * allocateImageHeader() const
void readImageInfoRecords(ossim::istream &in)
virtual void addImageInfoRecord(const ossimNitfImageInfoRecordV2_1 &recordInfo)
virtual ossimNitfSymbolHeader * getNewSymbolHeader(ossim_uint32 symbolNumber, ossim::istream &in) const
virtual void setProperty(ossimRefPtr< ossimProperty > property)
char theResExtSegLength[8]
Is a 7 byte numeric 0-9999999.
std::vector< ossimNitfResExtSegInfoRecordV2_1 > theNitfResExtSegInfoRecords
This information is conditional on the number of Res Ext Seg info records field.
void readDataExtSegInfoRecords(ossim::istream &in)
std::vector< ossimNitfImageOffsetInformation > theImageOffsetList
This will hold pre-computed offsets to the start of all image headers and start to their data...
std::vector< ossimNitfImageInfoRecordV2_1 > theNitfImageInfoRecords
This information is conditional on the number of image info records field.
void seekg64(off_type off, ios_base::seekdir way)
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
char theImageSubheaderLength[7]
Is a 6 byte numeric 000439-999999.
virtual ossimString getReleasingInstructions() const
virtual void setFileBackgroundColor(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
char theTextFileSubheaderLength[5]
Is a 4 byte numeric 0282-9999.
static const ossimString CLEVEL_KW
virtual ossimNitfTextHeader * allocateTextHeader() const
char theUserDefinedHeaderDataLength[6]
Field: UDHDL.
std::vector< ossimNitfDataExtSegOffsetInformation > theDataExtSegOffsetList
static const ossimString FSDGDT_KW
virtual ossimString getOriginatorsName() const
virtual ossim_int32 getNumberOfLabels() const
static const ossimString OPHONE_KW
std::vector< ossimNitfTextFileInfoRecordV2_1 > theNitfTextFileInfoRecords
This information is conditional on the number of text file info records field.
void readResExtSegInfoRecords(ossim::istream &in)
static const ossimString FSCTLH_KW
static const ossimString FSCTLN_KW
virtual ossim_int32 getNumberOfSymbols() const
virtual void setSecurityClassificationSys(const ossimString &value)
virtual std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
print method that outputs a key/value type format adding prefix to keys.
char theGraphicLength[7]
Is a 6 byte numeric 0000001-9999999.
ossim_uint64 toUInt64() const
virtual void setControlAndHandling(const ossimString &controlAndHandling)
char theCopyNumber[6]
Field: FSCOP.
virtual ossim_int32 getNumberOfTextSegments() const
virtual void writeStream(ossim::ostream &out)
const ossimString NUMI_KW
long long ossim_int64
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 theFileTitle[81]
Field: FTITLE.
virtual void setClassificationAuthorityType(const ossimString &authorityType)
char theNumberOfTextFileInfoRecords[4]
Field: NUMT.
ossim_int64 toInt64() const
static ossimString formatDate(const ossimString &version, const ossimLocalTm &d)
virtual void setReleasingInstructions(const ossimString &releasingInstructions)
char theSecuritySourceDate[9]
Field: FSSRDT.
virtual const std::vector< ossimNitfTagInformation > & getTagList() const =0
virtual void getBackgroundColor(ossim_uint8 &r, ossim_uint8 &g, ossim_uint8 &b) const
virtual ossimNitfLabelHeader * getNewLabelHeader(ossim_uint32 labelNumber, ossim::istream &in) const
virtual void setDeclassificationDate(const ossimLocalTm &declassDate)
char theSecurityClassification[2]
Field: FSCLAS.
#define RTTI_DEF1(cls, name, b1)
Definition: ossimRtti.h:485
static const ossimString FSDCXM_KW
char theNumberOfCopies[6]
Field: FSCOPYS.
char theExtendedHeaderDataOverflow[4]
Field: XHDLOFL.
static const ossimString FSDCTP_KW
char theDeclassificationDate[9]
Field: FSDCDT.
virtual ossimNitfDataExtensionSegment * getNewDataExtensionSegment(ossim_int32 dataExtNumber, ossim::istream &in) const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
virtual void addTextInfoRecord(const ossimNitfTextFileInfoRecordV2_1 &recordInfo)
char theDowngrade[2]
Field: FSDG.
bool saveState(ossimKeywordlist &kwl, const ossimString &prefix="") const
void setSubheaderLength(ossim_uint64 length)
virtual ossim_int32 getNumberOfGraphics() const
virtual void setSecuritySourceDate(const ossimLocalTm &date)
unsigned char ossim_uint8
const ossimString FL_KW
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual void setProperty(ossimRefPtr< ossimProperty > property)
ossim_uint8 getBlue() const
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
void setNumberOfDataExtSegInfoRecords(ossim_uint64 num)
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
int ossim_int32
void readGraphicInfoRecords(ossim::istream &in)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to set fields from a keyword list.
ossimString getComplexityLevel() const