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

#include <ossimRpfFrame.h>

Inheritance diagram for ossimRpfFrame:
ossimReferenced

Public Member Functions

 ossimRpfFrame ()
 
 ~ossimRpfFrame ()
 
std::ostream & print (std::ostream &out, const std::string &prefix=std::string()) const
 print method that outputs a key/value type format adding prefix to keys. More...
 
ossimErrorCode parseFile (const ossimFilename &filename, bool minimalParse=false)
 
const ossimRpfHeadergetRpfHeader () const
 
bool hasSubframeMaskTable () const
 
const vector< vector< ossim_uint32 > > & getSubFrameMask (ossim_uint32 spectralGroup)
 
bool fillSubFrameBuffer (ossim_uint8 *buffer, ossim_uint32 spectralGroup, ossim_uint32 row, ossim_uint32 col) const
 
const ossimRpfCompressionSectiongetCompressionSection () const
 
const vector< ossimRpfColorGrayscaleTable > & getColorGrayscaleTable () const
 
const ossimRpfColorConverterSubsectiongetColorConverterSubsection () const
 
const ossimRpfAttributesgetAttributes () const
 
const ossimNitfFilegetNitfFile () const
 
ossimRefPtr< ossimRpfReplaceUpdateTablegetRpfReplaceUpdateTable () const
 
- 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 ()
 
void deleteAll ()
 
ossimErrorCode populateCoverageSection (std::istream &in)
 
ossimErrorCode populateCompressionSection (std::istream &in)
 
ossimErrorCode populateImageSection (std::istream &in)
 
ossimErrorCode populateAttributeSection (std::istream &in)
 
ossimErrorCode populateColorGrayscaleSection (std::istream &in)
 
ossimErrorCode populateMasks (std::istream &in)
 
ossimErrorCode populateReplaceUpdateTable (std::istream &in)
 

Private Attributes

ossimRpfHeadertheHeader
 
ossimFilename theFilename
 
ossimRpfCoverageSectiontheCoverage
 
ossimRpfAttributestheAttributes
 
ossimRpfImageDescriptionSubheadertheImageDescriptionSubheader
 
ossimRpfMaskSubheadertheMaskSubheader
 
ossimRpfImageDisplayParameterSubheadertheImageDisplayParameterSubheader
 
ossimRpfCompressionSectiontheCompressionSection
 
ossimRpfColorGrayscaleSubheadertheColorGrayscaleSubheader
 
ossimRpfColorConverterSubsectiontheColorConverterSubsection
 
vector< ossimRpfColorGrayscaleTabletheColorGrayscaleTable
 
ossimRefPtr< ossimNitfFiletheNitfFile
 
vector< vector< vector< ossim_uint32 > > > theSubframeMaskTable
 
vector< vector< vector< ossim_uint32 > > > theSubframeTransparencyMaskTable
 
ossimRefPtr< ossimRpfReplaceUpdateTabletheReplaceUpdateTable
 Holds table of "replace / update" records if present. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const ossimRpfFrame &data)
 

Additional Inherited Members

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

Detailed Description

Definition at line 38 of file ossimRpfFrame.h.

Constructor & Destructor Documentation

◆ ossimRpfFrame()

ossimRpfFrame::ossimRpfFrame ( )

Definition at line 53 of file ossimRpfFrame.cpp.

54  :theHeader(0),
55  theFilename(""),
56  theCoverage(0),
57  theAttributes(0),
64  theNitfFile(0),
68 {
69 }
ossimRpfColorGrayscaleSubheader * theColorGrayscaleSubheader
ossimRefPtr< ossimRpfReplaceUpdateTable > theReplaceUpdateTable
Holds table of "replace / update" records if present.
ossimRpfColorConverterSubsection * theColorConverterSubsection
ossimRpfCoverageSection * theCoverage
ossimRefPtr< ossimNitfFile > theNitfFile
ossimRpfHeader * theHeader
vector< vector< vector< ossim_uint32 > > > theSubframeMaskTable
ossimRpfImageDisplayParameterSubheader * theImageDisplayParameterSubheader
vector< vector< vector< ossim_uint32 > > > theSubframeTransparencyMaskTable
ossimRpfCompressionSection * theCompressionSection
ossimFilename theFilename
ossimRpfAttributes * theAttributes
ossimRpfMaskSubheader * theMaskSubheader
ossimRpfImageDescriptionSubheader * theImageDescriptionSubheader

◆ ~ossimRpfFrame()

ossimRpfFrame::~ossimRpfFrame ( )

Definition at line 71 of file ossimRpfFrame.cpp.

References deleteAll().

72 {
73  deleteAll();
74 }

Member Function Documentation

◆ clearFields()

void ossimRpfFrame::clearFields ( )
private

Definition at line 419 of file ossimRpfFrame.cpp.

References theFilename.

420 {
421  theFilename = "";
422 }
ossimFilename theFilename

◆ deleteAll()

void ossimRpfFrame::deleteAll ( )
private

Definition at line 424 of file ossimRpfFrame.cpp.

References theAttributes, theColorConverterSubsection, theColorGrayscaleSubheader, theCompressionSection, theCoverage, theHeader, theImageDescriptionSubheader, theImageDisplayParameterSubheader, theMaskSubheader, theNitfFile, and ossimRefPtr< T >::valid().

Referenced by ~ossimRpfFrame().

425 {
426  if(theHeader)
427  {
428  delete theHeader;
429  theHeader = 0;
430  }
431  if(theAttributes)
432  {
433  delete theAttributes;
434  theAttributes = 0;
435  }
436  if(theCoverage)
437  {
438  delete theCoverage;
439  theCoverage = 0;
440  }
442  {
445  }
446  if(theMaskSubheader)
447  {
448  delete theMaskSubheader;
449  theMaskSubheader = 0;
450  }
452  {
455  }
457  {
458  delete theCompressionSection;
460  }
462  {
465  }
467  {
470  }
471  if (theNitfFile.valid())
472  {
473  theNitfFile = 0;
474  }
475 }
ossimRpfColorGrayscaleSubheader * theColorGrayscaleSubheader
bool valid() const
Definition: ossimRefPtr.h:75
ossimRpfColorConverterSubsection * theColorConverterSubsection
ossimRpfCoverageSection * theCoverage
ossimRefPtr< ossimNitfFile > theNitfFile
ossimRpfHeader * theHeader
ossimRpfImageDisplayParameterSubheader * theImageDisplayParameterSubheader
ossimRpfCompressionSection * theCompressionSection
ossimRpfAttributes * theAttributes
ossimRpfMaskSubheader * theMaskSubheader
ossimRpfImageDescriptionSubheader * theImageDescriptionSubheader

◆ fillSubFrameBuffer()

bool ossimRpfFrame::fillSubFrameBuffer ( ossim_uint8 buffer,
ossim_uint32  spectralGroup,
ossim_uint32  row,
ossim_uint32  col 
) const

Definition at line 341 of file ossimRpfFrame.cpp.

References ossimString::c_str(), ossimRpfLocationSection::getComponent(), ossimRpfImageDisplayParameterSubheader::getImageCodeLength(), ossimRpfHeader::getLocationSection(), ossimRpfImageDisplayParameterSubheader::getNumberOfImageCodesPerRow(), ossimRpfImageDisplayParameterSubheader::getNumberOfImageRows(), ossimRpfImageDescriptionSubheader::getNumberOfSubframesHorizontal(), hasSubframeMaskTable(), ossimRpfComponentLocationRecord::m_componentLocation, OSSIM_RPF_SPATIAL_DATA_SUBSECTION, OSSIM_RPF_ULONG_NULL, theFilename, theHeader, theImageDescriptionSubheader, theImageDisplayParameterSubheader, and theSubframeMaskTable.

Referenced by ossimRpfCacheTileSource::fillSubTileCadrg(), ossimCibCadrgTileSource::fillSubTileCadrg(), ossimRpfCacheTileSource::fillSubTileCib(), and ossimCibCadrgTileSource::fillSubTileCib().

345 {
348  theHeader&&
349  (col < theImageDescriptionSubheader->getNumberOfSubframesHorizontal()) &&
350  (row < theImageDescriptionSubheader->getNumberOfSubframesVertical()))
351  {
353 
355  {
356  return false;
357  }
358 
359  ossim_uint32 offset = info.m_componentLocation;
360  ossim_uint32 bytesPerSubframe = 0;
361 
362  // note that the code length is bit encoded so we must devide by 8
363  // in order to get the byte offset instead of the bit offset. We
364  // then add that to the start of the spatial data section which is
365  // the current value of offset.
369 
370 
372  {
373  // check to see if the offset is NULL. If it is
374  // then just return false to let the caller know that the
375  // buffer did not exist.
376  if(theSubframeMaskTable[0][row][col] != OSSIM_RPF_ULONG_NULL)
377  {
378  offset += theSubframeMaskTable[0][row][col];
379  }
380  else
381  {
382  return false;
383  }
384  }
385  else
386  {
388  col);
389  offset += bytes;
390  }
391 
392  // now since we have the adjustment and we got to this point then
393  // we can read in the data into the destination buffer.
394  ifstream in(theFilename.c_str(), ios::in|ios::binary);
395  if(!in.fail())
396  {
397  in.seekg(offset, ios::beg);
398  in.read((char*)buffer, bytesPerSubframe);
399  if(in.fail())
400  {
401  return false;
402  }
403  }
404  else
405  {
406  return false;
407  }
408  }
409  else
410  {
411  // this is if it was not within the rows and cols of
412  // the subframe or if the image description header didn't exist
413  return false;
414  }
415 
416  return true;
417 }
bool hasSubframeMaskTable() const
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
bool getComponent(ossimRpfComponentId componentId, ossimRpfComponentLocationRecord &result) const
const ossimRpfLocationSection * getLocationSection() const
ossimRpfHeader * theHeader
vector< vector< vector< ossim_uint32 > > > theSubframeMaskTable
unsigned int ossim_uint32
ossimRpfImageDisplayParameterSubheader * theImageDisplayParameterSubheader
ossimFilename theFilename
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
const unsigned long OSSIM_RPF_ULONG_NULL
ossimRpfImageDescriptionSubheader * theImageDescriptionSubheader

◆ getAttributes()

const ossimRpfAttributes* ossimRpfFrame::getAttributes ( ) const
inline

Definition at line 88 of file ossimRpfFrame.h.

89  {
90  return theAttributes;
91  }
ossimRpfAttributes * theAttributes

◆ getColorConverterSubsection()

const ossimRpfColorConverterSubsection* ossimRpfFrame::getColorConverterSubsection ( ) const
inline

Definition at line 84 of file ossimRpfFrame.h.

85  {
87  }
ossimRpfColorConverterSubsection * theColorConverterSubsection

◆ getColorGrayscaleTable()

const vector<ossimRpfColorGrayscaleTable>& ossimRpfFrame::getColorGrayscaleTable ( ) const
inline

◆ getCompressionSection()

const ossimRpfCompressionSection* ossimRpfFrame::getCompressionSection ( ) const
inline

◆ getNitfFile()

const ossimNitfFile* ossimRpfFrame::getNitfFile ( ) const
inline

Definition at line 92 of file ossimRpfFrame.h.

93  {
94  return theNitfFile.get();
95  }
ossimRefPtr< ossimNitfFile > theNitfFile

◆ getRpfHeader()

const ossimRpfHeader* ossimRpfFrame::getRpfHeader ( ) const
inline

Definition at line 61 of file ossimRpfFrame.h.

61 {return theHeader;}
ossimRpfHeader * theHeader

◆ getRpfReplaceUpdateTable()

ossimRefPtr< ossimRpfReplaceUpdateTable > ossimRpfFrame::getRpfReplaceUpdateTable ( ) const
Returns
The RPF replace / update table. The ossimRefPtr can have a null internal pointer if record was not found. Callers should check ossimRefPtr<ossimRpfReplaceUpdateTable>::valid() before using pointer.

Definition at line 1141 of file ossimRpfFrame.cpp.

References theReplaceUpdateTable.

1142 {
1143  return theReplaceUpdateTable;
1144 }
ossimRefPtr< ossimRpfReplaceUpdateTable > theReplaceUpdateTable
Holds table of "replace / update" records if present.

◆ getSubFrameMask()

const vector< vector<ossim_uint32> >& ossimRpfFrame::getSubFrameMask ( ossim_uint32  spectralGroup)
inline

Definition at line 65 of file ossimRpfFrame.h.

67  {
68  return theSubframeMaskTable[spectralGroup];
69  }
vector< vector< vector< ossim_uint32 > > > theSubframeMaskTable

◆ hasSubframeMaskTable()

bool ossimRpfFrame::hasSubframeMaskTable ( ) const

Definition at line 330 of file ossimRpfFrame.cpp.

References ossimRpfImageDescriptionSubheader::isSubframeMaskTableOffsetNull(), and theImageDescriptionSubheader.

Referenced by fillSubFrameBuffer().

331 {
333  {
335  }
336 
337  return false;
338 
339 }
ossimRpfImageDescriptionSubheader * theImageDescriptionSubheader

◆ parseFile()

ossimErrorCode ossimRpfFrame::parseFile ( const ossimFilename filename,
bool  minimalParse = false 
)

Definition at line 234 of file ossimRpfFrame.cpp.

Referenced by ossimRpfCacheTileSource::fillTile(), ossimCibCadrgTileSource::fillTile(), ossimRpfCacheTileSource::populateLut(), ossimCibCadrgTileSource::populateLut(), and ossimCibCadrgTileSource::updatePropertiesToFirstValidFrame().

236 {
237  if(traceDebug())
238  {
239  ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfFrame::parseFile: entered......" << std::endl;
240  }
242 
243  //Make sure any fileds have beend cleared
244  clearFields();
245 
246  // Make sure all data is deleted. The initialize call the
247  // populate methods. These methods will re-allocate the information
248  deleteAll();
249 
250 
252  theNitfFile->parseFile(filename);
253 
254  const ossimRefPtr<ossimNitfFileHeader> nitfFileHeader =
256 
257  if(!nitfFileHeader)
258  {
259  theNitfFile = 0;
260 
262  }
264  nitfFileHeader->getTag(info, "RPFHDR");
265 
266  theFilename = filename;
267  if(info.getTagName() == "RPFHDR")
268  {
269  ifstream in(filename.c_str(), ios::in|ios::binary);
270  // set the get pointer for the stream to the start
271  // of the Rpf header data
272  in.seekg(info.getTagDataOffset(), ios::beg);
273 
274  if(theHeader) delete theHeader;
276 
277  // if(theHeader->parseStream(in) != ossimErrorCodes::OSSIM_OK)
278  theHeader->parseStream(in);
279 
280  if ( in.fail() )
281  {
282  deleteAll();
283 
285  }
286  else
287  // if(!in.fail()&&theHeader)
288  {
289  result = populateAttributeSection(in);
290 
291  // This is needed for ossim-rpf --list-frames so NOT put in full parse section.
292  if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
293  {
294  result = populateReplaceUpdateTable(in);
295  }
296 
297  if ( minimalParse == false )
298  {
299  if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
300  {
302  }
303  if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
304  {
305  result = populateCoverageSection(in);
306  }
307  if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
308  {
309  result = populateImageSection(in);
310  }
311  if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
312  {
313  result = populateColorGrayscaleSection(in);
314  }
315  if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
316  {
317  result = populateMasks(in);
318  }
319  }
320  }
321  }
322  else
323  {
325  }
326 
328 }
ossim_int32 ossimErrorCode
ossimErrorCode populateColorGrayscaleSection(std::istream &in)
ossimErrorCode populateReplaceUpdateTable(std::istream &in)
static const ossimErrorCode OSSIM_OK
ossimErrorCode populateAttributeSection(std::istream &in)
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
bool valid() const
Definition: ossimRefPtr.h:75
ossim_uint64 getTagDataOffset() const
ossimErrorCode populateCompressionSection(std::istream &in)
static const ossimErrorCode OSSIM_ERROR
ossimRpfHeader * theHeader
ossimRefPtr< ossimNitfFile > theNitfFile
virtual bool getTag(ossimNitfTagInformation &tagInfo, const ossimString &tagName) const
const ossimNitfFileHeader * getHeader() const
ossimErrorCode populateImageSection(std::istream &in)
ossimErrorCode populateMasks(std::istream &in)
virtual void parseStream(std::istream &in)
Parse method.
ossimFilename theFilename
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
ossimErrorCode populateCoverageSection(std::istream &in)
bool parseFile(const ossimFilename &file)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ populateAttributeSection()

ossimErrorCode ossimRpfFrame::populateAttributeSection ( std::istream &  in)
private

Definition at line 601 of file ossimRpfFrame.cpp.

602 {
603  if(traceDebug())
604  {
606  << "ossimRpfFrame::populateAttributeSection: entered ..." << std::endl;
607  }
609 
611  if(location)
612  {
614 
616  component))
617  {
619  in.seekg(component.m_componentLocation, std::ios::beg);
621  {
622  delete temp;
623  temp =0;
624  if(traceDebug())
625  {
627  << "ossimRpfFrame::populateAttributeSection: leaving 1 ..." << std::endl;
628  }
630  }
631  }
632  }
633  if(!in.fail()&&temp)
634  {
635  if(traceDebug())
636  {
637  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: Has attribute section" << std::endl;
638  }
639  if(theAttributes) delete theAttributes;
642  ossim_uint64 locationAttributeSubsection = in.tellg();
643  ossim_uint64 absoluteAddresToTable = locationAttributeSubsection + temp->getAttributeOffsetTableOffset();
644  ossimEndian anEndian;
645 
646 
647  if(traceDebug())
648  {
650  << "DEBUG: Number of attributes = "
652  << std::endl;
653  }
654  in.seekg(absoluteAddresToTable, ios::beg);
655  for(ossim_uint32 index = 0;
656  index < temp->getNumberOfAttributeOffsetRecords();
657  index++)
658  {
659  if((!in.fail())&&
660  record.parseStream(in, theHeader->getByteOrder()) ==
662  {
663  // make sure we save the current position. The attribute
664  // parser in the switch/case will change the location and
665  // we must come back to the start of the next record.
666  ossim_uint64 currentLocation = in.tellg();
667 
668  // go to the location of the start of the attribute.
669  in.seekg(locationAttributeSubsection + record.getAttributeRecordOffset(), ios::beg);
670 
671  if(traceDebug())
672  {
674  << "DEBUG: Parsing attribute number " << index
675  << " with id = " << record.getAttributeId()
676  << std::endl;
677  }
678  // allocate some temporary space for the string type
679  // attributes.
680  char tempString[50];
682  {
684  switch(record.getAttributeId())
685  {
686  case 1:
687  {
688  in.read((char*)tempString, 8);
689  tempString[8] = '\0';
690  theAttributes->theCurrencyDate = tempString;
691  break;
692  }
693  case 2:
694  {
695  in.read((char*)tempString, 8);
696  tempString[8] = '\0';
697  theAttributes->theProductionDate = tempString;
698  break;
699  }
700  case 3:
701  {
702  in.read((char*)tempString, 8);
703  tempString[8] = '\0';
704  theAttributes->theSignificantDate = tempString;
705  break;
706  }
707  case 4:
708  {
709  in.read((char*)tempString, 10);
711  &tempString[10]);
712  in.read((char*)tempString, 8);
714  &tempString[8]);
715  in.read((char*)tempString, 4);
717  &tempString[4]);
718  in.read((char*)tempString, 7);
719  theAttributes->theEdition = ossimString(tempString,
720  &tempString[7]);
721  break;
722  }
723  case 5:
724  {
725  in.read((char*)tempString, 2);
727  &tempString[2]);
729  if((theAttributes->theProjectionCode == "AC") ||
730  (theAttributes->theProjectionCode == "LE") ||
731  (theAttributes->theProjectionCode == "PG"))
732  {
733  in.read((char*)&(theAttributes->theProjectionA), 4);
734  in.read((char*)&(theAttributes->theProjectionB), 4);
735  in.read((char*)&(theAttributes->theProjectionC), 4);
736  in.read((char*)&(theAttributes->theProjectionD), 4);
737  }
738  else if((theAttributes->theProjectionCode == "RB") ||
739  (theAttributes->theProjectionCode == "OC") ||
740  (theAttributes->theProjectionCode == "TC"))
741  {
742  in.read((char*)&(theAttributes->theProjectionA), 4);
743  in.read((char*)&(theAttributes->theProjectionB), 4);
744  in.read((char*)&(theAttributes->theProjectionC), 4);
745  }
746  else if((theAttributes->theProjectionCode == "AL") ||
747  (theAttributes->theProjectionCode == "MC") ||
748  (theAttributes->theProjectionCode == "OD") ||
749  (theAttributes->theProjectionCode == "PH"))
750  {
751  in.read((char*)&(theAttributes->theProjectionA), 4);
752  in.read((char*)&(theAttributes->theProjectionB), 4);
753  }
754  else if((theAttributes->theProjectionCode == "UT"))
755  {
756  in.read((char*)&(theAttributes->theProjectionA), 4);
757  }
758  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
759  {
760  anEndian.swap(theAttributes->theProjectionA);
761  anEndian.swap(theAttributes->theProjectionB);
762  anEndian.swap(theAttributes->theProjectionC);
763  anEndian.swap(theAttributes->theProjectionD);
764  }
765  break;
766  }
767  case 6:
768  {
769  in.read((char*)tempString, 4);
771  &tempString[4]);
772  break;
773  }
774  case 7:
775  {
776  in.read((char*)tempString, 4);
778  &tempString[4]);
779  break;
780  }
781  case 8:
782  {
783  in.read((char*)&(theAttributes->theVertAbsAccuracy), 4);
784  in.read((char*)&(theAttributes->theVertAbsUnits), 2);
785  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
786  {
789  }
790  break;
791  }
792  case 9:
793  {
794  in.read((char*)&(theAttributes->theHorAbsAccuracy), 4);
795  in.read((char*)&(theAttributes->theHorAbsUnits), 2);
796  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
797  {
799  anEndian.swap(theAttributes->theHorAbsUnits);
800  }
801  break;
802  }
803  case 10:
804  {
805  in.read((char*)&(theAttributes->theVertRelAccuracy), 4);
806  in.read((char*)&(theAttributes->theVertRelUnits), 2);
807  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
808  {
811  }
812  break;
813  }
814  case 11:
815  {
816  in.read((char*)&(theAttributes->theHorRelAccuracy), 4);
817  in.read((char*)&(theAttributes->theHorRelUnits), 2);
818  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
819  {
821  anEndian.swap(theAttributes->theHorRelUnits);
822  }
823  break;
824  }
825  case 12:
826  {
827  in.read((char*)tempString, 3);
829  &tempString[3]);
830  break;
831  }
832  case 13:
833  {
834  in.read((char*)tempString, 4);
836  &tempString[4]);
837  break;
838  }
839  case 14:
840  {
841  in.read((char*)&(theAttributes->theNavSystemCode), 2);
842 
843  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
844  {
846  }
847  break;
848  }
849  case 15:
850  {
851  in.read((char*)tempString, 2);
852  theAttributes->theGridCode = ossimString(tempString,
853  &tempString[2]);
854  break;
855  }
856  case 16:
857  {
858  in.read((char*)&(theAttributes->theEeasterlyMagChange), 4);
859  in.read((char*)&(theAttributes->theEasterlyMagChangeUnits), 2);
860  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
861  {
864  }
865  break;
866  }
867  case 17:
868  {
869  in.read((char*)&(theAttributes->theWesterlyMagChange), 4);
870  in.read((char*)&(theAttributes->theWesterlyMagChangeUnits), 2);
871  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
872  {
875  }
876  break;
877  }
878  case 18:
879  {
880  in.read((char*)&(theAttributes->theMagAngle), 4);
881  in.read((char*)&(theAttributes->theMagAngleUnits), 2);
882  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
883  {
884  anEndian.swap(theAttributes->theMagAngle);
886  }
887  break;
888  }
889  case 19:
890  {
891  in.read((char*)&(theAttributes->theGridConver), 4);
892  in.read((char*)&(theAttributes->theGridConverUnits), 2);
893  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
894  {
895  anEndian.swap(theAttributes->theGridConver);
897  }
898  break;
899  }
900  case 20:
901  {
902  in.read((char*)&(theAttributes->theHighElevation), 8);
903  in.read((char*)&(theAttributes->theHighElevationUnits), 2);
904  in.read((char*)&(theAttributes->theHighLat), 8);
905  in.read((char*)&(theAttributes->theHighLon), 8);
906  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
907  {
910  anEndian.swap(theAttributes->theHighLat);
911  anEndian.swap(theAttributes->theHighLon);
912  }
913  break;
914  }
915  case 21:
916  {
917  in.read((char*)tempString, 12);
919  &tempString[12]);
920  break;
921  }
922  case 22:
923  {
924  in.read((char*)tempString, 12);
925  tempString[12] = '\0';
926  theAttributes->theDataSource = tempString;
927  in.read((char*)&(theAttributes->theGsd), 4);
928  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
929  {
930  anEndian.swap(theAttributes->theGsd);
931  }
932  break;
933  }
934  case 23:
935  {
936  in.read((char*)&(theAttributes->theDataLevel), 2);
937  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
938  {
939  anEndian.swap(theAttributes->theDataLevel);
940  }
941  break;
942  }
943  }
944  }
945  in.seekg(currentLocation, ios::beg);
946  }
947  else
948  {
949  delete temp;
950  temp = 0;
951  if(traceDebug())
952  {
954  << "ossimRpfFrame::populateAttributeSection: leaving 2 ..." << std::endl;
955  }
957  }
958  }
959  }
960  if(temp) delete temp;
961  temp = 0;
962 
963  if(traceDebug())
964  {
966  << "ossimRpfFrame::populateAttributeSection: leaving OK ..." << std::endl;
967  }
969 }
ossim_uint16 theHorRelUnits
ossimString theSignificantDate
ossim_uint16 theVertAbsUnits
ossimErrorCode parseStream(ossim::istream &in, ossimByteOrder byteOrder)
static ossimString upcase(const ossimString &aString)
Definition: ossimString.cpp:34
ossimString theCurrencyDate
static const ossimErrorCode OSSIM_OK
ossimString theVertDatumCode
ossim_uint32 theVertAbsAccuracy
static const ossimErrorCode OSSIM_ERROR
ossimString theMapDesignationCode
bool getComponent(ossimRpfComponentId componentId, ossimRpfComponentLocationRecord &result) const
const ossimRpfLocationSection * getLocationSection() const
ossimRpfHeader * theHeader
ossimString theChartSeriesCode
ossimString theSoundingDatumCode
ossim_uint32 theHorRelAccuracy
unsigned long long ossim_uint64
unsigned int ossim_uint32
bool getAttributeFlag(ossim_uint32 id) const
ossim_uint32 theHorAbsAccuracy
ossim_uint16 theHorAbsUnits
ossim_uint16 theGridConverUnits
ossim_uint32 theVertRelAccuracy
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
ossim_uint16 theMagAngleUnits
void setAttributeFlag(ossim_uint32 id, bool flag)
ossim_uint16 theHighElevationUnits
ossimString theProjectionCode
ossim_uint16 theEasterlyMagChangeUnits
ossimString theLegendFileName
virtual ossimByteOrder getByteOrder() const
ossimString theOldHorDatum
ossimString theProductionDate
ossim_uint16 theNavSystemCode
ossimErrorCode parseStream(ossim::istream &in, ossimByteOrder byteOrder)
ossimRpfAttributes * theAttributes
ossim_uint16 theWesterlyMagChangeUnits
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
ossim_uint16 theVertRelUnits

◆ populateColorGrayscaleSection()

ossimErrorCode ossimRpfFrame::populateColorGrayscaleSection ( std::istream &  in)
private

Definition at line 499 of file ossimRpfFrame.cpp.

References ossimRpfHeader::getByteOrder(), ossimRpfColorGrayscaleOffsetRecord::getColorGrayscaleTableId(), ossimRpfColorGrayscaleOffsetRecord::getColorGrayscaleTableOffset(), ossimRpfLocationSection::getComponent(), ossimRpfHeader::getLocationSection(), ossimRpfHeader::getNewColorGrayscaleSubheader(), ossimRpfColorGrayscaleSubheader::getNumberOfColorConverterOffsetRecords(), ossimRpfColorGrayscaleOffsetRecord::getNumberOfColorGrayscaleRecords(), ossimRpfColorGrayscaleSubheader::getNumberOfColorGreyscaleOffsetRecords(), ossimRpfComponentLocationRecord::m_componentLocation, ossimErrorCodes::OSSIM_ERROR, ossimErrorCodes::OSSIM_OK, OSSIM_RPF_COLOR_CONVERTER_SUBSECTION, OSSIM_RPF_COLORMAP_SUBSECTION, ossimRpfColorGrayscaleOffsetRecord::parseStream(), ossimRpfColorConverterSubsection::parseStream(), ossimRpfColorConverterSubsection::setNumberOfColorConverterOffsetRecords(), theColorConverterSubsection, theColorGrayscaleSubheader, theColorGrayscaleTable, and theHeader.

500 {
504  if(theHeader)
505  {
507 
509  {
511  if(location)
512  {
514 
516  component))
517  {
518  in.seekg(component.m_componentLocation,ios::beg);
524  }
525  if(location->getComponent(OSSIM_RPF_COLORMAP_SUBSECTION, component))
526  {
527  in.seekg(component.m_componentLocation, ios::beg);
528 
529  theColorGrayscaleTable.clear();
531 
532  // we will ignore the offset table offset which is a 4 byte value
533  // and ignore the offset record length which is a 2 byte value.
534  // This is suppose to put us at the beginning of the
535  // [color/grayscale offset record]. The total number of
536  // these offset records is found in the [color/grayscale section
537  // subheader.
538  in.ignore(6);
539  for(ossim_uint32 index = 0;
541  ++index)
542  {
543 
544  ossimRpfColorGrayscaleOffsetRecord grayscaleOffsetRecord;
545 
546  if(grayscaleOffsetRecord.parseStream(in, theHeader->getByteOrder()) == ossimErrorCodes::OSSIM_OK)
547  {
548  ossim_uint32 rememberLocation = in.tellg();
549  in.seekg(grayscaleOffsetRecord.getColorGrayscaleTableOffset()+component.m_componentLocation, ios::beg);
550  theColorGrayscaleTable[index].setTableData(grayscaleOffsetRecord.getColorGrayscaleTableId(),
551  grayscaleOffsetRecord.getNumberOfColorGrayscaleRecords());
552  theColorGrayscaleTable[index].parseStream(in, theHeader->getByteOrder());
553  in.seekg(rememberLocation, ios::beg);
554  }
555  else
556  {
558  }
559  }
560  }
561  }
562  }
563  }
564 
565  return resultError;
566 }
ossimRpfColorGrayscaleSubheader * theColorGrayscaleSubheader
ossimErrorCode parseStream(ossim::istream &in, ossimByteOrder byteOrder)
ossim_int32 ossimErrorCode
ossimErrorCode parseStream(ossim::istream &in, ossimByteOrder byteOrder)
unsigned long getNumberOfColorGreyscaleOffsetRecords() const
vector< ossimRpfColorGrayscaleTable > theColorGrayscaleTable
static const ossimErrorCode OSSIM_OK
ossimRpfColorConverterSubsection * theColorConverterSubsection
static const ossimErrorCode OSSIM_ERROR
bool getComponent(ossimRpfComponentId componentId, ossimRpfComponentLocationRecord &result) const
const ossimRpfLocationSection * getLocationSection() const
ossimRpfHeader * theHeader
unsigned int ossim_uint32
unsigned long getNumberOfColorConverterOffsetRecords() const
virtual ossimByteOrder getByteOrder() const
ossimRpfColorGrayscaleSubheader * getNewColorGrayscaleSubheader(std::istream &in) const
void setNumberOfColorConverterOffsetRecords(ossim_uint16 numberOfRecords)

◆ populateCompressionSection()

ossimErrorCode ossimRpfFrame::populateCompressionSection ( std::istream &  in)
private

Definition at line 488 of file ossimRpfFrame.cpp.

References ossimRpfHeader::getNewCompressionSection(), ossimErrorCodes::OSSIM_OK, theCompressionSection, and theHeader.

489 {
492  if(theHeader)
493  {
495  }
497 }
static const ossimErrorCode OSSIM_OK
ossimRpfHeader * theHeader
ossimRpfCompressionSection * theCompressionSection
ossimRpfCompressionSection * getNewCompressionSection(std::istream &in) const

◆ populateCoverageSection()

ossimErrorCode ossimRpfFrame::populateCoverageSection ( std::istream &  in)
private

Definition at line 477 of file ossimRpfFrame.cpp.

References ossimRpfHeader::getNewCoverageSection(), ossimErrorCodes::OSSIM_OK, theCoverage, and theHeader.

478 {
479  if(theCoverage) delete theCoverage;
480  theCoverage = 0;
481  if(theHeader)
482  {
484  }
486 }
static const ossimErrorCode OSSIM_OK
ossimRpfCoverageSection * theCoverage
ossimRpfHeader * theHeader
ossimRpfCoverageSection * getNewCoverageSection(const ossimFilename &file) const

◆ populateImageSection()

ossimErrorCode ossimRpfFrame::populateImageSection ( std::istream &  in)
private

Definition at line 568 of file ossimRpfFrame.cpp.

References ossimRpfHeader::getByteOrder(), ossimRpfImageDescriptionSubheader::getEndOffset(), ossimRpfHeader::getNewImageDescriptionSubheader(), ossimRpfHeader::getNewImageDisplayParameterSubheader(), ossimRpfImageDescriptionSubheader::getSubframeMaskTableOffset(), ossimRpfImageDescriptionSubheader::isSubframeMaskTableOffsetNull(), ossimErrorCodes::OSSIM_OK, ossimRpfMaskSubheader::parseStream(), theHeader, theImageDescriptionSubheader, theImageDisplayParameterSubheader, and theMaskSubheader.

569 {
573  if(theHeader&&in)
574  {
575  // get the subheader information.
577 
578 
579  // need to do something with the table before going to the display.
581  {
583  // need to get the mask subheader
585 
586  // seek to the start of the subheader
589 
590  // get the information
592  }
593 
595  // Get the display parameter header
597  }
598  return result;
599 }
ossim_int32 ossimErrorCode
static const ossimErrorCode OSSIM_OK
ossimRpfImageDescriptionSubheader * getNewImageDescriptionSubheader(std::istream &in) const
ossimRpfImageDisplayParameterSubheader * getNewImageDisplayParameterSubheader(std::istream &in) const
ossimErrorCode parseStream(std::istream &in, ossimByteOrder byteOrder)
ossimRpfHeader * theHeader
ossimRpfImageDisplayParameterSubheader * theImageDisplayParameterSubheader
virtual ossimByteOrder getByteOrder() const
ossimRpfMaskSubheader * theMaskSubheader
ossimRpfImageDescriptionSubheader * theImageDescriptionSubheader

◆ populateMasks()

ossimErrorCode ossimRpfFrame::populateMasks ( std::istream &  in)
private

Definition at line 971 of file ossimRpfFrame.cpp.

References ossimRpfHeader::getByteOrder(), ossimRpfLocationSection::getComponent(), ossimRpfHeader::getLocationSection(), ossimRpfImageDescriptionSubheader::getNumberOfSpectralGroups(), ossimRpfImageDescriptionSubheader::getNumberOfSubframesHorizontal(), ossimRpfImageDescriptionSubheader::getNumberOfSubframesVertical(), ossimRpfImageDescriptionSubheader::getSubframeMaskTableOffset(), ossimEndian::getSystemEndianType(), ossimRpfImageDescriptionSubheader::getTransparencyMaskTableOffset(), ossimRpfImageDescriptionSubheader::isSubframeMaskTableOffsetNull(), ossimRpfImageDescriptionSubheader::isTransparencyMaskTableOffsetNull(), ossimRpfComponentLocationRecord::m_componentLocation, ossimErrorCodes::OSSIM_ERROR, ossimErrorCodes::OSSIM_OK, OSSIM_RPF_MASK_SUBSECTION, ossimEndian::swap(), theHeader, theImageDescriptionSubheader, theSubframeMaskTable, and theSubframeTransparencyMaskTable.

972 {
973  theSubframeMaskTable.clear();
975 
976  if(!in)
977  {
979  }
980 
982  {
984  if(location)
985  {
987 
989  component))
990  {
991 
992  // now allocate the space we need and then reader the table in
993 
996 
997  ossim_uint32 spectralIndex;
998  ossim_uint32 rowIndex;
999  ossim_uint32 colIndex;
1000 
1002  {
1003  // move get to the first byte of the Mask table. This is the offset from the
1004  // start of the maskSubsection.
1005  in.seekg(component.m_componentLocation +
1007  // first loop through the Mask table and allocate while we do it
1008  for(spectralIndex = 0;
1010  ++spectralIndex)
1011  {
1012  // reserve space for the number of rows
1014  for(rowIndex = 0;
1016  ++rowIndex)
1017  {
1018  // allocate the columns
1020  for(colIndex = 0;
1022  ++colIndex)
1023  {
1024  ossim_uint32 value;
1025 
1026  in.read((char*)&value, 4);
1027  ossimEndian anEndian;
1028 
1029  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
1030  {
1031  anEndian.swap(value);
1032  }
1033  theSubframeMaskTable[spectralIndex][rowIndex][colIndex] = value;
1034  }
1035  }
1036  }
1037  }
1039  {
1040  // move get to the first byte of the Mask table. This is the offset from the
1041  // start of the maskSubsection.
1042  in.seekg(component.m_componentLocation +
1044  for(spectralIndex = 0;
1046  ++spectralIndex)
1047  {
1048  // reserve space for the number of rows
1050  for(rowIndex = 0;
1052  ++rowIndex)
1053  {
1054  // allocate the columns
1056  for(colIndex = 0;
1058  ++colIndex)
1059  {
1060  ossim_uint32 value;
1061 
1062  in.read((char*)&value, 4);
1063  ossimEndian anEndian;
1064 
1065  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
1066  {
1067  anEndian.swap(value);
1068  }
1069  theSubframeTransparencyMaskTable[spectralIndex][rowIndex][colIndex] = value;
1070  }
1071  }
1072  }
1073  }
1074  }
1075  }
1076  }
1077 
1079 }
static const ossimErrorCode OSSIM_OK
static const ossimErrorCode OSSIM_ERROR
bool getComponent(ossimRpfComponentId componentId, ossimRpfComponentLocationRecord &result) const
const ossimRpfLocationSection * getLocationSection() const
ossimRpfHeader * theHeader
vector< vector< vector< ossim_uint32 > > > theSubframeMaskTable
unsigned int ossim_uint32
vector< vector< vector< ossim_uint32 > > > theSubframeTransparencyMaskTable
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
virtual ossimByteOrder getByteOrder() const
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26
ossimRpfImageDescriptionSubheader * theImageDescriptionSubheader

◆ populateReplaceUpdateTable()

ossimErrorCode ossimRpfFrame::populateReplaceUpdateTable ( std::istream &  in)
private

Definition at line 1081 of file ossimRpfFrame.cpp.

References ossimRpfReplaceUpdateTable::addRecord(), ossimRpfReplaceUpdateTable::clear(), ossimRpfHeader::getByteOrder(), ossimRpfLocationSection::getComponent(), ossimRpfHeader::getLocationSection(), ossimRpfReplaceUpdateSectionSubheader::getNumberOfRecords(), ossimRpfLocationSection::hasComponent(), ossimRpfComponentLocationRecord::m_componentLocation, ossimErrorCodes::OSSIM_ERROR, ossimErrorCodes::OSSIM_OK, OSSIM_RPF_REPLACE_UPDATE_SECTION_SUBHEADER, ossimRpfReplaceUpdateRecord::parseStream(), ossimRpfReplaceUpdateSectionSubheader::parseStream(), theHeader, theReplaceUpdateTable, and ossimRefPtr< T >::valid().

1082 {
1084 
1086 
1087  if( location )
1088  {
1090  {
1092  if( location->getComponent(OSSIM_RPF_REPLACE_UPDATE_SECTION_SUBHEADER, component) )
1093  {
1096 
1097  in.seekg(component.m_componentLocation, ios::beg);
1098 
1100  {
1101  ossim_uint16 count = hdr->getNumberOfRecords();
1102  if ( count )
1103  {
1104  if ( theReplaceUpdateTable.valid() )
1105  {
1107  }
1108  else
1109  {
1111  }
1113  for ( ossim_uint16 i = 0; i < count; ++i )
1114  {
1115  if ( record.parseStream(in) == ossimErrorCodes::OSSIM_OK )
1116  {
1117  theReplaceUpdateTable->addRecord( record );
1118  }
1119  else
1120  {
1121  break;
1122  }
1123  }
1124  }
1125 
1126  }
1127  }
1128  }
1129  }
1130 
1131  if ( in.fail() )
1132  {
1135  }
1136 
1137  return result;
1138 
1139 } // End: ossimRpfFrame::populateReplaceUpdateTable(std::istream& in)
ossim_int32 ossimErrorCode
void addRecord(const ossimRpfReplaceUpdateRecord &record)
Method to add a record.
ossimRefPtr< ossimRpfReplaceUpdateTable > theReplaceUpdateTable
Holds table of "replace / update" records if present.
Holds a table of RPF replace/update section subheader records.
static const ossimErrorCode OSSIM_OK
bool valid() const
Definition: ossimRefPtr.h:75
static const ossimErrorCode OSSIM_ERROR
unsigned short ossim_uint16
bool getComponent(ossimRpfComponentId componentId, ossimRpfComponentLocationRecord &result) const
const ossimRpfLocationSection * getLocationSection() const
ossimRpfHeader * theHeader
bool hasComponent(ossimRpfComponentId componentId) const
ossimErrorCode parseStream(std::istream &in, ossimByteOrder byteOrder)
Method to parse the record.
ossimErrorCode parseStream(std::istream &in)
Method to parse the record.
RPF replace/update section subheader record.
virtual ossimByteOrder getByteOrder() const
RPF replace/update section subheader record.

◆ print()

std::ostream & ossimRpfFrame::print ( std::ostream &  out,
const std::string &  prefix = std::string() 
) const

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

Parameters
outString to output to.
prefixThis will be prepended to key. e.g. Where prefix = "nitf." and key is "file_name" key becomes: "nitf.file_name:"
Returns
output stream.

Definition at line 76 of file ossimRpfFrame.cpp.

Referenced by operator<<().

77 {
78  if (traceDebug())
79  {
80  out << "begin_rpf_frame_print:\n";
81  }
82 
83  if(theHeader)
84  {
85  theHeader->print(out, prefix);
86  }
87 
88  out << prefix << "filename: " << theFilename << "\n";
89 
91  {
92  theReplaceUpdateTable->print(out, prefix);
93  }
94 
95  if (traceDebug())
96  {
97  if(theCoverage)
98  {
99  theCoverage->print(out, prefix);
100  }
101  }
102 
103  //---
104  // Derived series code from first two characters of file extension.
105  // Note ChartSeriesCode from RPF Frame attributes may or may not be
106  // present.
107  //---
108  if ( theFilename.size() )
109  {
110  ossimString ext = theFilename.ext();
111  if ( ext.size() > 1 )
112  {
113  ext.upcase();
114  out << prefix << "SeriesCode: " << ext.string().substr(0, 2) << "\n";
115  }
116  }
117 
118  if(theAttributes)
119  {
120  theAttributes->print(out, prefix);
121  }
122 
123  if (traceDebug())
124  {
126  {
127  theImageDescriptionSubheader->print(out, prefix);
128  }
129 
130  if(theMaskSubheader)
131  {
132  out << *theMaskSubheader << endl;
133  }
135  {
136  out << *theImageDisplayParameterSubheader << endl;
137  }
139  {
140  out << *theCompressionSection << endl;
141  }
143  {
144  out << *theColorGrayscaleSubheader << endl;
145  }
147  {
148  out << *theColorConverterSubsection << endl;
149  }
150 
151  copy(theColorGrayscaleTable.begin(),
153  ostream_iterator<ossimRpfColorGrayscaleTable>(out, "\n"));
154 
157  {
158  out << "Subframe Mask Table:" << endl;
159  unsigned long spectralIndex;
160  unsigned long rowIndex;
161  unsigned long colIndex;
162  // first loop through the Mask table and allocate while we do it
163  for(spectralIndex = 0;
165  ++spectralIndex)
166  {
167  for(rowIndex = 0;
169  ++rowIndex)
170  {
171  for(colIndex = 0;
173  ++colIndex)
174  {
175  if( theSubframeMaskTable[spectralIndex][rowIndex][colIndex] == OSSIM_RPF_ULONG_NULL)
176  {
177  out << "NULL ";
178  }
179  else
180  {
181  out << theSubframeMaskTable[spectralIndex][rowIndex][colIndex] << " ";
182  }
183  }
184  out << endl;
185  }
186  }
187  }
188 
189 
192  {
193  out << "Transparency Mask Table:" << endl;
194  unsigned long spectralIndex;
195  unsigned long rowIndex;
196  unsigned long colIndex;
197  // first loop through the Mask table and allocate while we do it
198  for(spectralIndex = 0;
200  ++spectralIndex)
201  {
202  for(rowIndex = 0;
204  ++rowIndex)
205  {
206  for(colIndex = 0;
208  ++colIndex)
209  {
210  if( theSubframeTransparencyMaskTable[spectralIndex][rowIndex][colIndex] == OSSIM_RPF_ULONG_NULL)
211  {
212  out << "NULL ";
213  }
214  else
215  {
216  out << theSubframeTransparencyMaskTable[spectralIndex][rowIndex][colIndex] << " ";
217  }
218  }
219  }
220  }
221  }
222 
223 
224 
225  out << "end_rpf_frame_print:\n";
226 
227  } // matches: if (traceDebug())
228 
229  out << std::endl;
230 
231  return out;
232 }
ossimRpfColorGrayscaleSubheader * theColorGrayscaleSubheader
ossimRefPtr< ossimRpfReplaceUpdateTable > theReplaceUpdateTable
Holds table of "replace / update" records if present.
static ossimString upcase(const ossimString &aString)
Definition: ossimString.cpp:34
vector< ossimRpfColorGrayscaleTable > theColorGrayscaleTable
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.
bool valid() const
Definition: ossimRefPtr.h:75
ossimRpfColorConverterSubsection * theColorConverterSubsection
ossimRpfCoverageSection * theCoverage
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.
ossimRpfHeader * theHeader
std::string::size_type size() const
Definition: ossimString.h:405
vector< vector< vector< ossim_uint32 > > > theSubframeMaskTable
ossimRpfImageDisplayParameterSubheader * theImageDisplayParameterSubheader
vector< vector< vector< ossim_uint32 > > > theSubframeTransparencyMaskTable
ossimRpfCompressionSection * theCompressionSection
ossimFilename theFilename
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.
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.
ossimString ext() const
ossimRpfAttributes * theAttributes
ossimRpfMaskSubheader * theMaskSubheader
const unsigned long OSSIM_RPF_ULONG_NULL
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.
const std::string & string() const
Definition: ossimString.h:414
ossimRpfImageDescriptionSubheader * theImageDescriptionSubheader

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const ossimRpfFrame data 
)
friend

Definition at line 46 of file ossimRpfFrame.cpp.

47 {
48  data.print(out);
49 
50  return out;
51 }
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.

Member Data Documentation

◆ theAttributes

ossimRpfAttributes* ossimRpfFrame::theAttributes
private

This will hold the attributes of this frame.

Definition at line 134 of file ossimRpfFrame.h.

Referenced by deleteAll().

◆ theColorConverterSubsection

ossimRpfColorConverterSubsection* ossimRpfFrame::theColorConverterSubsection
private

Definition at line 166 of file ossimRpfFrame.h.

Referenced by deleteAll(), and populateColorGrayscaleSection().

◆ theColorGrayscaleSubheader

ossimRpfColorGrayscaleSubheader* ossimRpfFrame::theColorGrayscaleSubheader
private

If present, it will hold the color grayscale subheader.

Definition at line 161 of file ossimRpfFrame.h.

Referenced by deleteAll(), and populateColorGrayscaleSection().

◆ theColorGrayscaleTable

vector<ossimRpfColorGrayscaleTable> ossimRpfFrame::theColorGrayscaleTable
private

Definition at line 171 of file ossimRpfFrame.h.

Referenced by populateColorGrayscaleSection().

◆ theCompressionSection

ossimRpfCompressionSection* ossimRpfFrame::theCompressionSection
private

Will hold a pointer to the compression information section.

Definition at line 156 of file ossimRpfFrame.h.

Referenced by deleteAll(), and populateCompressionSection().

◆ theCoverage

ossimRpfCoverageSection* ossimRpfFrame::theCoverage
private

This will hold the coverage.

Definition at line 129 of file ossimRpfFrame.h.

Referenced by deleteAll(), and populateCoverageSection().

◆ theFilename

ossimFilename ossimRpfFrame::theFilename
private

The filename is set if its a successful open.

Definition at line 124 of file ossimRpfFrame.h.

Referenced by clearFields(), and fillSubFrameBuffer().

◆ theHeader

ossimRpfHeader* ossimRpfFrame::theHeader
private

The header will be instantiated during the opening of the frame file.

Definition at line 119 of file ossimRpfFrame.h.

Referenced by deleteAll(), fillSubFrameBuffer(), populateColorGrayscaleSection(), populateCompressionSection(), populateCoverageSection(), populateImageSection(), populateMasks(), and populateReplaceUpdateTable().

◆ theImageDescriptionSubheader

ossimRpfImageDescriptionSubheader* ossimRpfFrame::theImageDescriptionSubheader
private

This is the subheader for the image. It will have some general information about the image.

Definition at line 140 of file ossimRpfFrame.h.

Referenced by deleteAll(), fillSubFrameBuffer(), hasSubframeMaskTable(), populateImageSection(), and populateMasks().

◆ theImageDisplayParameterSubheader

ossimRpfImageDisplayParameterSubheader* ossimRpfFrame::theImageDisplayParameterSubheader
private

This is the subheader for the display parameters for this frame.

Definition at line 151 of file ossimRpfFrame.h.

Referenced by deleteAll(), fillSubFrameBuffer(), and populateImageSection().

◆ theMaskSubheader

ossimRpfMaskSubheader* ossimRpfFrame::theMaskSubheader
private

This is the mask subheader.

Definition at line 145 of file ossimRpfFrame.h.

Referenced by deleteAll(), and populateImageSection().

◆ theNitfFile

ossimRefPtr<ossimNitfFile> ossimRpfFrame::theNitfFile
private

Definition at line 176 of file ossimRpfFrame.h.

Referenced by deleteAll().

◆ theReplaceUpdateTable

ossimRefPtr<ossimRpfReplaceUpdateTable> ossimRpfFrame::theReplaceUpdateTable
private

Holds table of "replace / update" records if present.

Definition at line 203 of file ossimRpfFrame.h.

Referenced by getRpfReplaceUpdateTable(), and populateReplaceUpdateTable().

◆ theSubframeMaskTable

vector< vector< vector< ossim_uint32> > > ossimRpfFrame::theSubframeMaskTable
private

We have a 3-D array. For the most part the numberof spectral groups should be one. The indexes are as follows:

theSubframeMasKTable[spectralGroup][row][col]

It will hold RPF_NULL(0xffffffff) if the subframe does not exist and it will hold an offset value from the start of the [spatial data section] to the first byte of the subframe table.

Definition at line 188 of file ossimRpfFrame.h.

Referenced by fillSubFrameBuffer(), and populateMasks().

◆ theSubframeTransparencyMaskTable

vector< vector< vector< ossim_uint32> > > ossimRpfFrame::theSubframeTransparencyMaskTable
private

We have a 3-D array. For the most part the numberof spectral groups should be one. The indexes are as follows:

theSubframeTransparencyMaskTable[spectralGroup][row][col]

It will hold RPF_NULL(0xffffffff) if the subframe does not exist and it will hold an offset value from the start of the [spatial data section] to the first byte of the subframe table.

Definition at line 200 of file ossimRpfFrame.h.

Referenced by populateMasks().


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