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

#include <ossimCcfHead.h>

Inheritance diagram for ossimCcfHead:
ossimErrorStatusInterface

Public Member Functions

 ossimCcfHead ()
 
 ossimCcfHead (const char *ccf_file)
 
 ossimCcfHead (std::shared_ptr< ossim::istream > &str, const std::string &connectionString)
 
 ~ossimCcfHead ()
 
bool parseCcfHeader (const char *ccf_file)
 
bool parseCcfHeader (std::shared_ptr< ossim::istream > &str, const std::string &connectionString)
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
ossim_uint32 numberOfReducedResSets () const
 
ossim_uint32 numberOfLines (ossim_uint32 reduced_res_level) const
 
ossim_uint32 numberOfSamples (ossim_uint32 reduced_res_level) const
 
ossim_uint32 chunksInLineDir (ossim_uint32 reduced_res_level) const
 
ossim_uint32 chunksInSampleDir (ossim_uint32 reduced_res_level) const
 
std::streampos startOfData (ossim_uint32 reduced_res_level) const
 
ossim_uint32 highestReducedResSet () const
 
ossimIrect imageRect (ossim_uint32 reduced_res_level) const
 
ossimString imageFile () const
 
ossimString radiometry () const
 
ossim_uint32 numberOfBands () const
 
ossimScalarType pixelType () const
 
ossim_uint32 bytesPerChunk () const
 
ossim_uint32 bytesPerChip () const
 
ossim_uint32 sampleChipsPerChunk () const
 
ossim_uint32 lineChipsPerChunk () const
 
ossim_uint32 samplesPerChip () const
 
ossim_uint32 linesPerChip () const
 
ossim_uint32 chipSizePerBand () const
 
const std::vector< ossimIpt > & getValidImageVertices () const
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 

Private Member Functions

bool parseV5CcfHeader (std::istream &is)
 
bool parseV6CcfHeader (std::istream &is)
 
void parseRadString ()
 

Private Attributes

std::shared_ptr< ossim::istreamm_ccfStr
 
std::string m_connectionString
 
ossim_uint32 theNumberOfBands
 
ossimScalarType thePixelType
 
ossimString theFileType
 
ossim_uint32 theVersionNumber
 
ossim_uint32 theLinesPerChip
 
ossim_uint32 theSamplesPerChip
 
ossim_uint32 theLineChipsPerChunk
 
ossim_uint32 theSampleChipsPerChunk
 
ossim_uint32 theRectInFullImageStartLine
 
ossim_uint32 theRectInFuleImageStartSample
 
ossim_uint32 theRectInFullImageStopLine
 
ossim_uint32 theRectInFuleImageStopSample
 
ossim_uint32 theNumberOfValidImageVertices
 
std::vector< ossimIpttheValidImageVertices
 
ossim_uint32 theFirstBandHeaderPointer
 
ossimString theRadiometryString
 
ossim_uint32 theBytesPerPixel
 
ossim_uint32 theBytesPerChip
 
ossim_uint32 theBytesPerChunk
 
ossimString theCompressionType
 
ossim_uint32 theNumberOfRLevels
 
std::vector< bool > theOccupiedFlag
 
std::vector< std::streampos > theStartOfData
 
std::vector< ossim_uint32theNumberOfLines
 
std::vector< ossim_uint32theNumberOfSamples
 
std::vector< ossim_uint32theChunksInLineDir
 
std::vector< ossim_uint32theChunksInSampleDir
 

Additional Inherited Members

- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Detailed Description

Definition at line 34 of file ossimCcfHead.h.

Constructor & Destructor Documentation

◆ ossimCcfHead() [1/3]

ossimCcfHead::ossimCcfHead ( )

Definition at line 30 of file ossimCcfHead.cpp.

31  :
35  theFileType(),
37  theLinesPerChip(0),
50  theBytesPerChip(0),
54  theOccupiedFlag(1),
55  theStartOfData(1),
60 {}
ossim_uint32 theNumberOfBands
Definition: ossimCcfHead.h:162
ossimScalarType thePixelType
Definition: ossimCcfHead.h:163
ossim_uint32 theLinesPerChip
Definition: ossimCcfHead.h:166
ossim_uint32 theRectInFullImageStopLine
Definition: ossimCcfHead.h:172
ossim_uint32 theNumberOfRLevels
Definition: ossimCcfHead.h:182
ossim_uint32 theRectInFullImageStartLine
Definition: ossimCcfHead.h:170
ossim_uint32 theBytesPerPixel
Definition: ossimCcfHead.h:178
std::vector< ossim_uint32 > theNumberOfSamples
Definition: ossimCcfHead.h:186
std::vector< ossim_uint32 > theNumberOfLines
Definition: ossimCcfHead.h:185
ossim_uint32 theLineChipsPerChunk
Definition: ossimCcfHead.h:168
std::vector< ossim_uint32 > theChunksInSampleDir
Definition: ossimCcfHead.h:188
ossimString theRadiometryString
Definition: ossimCcfHead.h:177
ossimString theCompressionType
Definition: ossimCcfHead.h:181
std::vector< ossimIpt > theValidImageVertices
Definition: ossimCcfHead.h:175
ossim_uint32 theRectInFuleImageStartSample
Definition: ossimCcfHead.h:171
std::string m_connectionString
Definition: ossimCcfHead.h:161
std::vector< std::streampos > theStartOfData
Definition: ossimCcfHead.h:184
std::vector< ossim_uint32 > theChunksInLineDir
Definition: ossimCcfHead.h:187
ossimString theFileType
Definition: ossimCcfHead.h:164
ossim_uint32 theFirstBandHeaderPointer
Definition: ossimCcfHead.h:176
ossim_uint32 theNumberOfValidImageVertices
Definition: ossimCcfHead.h:174
ossim_uint32 theRectInFuleImageStopSample
Definition: ossimCcfHead.h:173
ossim_uint32 theSamplesPerChip
Definition: ossimCcfHead.h:167
ossim_uint32 theSampleChipsPerChunk
Definition: ossimCcfHead.h:169
ossim_uint32 theBytesPerChunk
Definition: ossimCcfHead.h:180
ossim_uint32 theBytesPerChip
Definition: ossimCcfHead.h:179
8 bit unsigned iteger
std::vector< bool > theOccupiedFlag
Definition: ossimCcfHead.h:183
ossim_uint32 theVersionNumber
Definition: ossimCcfHead.h:165

◆ ossimCcfHead() [2/3]

ossimCcfHead::ossimCcfHead ( const char *  ccf_file)

Definition at line 65 of file ossimCcfHead.cpp.

References ossimErrorCodes::OSSIM_ERROR, parseCcfHeader(), and ossimErrorStatusInterface::theErrorStatus.

66  :
67  m_connectionString(ccf_file),
70  theFileType(),
72  theLinesPerChip(0),
85  theBytesPerChip(0),
89  theOccupiedFlag(1),
90  theStartOfData(1),
95 {
96  static const char MODULE[] = "ossimCcfHead::ossimCcfHead";
97 
98  if (!parseCcfHeader(ccf_file))
99  {
101 
102  if (traceDebug())
103  {
105  << MODULE << " ERROR!"
106  << "\nError initializing from ccf_file: " << ccf_file
107  << "\nReturning...\n";
108  }
109  }
110 }
ossim_uint32 theNumberOfBands
Definition: ossimCcfHead.h:162
ossimScalarType thePixelType
Definition: ossimCcfHead.h:163
ossim_uint32 theLinesPerChip
Definition: ossimCcfHead.h:166
ossim_uint32 theRectInFullImageStopLine
Definition: ossimCcfHead.h:172
ossim_uint32 theNumberOfRLevels
Definition: ossimCcfHead.h:182
ossim_uint32 theRectInFullImageStartLine
Definition: ossimCcfHead.h:170
ossim_uint32 theBytesPerPixel
Definition: ossimCcfHead.h:178
std::vector< ossim_uint32 > theNumberOfSamples
Definition: ossimCcfHead.h:186
std::vector< ossim_uint32 > theNumberOfLines
Definition: ossimCcfHead.h:185
static const ossimErrorCode OSSIM_ERROR
ossim_uint32 theLineChipsPerChunk
Definition: ossimCcfHead.h:168
std::vector< ossim_uint32 > theChunksInSampleDir
Definition: ossimCcfHead.h:188
ossimString theRadiometryString
Definition: ossimCcfHead.h:177
bool parseCcfHeader(const char *ccf_file)
ossimString theCompressionType
Definition: ossimCcfHead.h:181
std::vector< ossimIpt > theValidImageVertices
Definition: ossimCcfHead.h:175
ossim_uint32 theRectInFuleImageStartSample
Definition: ossimCcfHead.h:171
std::string m_connectionString
Definition: ossimCcfHead.h:161
std::vector< std::streampos > theStartOfData
Definition: ossimCcfHead.h:184
std::vector< ossim_uint32 > theChunksInLineDir
Definition: ossimCcfHead.h:187
ossimString theFileType
Definition: ossimCcfHead.h:164
ossim_uint32 theFirstBandHeaderPointer
Definition: ossimCcfHead.h:176
ossim_uint32 theNumberOfValidImageVertices
Definition: ossimCcfHead.h:174
ossim_uint32 theRectInFuleImageStopSample
Definition: ossimCcfHead.h:173
ossim_uint32 theSamplesPerChip
Definition: ossimCcfHead.h:167
ossim_uint32 theSampleChipsPerChunk
Definition: ossimCcfHead.h:169
ossim_uint32 theBytesPerChunk
Definition: ossimCcfHead.h:180
ossim_uint32 theBytesPerChip
Definition: ossimCcfHead.h:179
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
8 bit unsigned iteger
std::vector< bool > theOccupiedFlag
Definition: ossimCcfHead.h:183
ossim_uint32 theVersionNumber
Definition: ossimCcfHead.h:165

◆ ossimCcfHead() [3/3]

ossimCcfHead::ossimCcfHead ( std::shared_ptr< ossim::istream > &  str,
const std::string &  connectionString 
)

Definition at line 112 of file ossimCcfHead.cpp.

References ossimErrorCodes::OSSIM_ERROR, parseCcfHeader(), and ossimErrorStatusInterface::theErrorStatus.

114 {
115  static const char MODULE[] = "ossimCcfHead::ossimCcfHead";
116  if(!str)
117  {
119  }
120  else if (!parseCcfHeader(str, connectionString))
121  {
123 
124  if (traceDebug())
125  {
127  << MODULE << " ERROR!"
128  << "\nError initializing from ccf_file: " << connectionString
129  << "\nReturning...\n";
130  }
131  }
132 
133 }
static const ossimErrorCode OSSIM_ERROR
bool parseCcfHeader(const char *ccf_file)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ ~ossimCcfHead()

ossimCcfHead::~ossimCcfHead ( )

Definition at line 137 of file ossimCcfHead.cpp.

138 {}

Member Function Documentation

◆ bytesPerChip()

ossim_uint32 ossimCcfHead::bytesPerChip ( ) const
inline

Returns the bytes per chip.

Definition at line 109 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::fillUcharBuffer(), and ossimCcfTileSource::fillUshortBuffer().

109 { return theBytesPerChip; }
ossim_uint32 theBytesPerChip
Definition: ossimCcfHead.h:179

◆ bytesPerChunk()

ossim_uint32 ossimCcfHead::bytesPerChunk ( ) const
inline

Returns the bytes per chunk.

Definition at line 104 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::fillUcharBuffer(), and ossimCcfTileSource::fillUshortBuffer().

104 { return theBytesPerChunk; }
ossim_uint32 theBytesPerChunk
Definition: ossimCcfHead.h:180

◆ chipSizePerBand()

ossim_uint32 ossimCcfHead::chipSizePerBand ( ) const
inline

Returns the number of pixels in a single band of a chip. Note: This is not in bytes but in pixels.

Definition at line 135 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::fillUcharBuffer(), and ossimCcfTileSource::fillUshortBuffer().

136  { return theLinesPerChip * theSamplesPerChip; }
ossim_uint32 theLinesPerChip
Definition: ossimCcfHead.h:166
ossim_uint32 theSamplesPerChip
Definition: ossimCcfHead.h:167

◆ chunksInLineDir()

ossim_uint32 ossimCcfHead::chunksInLineDir ( ossim_uint32  reduced_res_level) const

Definition at line 677 of file ossimCcfHead.cpp.

References highestReducedResSet(), ossimNotify(), ossimNotifyLevel_WARN, and theChunksInLineDir.

678 {
679  static const char MODULE[] = "ossimCcfHead::chunksInLineDir";
680 
681  if (reduced_res_level > highestReducedResSet() )
682  {
684  << MODULE << " ERROR!"
685  << "\nInvalid reduced res level: " << reduced_res_level
686  << "\nHighest reduced res level available: "
687  << highestReducedResSet() << std::endl;
688  return 0;
689  }
690 
691  return theChunksInLineDir[reduced_res_level];
692 }
std::vector< ossim_uint32 > theChunksInLineDir
Definition: ossimCcfHead.h:187
ossim_uint32 highestReducedResSet() const
Definition: ossimCcfHead.h:71
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ chunksInSampleDir()

ossim_uint32 ossimCcfHead::chunksInSampleDir ( ossim_uint32  reduced_res_level) const

Definition at line 697 of file ossimCcfHead.cpp.

References highestReducedResSet(), ossimNotify(), ossimNotifyLevel_WARN, and theChunksInSampleDir.

Referenced by ossimCcfTileSource::fillUcharBuffer().

698 {
699  static const char MODULE[] = "ossimCcfHead::chunksInSampleDir";
700 
701  if (reduced_res_level > highestReducedResSet() )
702  {
704  << MODULE << " ERROR!"
705  << "\nInvalid reduced res level: " << reduced_res_level
706  << "\nHighest reduced res level available: "
707  << highestReducedResSet() << std::endl;
708  return 0;
709  }
710 
711  return theChunksInSampleDir[reduced_res_level];
712 }
std::vector< ossim_uint32 > theChunksInSampleDir
Definition: ossimCcfHead.h:188
ossim_uint32 highestReducedResSet() const
Definition: ossimCcfHead.h:71
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ getValidImageVertices()

const std::vector<ossimIpt>& ossimCcfHead::getValidImageVertices ( ) const
inline

Definition at line 138 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::initVerticesFromHeader().

139  {
140  return theValidImageVertices;
141  }
std::vector< ossimIpt > theValidImageVertices
Definition: ossimCcfHead.h:175

◆ highestReducedResSet()

ossim_uint32 ossimCcfHead::highestReducedResSet ( ) const
inline

Returns the highest available reduced resolution level. Zero based.

Definition at line 71 of file ossimCcfHead.h.

Referenced by chunksInLineDir(), chunksInSampleDir(), imageRect(), numberOfLines(), numberOfSamples(), and startOfData().

72  { return !theNumberOfRLevels ? 0 : (theNumberOfRLevels - 1); }
ossim_uint32 theNumberOfRLevels
Definition: ossimCcfHead.h:182

◆ imageFile()

ossimString ossimCcfHead::imageFile ( ) const
inline

Returns the ccf file name as a String.

Definition at line 84 of file ossimCcfHead.h.

84 { return m_connectionString; }
std::string m_connectionString
Definition: ossimCcfHead.h:161

◆ imageRect()

ossimIrect ossimCcfHead::imageRect ( ossim_uint32  reduced_res_level) const

Returns the zero based image rectangle for the reduced resolution level passed in. Returns a rectangle of (0,0,0,0) if reduced_res_level is out of range.

Definition at line 737 of file ossimCcfHead.cpp.

References highestReducedResSet(), numberOfLines(), numberOfSamples(), ossimNotify(), and ossimNotifyLevel_WARN.

Referenced by ossimCcfTileSource::getImageRectangle(), and ossimCcfTileSource::getTile().

738 {
739  static const char MODULE[] = "ossimCcfHead::imageRect";
740 
741  if (reduced_res_level > highestReducedResSet() )
742  {
743  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " ERROR!"
744  << "\nInvalid reduced res level: " << reduced_res_level
745  << "\nHighest reduced res level available: "
746  << highestReducedResSet() << std::endl;
747  return ossimIrect(0,0,0,0);
748  }
749 
750  return ossimIrect(0,
751  0,
752  numberOfSamples(reduced_res_level) - 1,
753  numberOfLines(reduced_res_level) - 1);
754 }
ossim_uint32 numberOfSamples(ossim_uint32 reduced_res_level) const
ossim_uint32 numberOfLines(ossim_uint32 reduced_res_level) const
ossim_uint32 highestReducedResSet() const
Definition: ossimCcfHead.h:71
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ lineChipsPerChunk()

ossim_uint32 ossimCcfHead::lineChipsPerChunk ( ) const
inline

Returns the number of chips in line direction of a chunk.

Definition at line 119 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::fillUcharBuffer(), and ossimCcfTileSource::fillUshortBuffer().

119 { return theLineChipsPerChunk; }
ossim_uint32 theLineChipsPerChunk
Definition: ossimCcfHead.h:168

◆ linesPerChip()

ossim_uint32 ossimCcfHead::linesPerChip ( ) const
inline

Returns the lines per chip.

Definition at line 129 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::fillUcharBuffer(), and ossimCcfTileSource::fillUshortBuffer().

129 { return theLinesPerChip; }
ossim_uint32 theLinesPerChip
Definition: ossimCcfHead.h:166

◆ numberOfBands()

ossim_uint32 ossimCcfHead::numberOfBands ( ) const
inline

Returns the number of bands.

Definition at line 94 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::fillUcharBuffer(), ossimCcfTileSource::fillUshortBuffer(), and ossimCcfTileSource::getNumberOfInputBands().

94 { return theNumberOfBands; }
ossim_uint32 theNumberOfBands
Definition: ossimCcfHead.h:162

◆ numberOfLines()

ossim_uint32 ossimCcfHead::numberOfLines ( ossim_uint32  reduced_res_level) const

Definition at line 637 of file ossimCcfHead.cpp.

References highestReducedResSet(), ossimNotify(), ossimNotifyLevel_WARN, and theNumberOfLines.

Referenced by ossimCcfTileSource::getNumberOfLines(), and imageRect().

638 {
639  static const char MODULE[] = "ossimCcfHead::numberOfLines";
640 
641  if (reduced_res_level > highestReducedResSet() )
642  {
644  << MODULE << " ERROR!"
645  << "\nInvalid reduced res level: " << reduced_res_level
646  << "\nHighest reduced res level available: "
647  << highestReducedResSet() << std::endl;
648  return 0;
649  }
650 
651  return theNumberOfLines[reduced_res_level];
652 }
std::vector< ossim_uint32 > theNumberOfLines
Definition: ossimCcfHead.h:185
ossim_uint32 highestReducedResSet() const
Definition: ossimCcfHead.h:71
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ numberOfReducedResSets()

ossim_uint32 ossimCcfHead::numberOfReducedResSets ( ) const
inline

Definition at line 55 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::getNumberOfDecimationLevels().

55 { return theNumberOfRLevels; }
ossim_uint32 theNumberOfRLevels
Definition: ossimCcfHead.h:182

◆ numberOfSamples()

ossim_uint32 ossimCcfHead::numberOfSamples ( ossim_uint32  reduced_res_level) const

Definition at line 657 of file ossimCcfHead.cpp.

References highestReducedResSet(), ossimNotify(), ossimNotifyLevel_WARN, and theNumberOfSamples.

Referenced by ossimCcfTileSource::getNumberOfSamples(), and imageRect().

658 {
659  static const char MODULE[] = "ossimCcfHead::numberOfSamples";
660 
661  if (reduced_res_level > highestReducedResSet() )
662  {
664  << MODULE << " ERROR!"
665  << "\nInvalid reduced res level: " << reduced_res_level
666  << "\nHighest reduced res level available: "
667  << highestReducedResSet() << std::endl;
668  return 0;
669  }
670 
671  return theNumberOfSamples[reduced_res_level];
672 }
std::vector< ossim_uint32 > theNumberOfSamples
Definition: ossimCcfHead.h:186
ossim_uint32 highestReducedResSet() const
Definition: ossimCcfHead.h:71
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ parseCcfHeader() [1/2]

bool ossimCcfHead::parseCcfHeader ( const char *  ccf_file)

Reads the ccf header and initializes data members. Returns true on successful read, false on error.

Definition at line 143 of file ossimCcfHead.cpp.

References ossim::StreamFactoryRegistry::instance(), ossimErrorCodes::OSSIM_ERROR, and ossimErrorStatusInterface::theErrorStatus.

Referenced by ossimCcfHead().

144 {
145  static const char MODULE[] = "ossimCcfHead::parseCcfHeader";
146  bool result = false;
147 
148  std::string connectionString = ccf_file;
149  std::shared_ptr<ossim::istream> str = ossim::StreamFactoryRegistry::instance()->
150  createIstream( connectionString, std::ios_base::in|std::ios_base::binary);
151  if ( str )
152  {
153  result = parseCcfHeader(str, connectionString);
154  }
155  else
156  {
158  if (traceDebug())
159  {
161  << MODULE << " ERROR!"
162  << "\nCannot open file: " << m_connectionString << "\n";
163  }
164  }
165  return result;
166 }
static const ossimErrorCode OSSIM_ERROR
static StreamFactoryRegistry * instance()
bool parseCcfHeader(const char *ccf_file)
std::string m_connectionString
Definition: ossimCcfHead.h:161
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ parseCcfHeader() [2/2]

bool ossimCcfHead::parseCcfHeader ( std::shared_ptr< ossim::istream > &  str,
const std::string &  connectionString 
)

Definition at line 168 of file ossimCcfHead.cpp.

References m_ccfStr, m_connectionString, parseV5CcfHeader(), parseV6CcfHeader(), theFileType, and theVersionNumber.

170 {
171  static const char MODULE[] = "ossimCcfHead::parseossimCcfHeader";
172 
173  bool result = false;
174 
175  if ( str )
176  {
177  str->clear();
178  str->seekg(0);
179 
180  const ossim_uint32 MAX_LEN = 256;
181  char tmp[MAX_LEN];
182 
183  // Check the first string should be "CCF" else get out...
184  // this might hang so I changed it to not use the
185  // >> operator unless it is a ccf file. If it is another
186  // file we might not be guranteed a whitespace or \n character
187  // will exist and therefore the entrie file could have
188  // been read in.
189  //
190  char type[4];
191  str->read(type, 3);
192  type[3] = '\0';
193  theFileType = type;
194  if (theFileType == "CCF")
195  {
196  m_ccfStr = str;
197  m_connectionString = connectionString;
198 
199  // Check the version number.
200  (*m_ccfStr) >> tmp >> theVersionNumber;
201 
202  //---
203  // Call the appropriate method for the version. Currently only version 6
204  // supported as that was all I had in-house. Feel free to add your own
205  // version reader!
206  //---
207  switch(theVersionNumber)
208  {
209  case 5:
210  {
211  result = parseV5CcfHeader(*m_ccfStr);
212  break;
213  }
214  case 6:
215  {
216  result = parseV6CcfHeader(*m_ccfStr);
217  break;
218  }
219  default:
220  {
221  m_ccfStr = 0;
222  // Version type not supported...
223  if (traceDebug())
224  {
226  << MODULE << " ERROR!"
227  << "\nUsupported version: " << theVersionNumber
228  << " Returning...\n";
229  }
230  }
231  break;
232  }
233  }
234 
235  if ( result )
236  {
237  //---
238  // Parse the radiometry string. This will initialize "theNumberOfBands"
239  // and the pixel type.
240  //---
241  parseRadString();
242  }
243  else
244  {
245  str->clear();
246  str->seekg(0);
247  }
248  }
249 
250  return result;
251 }
bool parseV5CcfHeader(std::istream &is)
unsigned int ossim_uint32
std::string m_connectionString
Definition: ossimCcfHead.h:161
ossimString theFileType
Definition: ossimCcfHead.h:164
std::shared_ptr< ossim::istream > m_ccfStr
Definition: ossimCcfHead.h:160
void parseRadString()
bool parseV6CcfHeader(std::istream &is)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
ossim_uint32 theVersionNumber
Definition: ossimCcfHead.h:165

◆ parseRadString()

void ossimCcfHead::parseRadString ( )
private

Parses the radiometry string and initializes "theNumberOfBands" and "thePixelType".

Definition at line 759 of file ossimCcfHead.cpp.

References ossimString::contains(), OSSIM_UCHAR, OSSIM_USHORT11, OSSIM_USHORT12, OSSIM_USHORT13, OSSIM_USHORT14, OSSIM_USHORT15, OSSIM_USHORT16, ossimNotify(), ossimNotifyLevel_WARN, theNumberOfBands, thePixelType, and theRadiometryString.

760 {
761  static const char MODULE[] = "ossimCcfHead::parseRadString";
762 
763  if (theRadiometryString.contains("RadiomNBand"))
764  {
765  //***
766  // Complex string, must parse. Should look like:
767  // "RadiomNBand (3 3 Linear8 )"
768  //***
769  char tmp[80];
771 
772  is >> tmp; // Skip the "RadiomNBand" string.
773  is.get(tmp, 3); // Eat the space and the '('.
774  is >> theNumberOfBands; // Get the number of bands.
775  }
776 
777  if (theRadiometryString.contains("8"))
778  {
780  }
781  else if(theRadiometryString.contains("16"))
782  {
784  }
785  else if (theRadiometryString.contains("11"))
786  {
788  }
789  else if (theRadiometryString.contains("12"))
790  {
792  }
793  else if (theRadiometryString.contains("13"))
794  {
796  }
797  else if (theRadiometryString.contains("14"))
798  {
800  }
801  else if (theRadiometryString.contains("15"))
802  {
804  }
805  else
806  {
808  << MODULE << " Unknown radiometry!"
809  << "\ntheRadiometryString: " << theRadiometryString << std::endl;
810  }
811 
812  if (traceDebug())
813  {
815  << MODULE
816  << "\ntheRadiometryString: " << theRadiometryString
817  << "\ntheNumberOfBands: " << theNumberOfBands
818  << "\nthePixelType: "
820  << "\n";
821  }
822 }
16 bit unsigned integer (15 bits used)
ossim_uint32 theNumberOfBands
Definition: ossimCcfHead.h:162
ossimScalarType thePixelType
Definition: ossimCcfHead.h:163
virtual ossimString getEntryString(ossim_int32 entry_number) const
bool contains(char aChar) const
Definition: ossimString.h:58
16 bit unsigned integer (14 bits used)
16 bit unsigned integer (13 bits used)
static ossimScalarTypeLut * instance()
Returns the static instance of an ossimScalarTypeLut object.
ossimString theRadiometryString
Definition: ossimCcfHead.h:177
16 bit unsigned integer (11 bits used)
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
16 bit unsigned iteger
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
8 bit unsigned iteger
16 bit unsigned integer (12 bits used)

◆ parseV5CcfHeader()

bool ossimCcfHead::parseV5CcfHeader ( std::istream &  is)
private

Parses a version five header.

Definition at line 256 of file ossimCcfHead.cpp.

Referenced by parseCcfHeader().

257 {
258  static const char MODULE[] = "CcfHead::parseV5CcfHeader";
259 
260  // Check the stream.
261  if ( !is )
262  {
263  if (traceDebug())
264  {
266  << MODULE << " Bad Stream passed to method!"
267  << "\nReturning...\n";
268  }
269 
270  return false;
271  }
272 
273  const ossim_uint32 MAX_LEN = 256;
274  char tmp[MAX_LEN];
275 
276  //---
277  // These are all fixed/not used so just skip...
278  //---
279  is.read(tmp, 1); // eat the '\n'
280  is.getline(tmp, MAX_LEN-1, '\n'); // skip "ccf_maker"
281 
282  is >> tmp // "LinesPerChip"
283  >> theLinesPerChip
284  >> tmp // "SamplesPerChip"
286  >> tmp // "LineChipsPerChunk"
288  >> tmp // "SampleChipsPerChunk"
290 
291  is.read(tmp, 1); // eat the '\n'
292  is.getline(tmp, MAX_LEN-1, '\n'); // skip "NumberOfBands"
293  is.getline(tmp, MAX_LEN-1, '\n'); // skip "RectInFullImageSpace"
294 
295  is >> tmp // skip "StartLine"
297  >> tmp // skip "StartSample"
299  >> tmp // skip "StopLine"
301  >> tmp // skip "StopSample"
303 
304  // No valid image vertices in this version.
307 
308  is.read(tmp, 1); // eat the '\n'
309  is.getline(tmp, MAX_LEN-1, '\n'); // skip blank line
310 
311  is >> tmp // skip "FirstBandHeaderPointer"
312  >> theFirstBandHeaderPointer; // Offset to band header.
313 
314  // Seek to the band header record.
315  is.seekg(theFirstBandHeaderPointer, std::ios_base::beg);
316 
317  is.getline(tmp, MAX_LEN-1, '\n'); // skip "BAND" line
318  is.getline(tmp, MAX_LEN-1, '\n'); // skip "NextBandHeaderPointer" line
319  is.getline(tmp, MAX_LEN-1, '\n'); // skip "ChunkMapPointer" line
320 
321  is >> tmp; // skip "Radiometry"
322 
323  is.getline(tmp, MAX_LEN-1, '\n'); // Get the radiometry string.
324  const char* rad = tmp;
325  while ( *rad && (*rad == ' ')) rad++; // Eat the whitespaces...
326  theRadiometryString = rad;
327 
328  is >> tmp // skip "BytesPerPixel"
330  >> tmp // skip "BytesPerChip"
331  >> theBytesPerChip
332  >> tmp // skip "BytesPerChunk"
334  >> tmp // skip "CompressionType"
336  >> tmp // skip "NumberOfRLevels"
338 
340  {
341  // Resize all the vectors.
348  }
349 
350  is.read(tmp, 1); // eat the '\n'
351  is.getline(tmp, MAX_LEN-1, '\n'); // skip blank line
352 
353  ossim_uint32 i;
354  for (i=0; i<theNumberOfRLevels; i++)
355  {
356  is.getline(tmp, MAX_LEN-1, '\n'); // skip the Rlevel line
357 
358  ossim_uint32 tmp_long;
359 
360  is >> tmp // skip "Occupied"
361  >> tmp_long;
362 
363  theOccupiedFlag[i] = tmp_long;
364 
365  is >> tmp // skip "StartOfData"
366  >> tmp_long;
367 
368  theStartOfData[i] = tmp_long;
369 
370  is >> tmp // skip "NumberOfLines"
371  >> tmp_long;
372 
373  theNumberOfLines[i] = tmp_long;
374 
375  is >> tmp // skip "NumberOfSamples"
376  >> tmp_long;
377 
378  theNumberOfSamples[i] = tmp_long;
379 
380  is >> tmp // skip "ChunksInLineDir"
381  >> tmp_long;
382 
383  theChunksInLineDir[i] = tmp_long;
384 
385  is >> tmp // skip "ChunksInSampleDir"
386  >> tmp_long;
387 
388  theChunksInSampleDir[i] = tmp_long;
389 
390  is.getline(tmp, MAX_LEN-1, '\n'); // skip "LineOffset" line
391  is.getline(tmp, MAX_LEN-1, '\n'); // skip "LineDecimation" line
392  is.getline(tmp, MAX_LEN-1, '\n'); // skip "SampleOffset" line
393  is.getline(tmp, MAX_LEN-1, '\n'); // skip "SampleDecimation" line
394  is.read(tmp, 1); // Eat the '\n'
395  is.getline(tmp, MAX_LEN-1, '\n'); // skip blank line
396  is.read(tmp, 1); // Eat the '\n'
397  }
398 
399  // Note: The caller will close the stream.
400 
401  return true;
402 }
ossim_uint32 theLinesPerChip
Definition: ossimCcfHead.h:166
ossim_uint32 theRectInFullImageStopLine
Definition: ossimCcfHead.h:172
ossim_uint32 theNumberOfRLevels
Definition: ossimCcfHead.h:182
ossim_uint32 theRectInFullImageStartLine
Definition: ossimCcfHead.h:170
ossim_uint32 theBytesPerPixel
Definition: ossimCcfHead.h:178
std::vector< ossim_uint32 > theNumberOfSamples
Definition: ossimCcfHead.h:186
std::vector< ossim_uint32 > theNumberOfLines
Definition: ossimCcfHead.h:185
ossim_uint32 theLineChipsPerChunk
Definition: ossimCcfHead.h:168
std::vector< ossim_uint32 > theChunksInSampleDir
Definition: ossimCcfHead.h:188
ossimString theRadiometryString
Definition: ossimCcfHead.h:177
ossimString theCompressionType
Definition: ossimCcfHead.h:181
std::vector< ossimIpt > theValidImageVertices
Definition: ossimCcfHead.h:175
unsigned int ossim_uint32
ossim_uint32 theRectInFuleImageStartSample
Definition: ossimCcfHead.h:171
std::vector< std::streampos > theStartOfData
Definition: ossimCcfHead.h:184
std::vector< ossim_uint32 > theChunksInLineDir
Definition: ossimCcfHead.h:187
ossim_uint32 theFirstBandHeaderPointer
Definition: ossimCcfHead.h:176
ossim_uint32 theNumberOfValidImageVertices
Definition: ossimCcfHead.h:174
ossim_uint32 theRectInFuleImageStopSample
Definition: ossimCcfHead.h:173
ossim_uint32 theSamplesPerChip
Definition: ossimCcfHead.h:167
ossim_uint32 theSampleChipsPerChunk
Definition: ossimCcfHead.h:169
ossim_uint32 theBytesPerChunk
Definition: ossimCcfHead.h:180
ossim_uint32 theBytesPerChip
Definition: ossimCcfHead.h:179
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::vector< bool > theOccupiedFlag
Definition: ossimCcfHead.h:183

◆ parseV6CcfHeader()

bool ossimCcfHead::parseV6CcfHeader ( std::istream &  is)
private

Parses a version six header.

Definition at line 407 of file ossimCcfHead.cpp.

Referenced by parseCcfHeader().

408 {
409  static const char MODULE[] = "CcfHead::parseV6CcfHeader";
410 
411  // Check the stream.
412  if (!is)
413  {
414  if (traceDebug())
415  {
417  << MODULE << " Bad Stream passed to method!"
418  << "\nReturning...\n";
419  }
420 
421  return false;
422  }
423 
424  const ossim_uint32 MAX_LEN = 256;
425  char tmp[MAX_LEN];
426 
427  //***
428  // These are all fixed/not used so just skip...
429  //***
430  is.read(tmp, 1); // eat the '\n'
431  is.getline(tmp, MAX_LEN-1, '\n'); // skip "ccf_maker"
432 
433  is >> tmp // "LinesPerChip"
434  >> theLinesPerChip
435  >> tmp // "SamplesPerChip"
437  >> tmp // "LineChipsPerChunk"
439  >> tmp // "SampleChipsPerChunk"
441 
442  is.read(tmp, 1); // eat the '\n'
443  is.getline(tmp, MAX_LEN-1, '\n'); // skip "NumberOfBands"
444  is.getline(tmp, MAX_LEN-1, '\n'); // skip "RectInFullImageSpace"
445 
446  is >> tmp // skip "StartLine"
448  >> tmp // skip "StartSample"
450  >> tmp // skip "StopLine"
452  >> tmp // skip "StopSample"
454  >> tmp // skip "ValidImageVertices"
456 
457  // Get the valid image vertices.
458  ossim_uint32 i;
459 
461  {
463  }
464 
465  for (i=0; i<theNumberOfValidImageVertices; i++)
466  {
467  ossimString tmp_dbl; // Can be doubles in header.
468 
469  is >> tmp // skip "Vertex"
470  >> tmp // skip Vertex number
471  >> tmp_dbl; // line
472 
473  theValidImageVertices[i].y = static_cast<int>(tmp_dbl.toDouble());
474  tmp_dbl = "";
475  is >> tmp_dbl; // sample
476 
477  theValidImageVertices[i].x = static_cast<int>(tmp_dbl.toDouble());
478  }
479 
480  is.read(tmp, 1); // eat the '\n'
481  is.getline(tmp, MAX_LEN-1, '\n'); // skip blank line
482 
483  is >> tmp // skip "FirstBandHeaderPointer"
484  >> theFirstBandHeaderPointer; // Offset to band header.
485 
486  // Seek to the band header record.
487  is.seekg(theFirstBandHeaderPointer, std::ios_base::beg);
488 
489  is.getline(tmp, MAX_LEN-1, '\n'); // skip "BAND" line
490  is.getline(tmp, MAX_LEN-1, '\n'); // skip "NextBandHeaderPointer" line
491  is.getline(tmp, MAX_LEN-1, '\n'); // skip "ChunkMapPointer" line
492 
493  is >> tmp; // skip "Radiometry"
494 
495  is.getline(tmp, MAX_LEN-1, '\n'); // Get the radiometry string.
496 
497  const char* rad = tmp;
498  while ( *rad && (*rad == ' ')) rad++; // Eat the whitespaces...
499  theRadiometryString = rad;
500 
501  is >> tmp // skip "BytesPerPixel"
503  >> tmp // skip "BytesPerChip"
504  >> theBytesPerChip
505  >> tmp // skip "BytesPerChunk"
507  >> tmp // skip "CompressionType"
509  >> tmp // skip "NumberOfRLevels"
511 
512  if (theNumberOfRLevels > theOccupiedFlag.size())
513  {
514  // Resize all the vectors.
521  }
522 
523  is.read(tmp, 1); // eat the '\n'
524  is.getline(tmp, MAX_LEN-1, '\n'); // skip blank line
525 
526  for (i=0; i<theNumberOfRLevels; i++)
527  {
528  is.getline(tmp, MAX_LEN-1, '\n'); // skip the Rlevel line
529 
530  ossim_uint32 tmp_long;
531 
532  is >> tmp // skip "Occupied"
533  >> tmp_long;
534 
535  theOccupiedFlag[i] = tmp_long;
536 
537  is >> tmp // skip "StartOfData"
538  >> tmp_long;
539 
540  theStartOfData[i] = tmp_long;
541 
542  is >> tmp // skip "NumberOfLines"
543  >> tmp_long;
544 
545  theNumberOfLines[i] = tmp_long;
546 
547  is >> tmp // skip "NumberOfSamples"
548  >> tmp_long;
549 
550  theNumberOfSamples[i] = tmp_long;
551 
552  is >> tmp // skip "ChunksInLineDir"
553  >> tmp_long;
554 
555  theChunksInLineDir[i] = tmp_long;
556 
557  is >> tmp // skip "ChunksInSampleDir"
558  >> tmp_long;
559 
560  theChunksInSampleDir[i] = tmp_long;
561 
562  is.getline(tmp, MAX_LEN-1, '\n'); // skip "LineOffset" line
563  is.getline(tmp, MAX_LEN-1, '\n'); // skip "LineDecimation" line
564  is.getline(tmp, MAX_LEN-1, '\n'); // skip "SampleOffset" line
565  is.getline(tmp, MAX_LEN-1, '\n'); // skip "SampleDecimation" line
566  is.read(tmp, 1); // Eat the '\n'
567  is.getline(tmp, MAX_LEN-1, '\n'); // skip blank line
568  is.read(tmp, 1); // Eat the '\n'
569  }
570 
571  // Note: The caller will close the stream.
572 
573  return true;
574 }
ossim_uint32 theLinesPerChip
Definition: ossimCcfHead.h:166
ossim_uint32 theRectInFullImageStopLine
Definition: ossimCcfHead.h:172
ossim_uint32 theNumberOfRLevels
Definition: ossimCcfHead.h:182
ossim_uint32 theRectInFullImageStartLine
Definition: ossimCcfHead.h:170
ossim_uint32 theBytesPerPixel
Definition: ossimCcfHead.h:178
std::vector< ossim_uint32 > theNumberOfSamples
Definition: ossimCcfHead.h:186
std::vector< ossim_uint32 > theNumberOfLines
Definition: ossimCcfHead.h:185
ossim_uint32 theLineChipsPerChunk
Definition: ossimCcfHead.h:168
std::vector< ossim_uint32 > theChunksInSampleDir
Definition: ossimCcfHead.h:188
ossimString theRadiometryString
Definition: ossimCcfHead.h:177
ossimString theCompressionType
Definition: ossimCcfHead.h:181
std::vector< ossimIpt > theValidImageVertices
Definition: ossimCcfHead.h:175
unsigned int ossim_uint32
ossim_uint32 theRectInFuleImageStartSample
Definition: ossimCcfHead.h:171
std::vector< std::streampos > theStartOfData
Definition: ossimCcfHead.h:184
std::vector< ossim_uint32 > theChunksInLineDir
Definition: ossimCcfHead.h:187
ossim_uint32 theFirstBandHeaderPointer
Definition: ossimCcfHead.h:176
ossim_uint32 theNumberOfValidImageVertices
Definition: ossimCcfHead.h:174
ossim_uint32 theRectInFuleImageStopSample
Definition: ossimCcfHead.h:173
ossim_uint32 theSamplesPerChip
Definition: ossimCcfHead.h:167
ossim_uint32 theSampleChipsPerChunk
Definition: ossimCcfHead.h:169
ossim_uint32 theBytesPerChunk
Definition: ossimCcfHead.h:180
ossim_uint32 theBytesPerChip
Definition: ossimCcfHead.h:179
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::vector< bool > theOccupiedFlag
Definition: ossimCcfHead.h:183

◆ pixelType()

ossimScalarType ossimCcfHead::pixelType ( ) const
inline

Returns the enumerated pixel type.

Definition at line 99 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::fillBuffer(), and ossimCcfTileSource::getOutputScalarType().

99 { return thePixelType; }
ossimScalarType thePixelType
Definition: ossimCcfHead.h:163

◆ print()

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

Outputs theErrorStatus as an ossimErrorCode and an ossimString.

Returns
std::ostream&
Note
Derived classes should only have to implement a virtual print, not an operator<< funtion as it's implemented here.

Reimplemented from ossimErrorStatusInterface.

Definition at line 579 of file ossimCcfHead.cpp.

References ossimLookUpTable::getEntryString(), ossimScalarTypeLut::instance(), m_connectionString, ossimErrorStatusInterface::print(), theBytesPerChip, theBytesPerChunk, theBytesPerPixel, theChunksInLineDir, theChunksInSampleDir, theCompressionType, ossimErrorStatusInterface::theErrorStatus, theFileType, theFirstBandHeaderPointer, theLineChipsPerChunk, theLinesPerChip, theNumberOfBands, theNumberOfLines, theNumberOfRLevels, theNumberOfSamples, theNumberOfValidImageVertices, theOccupiedFlag, thePixelType, theRadiometryString, theRectInFuleImageStartSample, theRectInFuleImageStopSample, theRectInFullImageStartLine, theRectInFullImageStopLine, theSampleChipsPerChunk, theSamplesPerChip, theStartOfData, theValidImageVertices, and theVersionNumber.

580 {
581  static const char MODULE[] = "ossimCcfHead::print";
582 
583  out << MODULE
584  << "\ntheErrorStatus: " << theErrorStatus
585  << "\ntheCcfFile: " << m_connectionString
586  << "\ntheNumberOfBands: " << theNumberOfBands
587  << "\nthePixelType: "
589  << "\ntheFileType: " << theFileType
590  << "\ntheVersionNumber: " << theVersionNumber
591  << "\ntheLinesPerChip: " << theLinesPerChip
592  << "\ntheSamplesPerChip: " << theSamplesPerChip
593  << "\ntheLineChipsPerChunk: " << theLineChipsPerChunk
594  << "\ntheSampleChipsPerChunk: " << theSampleChipsPerChunk
595  << "\ntheRectInFullImageStartLine: " << theRectInFullImageStartLine
596  << "\ntheRectInFuleImageStartSample: " << theRectInFuleImageStartSample
597  << "\ntheRectInFullImageStopLine: " << theRectInFullImageStopLine
598  << "\ntheRectInFuleImageStopSample: " << theRectInFuleImageStopSample
599  << "\ntheNumberOfValidImageVertices: "
601 
602  ossim_uint32 i;
603 
604  for (i=0; i<theNumberOfValidImageVertices; i++)
605  {
606  out << "\ntheValidImageVertices[" << i << "]: "
607  << theValidImageVertices[i];
608  }
609 
610  out << "\ntheFirstBandHeaderPointer: " << theFirstBandHeaderPointer
611  << "\ntheRadiometryString: " << theRadiometryString
612  << "\ntheBytesPerPixel: " << theBytesPerPixel
613  << "\ntheBytestPerChip: " << theBytesPerChip
614  << "\ntheBytesPerChunk: " << theBytesPerChunk
615  << "\ntheCompressionType: " << theCompressionType
616  << "\ntheNumberOfRLevels: " << theNumberOfRLevels;
617 
618  for (i=0; i<theNumberOfRLevels; i++)
619  {
620  out << "\ntheOccupiedFlag[" << i << "]: " << theOccupiedFlag[i]
621  << "\ntheStartOfData[" << i << "]: " << theStartOfData[i]
622  << "\ntheNumberOfLines[" << i << "]: " << theNumberOfLines[i]
623  << "\ntheNumberOfSamples[" << i << "]: " << theNumberOfSamples[i]
624  << "\ntheChunksInLineDir[" << i << "]: " << theChunksInLineDir[i]
625  << "\ntheChunksInSampleDir[" << i << "]: "
626  << theChunksInSampleDir[i];
627  }
628 
629  out << std::endl;
630 
632 }
ossim_uint32 theNumberOfBands
Definition: ossimCcfHead.h:162
ossimScalarType thePixelType
Definition: ossimCcfHead.h:163
ossim_uint32 theLinesPerChip
Definition: ossimCcfHead.h:166
ossim_uint32 theRectInFullImageStopLine
Definition: ossimCcfHead.h:172
ossim_uint32 theNumberOfRLevels
Definition: ossimCcfHead.h:182
ossim_uint32 theRectInFullImageStartLine
Definition: ossimCcfHead.h:170
ossim_uint32 theBytesPerPixel
Definition: ossimCcfHead.h:178
virtual ossimString getEntryString(ossim_int32 entry_number) const
std::vector< ossim_uint32 > theNumberOfSamples
Definition: ossimCcfHead.h:186
virtual std::ostream & print(std::ostream &out) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
std::vector< ossim_uint32 > theNumberOfLines
Definition: ossimCcfHead.h:185
ossim_uint32 theLineChipsPerChunk
Definition: ossimCcfHead.h:168
std::vector< ossim_uint32 > theChunksInSampleDir
Definition: ossimCcfHead.h:188
static ossimScalarTypeLut * instance()
Returns the static instance of an ossimScalarTypeLut object.
ossimString theRadiometryString
Definition: ossimCcfHead.h:177
ossimString theCompressionType
Definition: ossimCcfHead.h:181
std::vector< ossimIpt > theValidImageVertices
Definition: ossimCcfHead.h:175
unsigned int ossim_uint32
ossim_uint32 theRectInFuleImageStartSample
Definition: ossimCcfHead.h:171
std::string m_connectionString
Definition: ossimCcfHead.h:161
std::vector< std::streampos > theStartOfData
Definition: ossimCcfHead.h:184
std::vector< ossim_uint32 > theChunksInLineDir
Definition: ossimCcfHead.h:187
ossimString theFileType
Definition: ossimCcfHead.h:164
ossim_uint32 theFirstBandHeaderPointer
Definition: ossimCcfHead.h:176
ossim_uint32 theNumberOfValidImageVertices
Definition: ossimCcfHead.h:174
ossim_uint32 theRectInFuleImageStopSample
Definition: ossimCcfHead.h:173
ossim_uint32 theSamplesPerChip
Definition: ossimCcfHead.h:167
ossim_uint32 theSampleChipsPerChunk
Definition: ossimCcfHead.h:169
ossim_uint32 theBytesPerChunk
Definition: ossimCcfHead.h:180
ossim_uint32 theBytesPerChip
Definition: ossimCcfHead.h:179
std::vector< bool > theOccupiedFlag
Definition: ossimCcfHead.h:183
ossim_uint32 theVersionNumber
Definition: ossimCcfHead.h:165

◆ radiometry()

ossimString ossimCcfHead::radiometry ( ) const
inline

Returns the radiometry string.

Definition at line 89 of file ossimCcfHead.h.

89 { return theRadiometryString; }
ossimString theRadiometryString
Definition: ossimCcfHead.h:177

◆ sampleChipsPerChunk()

ossim_uint32 ossimCcfHead::sampleChipsPerChunk ( ) const
inline

Returns the number of chips in sample direction of a chunk.

Definition at line 114 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::fillUcharBuffer(), and ossimCcfTileSource::fillUshortBuffer().

114 { return theSampleChipsPerChunk; }
ossim_uint32 theSampleChipsPerChunk
Definition: ossimCcfHead.h:169

◆ samplesPerChip()

ossim_uint32 ossimCcfHead::samplesPerChip ( ) const
inline

Returns the samples per chip.

Definition at line 124 of file ossimCcfHead.h.

Referenced by ossimCcfTileSource::fillUcharBuffer(), and ossimCcfTileSource::fillUshortBuffer().

124 { return theSamplesPerChip; }
ossim_uint32 theSamplesPerChip
Definition: ossimCcfHead.h:167

◆ startOfData()

std::streampos ossimCcfHead::startOfData ( ossim_uint32  reduced_res_level) const

Definition at line 718 of file ossimCcfHead.cpp.

References highestReducedResSet(), ossimNotify(), ossimNotifyLevel_WARN, and theStartOfData.

Referenced by ossimCcfTileSource::fillUcharBuffer(), and ossimCcfTileSource::fillUshortBuffer().

719 {
720  static const char MODULE[] = "ossimCcfHead::startOfData";
721 
722  if (reduced_res_level > highestReducedResSet() )
723  {
724  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " ERROR!"
725  << "\nInvalid reduced res level: " << reduced_res_level
726  << "\nHighest reduced res level available: "
727  << highestReducedResSet() << std::endl;
728  return 0;
729  }
730 
731  return theStartOfData[reduced_res_level];
732 }
std::vector< std::streampos > theStartOfData
Definition: ossimCcfHead.h:184
ossim_uint32 highestReducedResSet() const
Definition: ossimCcfHead.h:71
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

Member Data Documentation

◆ m_ccfStr

std::shared_ptr<ossim::istream> ossimCcfHead::m_ccfStr
private

Definition at line 160 of file ossimCcfHead.h.

Referenced by parseCcfHeader().

◆ m_connectionString

std::string ossimCcfHead::m_connectionString
private

Definition at line 161 of file ossimCcfHead.h.

Referenced by parseCcfHeader(), and print().

◆ theBytesPerChip

ossim_uint32 ossimCcfHead::theBytesPerChip
private

Definition at line 179 of file ossimCcfHead.h.

Referenced by print().

◆ theBytesPerChunk

ossim_uint32 ossimCcfHead::theBytesPerChunk
private

Definition at line 180 of file ossimCcfHead.h.

Referenced by print().

◆ theBytesPerPixel

ossim_uint32 ossimCcfHead::theBytesPerPixel
private

Definition at line 178 of file ossimCcfHead.h.

Referenced by print().

◆ theChunksInLineDir

std::vector<ossim_uint32> ossimCcfHead::theChunksInLineDir
private

Definition at line 187 of file ossimCcfHead.h.

Referenced by chunksInLineDir(), and print().

◆ theChunksInSampleDir

std::vector<ossim_uint32> ossimCcfHead::theChunksInSampleDir
private

Definition at line 188 of file ossimCcfHead.h.

Referenced by chunksInSampleDir(), and print().

◆ theCompressionType

ossimString ossimCcfHead::theCompressionType
private

Definition at line 181 of file ossimCcfHead.h.

Referenced by print().

◆ theFileType

ossimString ossimCcfHead::theFileType
private

Definition at line 164 of file ossimCcfHead.h.

Referenced by parseCcfHeader(), and print().

◆ theFirstBandHeaderPointer

ossim_uint32 ossimCcfHead::theFirstBandHeaderPointer
private

Definition at line 176 of file ossimCcfHead.h.

Referenced by print().

◆ theLineChipsPerChunk

ossim_uint32 ossimCcfHead::theLineChipsPerChunk
private

Definition at line 168 of file ossimCcfHead.h.

Referenced by print().

◆ theLinesPerChip

ossim_uint32 ossimCcfHead::theLinesPerChip
private

Definition at line 166 of file ossimCcfHead.h.

Referenced by print().

◆ theNumberOfBands

ossim_uint32 ossimCcfHead::theNumberOfBands
private

Definition at line 162 of file ossimCcfHead.h.

Referenced by parseRadString(), and print().

◆ theNumberOfLines

std::vector<ossim_uint32> ossimCcfHead::theNumberOfLines
private

Definition at line 185 of file ossimCcfHead.h.

Referenced by numberOfLines(), and print().

◆ theNumberOfRLevels

ossim_uint32 ossimCcfHead::theNumberOfRLevels
private

Definition at line 182 of file ossimCcfHead.h.

Referenced by print().

◆ theNumberOfSamples

std::vector<ossim_uint32> ossimCcfHead::theNumberOfSamples
private

Definition at line 186 of file ossimCcfHead.h.

Referenced by numberOfSamples(), and print().

◆ theNumberOfValidImageVertices

ossim_uint32 ossimCcfHead::theNumberOfValidImageVertices
private

Definition at line 174 of file ossimCcfHead.h.

Referenced by print().

◆ theOccupiedFlag

std::vector<bool> ossimCcfHead::theOccupiedFlag
private

Definition at line 183 of file ossimCcfHead.h.

Referenced by print().

◆ thePixelType

ossimScalarType ossimCcfHead::thePixelType
private

Definition at line 163 of file ossimCcfHead.h.

Referenced by parseRadString(), and print().

◆ theRadiometryString

ossimString ossimCcfHead::theRadiometryString
private

Definition at line 177 of file ossimCcfHead.h.

Referenced by parseRadString(), and print().

◆ theRectInFuleImageStartSample

ossim_uint32 ossimCcfHead::theRectInFuleImageStartSample
private

Definition at line 171 of file ossimCcfHead.h.

Referenced by print().

◆ theRectInFuleImageStopSample

ossim_uint32 ossimCcfHead::theRectInFuleImageStopSample
private

Definition at line 173 of file ossimCcfHead.h.

Referenced by print().

◆ theRectInFullImageStartLine

ossim_uint32 ossimCcfHead::theRectInFullImageStartLine
private

Definition at line 170 of file ossimCcfHead.h.

Referenced by print().

◆ theRectInFullImageStopLine

ossim_uint32 ossimCcfHead::theRectInFullImageStopLine
private

Definition at line 172 of file ossimCcfHead.h.

Referenced by print().

◆ theSampleChipsPerChunk

ossim_uint32 ossimCcfHead::theSampleChipsPerChunk
private

Definition at line 169 of file ossimCcfHead.h.

Referenced by print().

◆ theSamplesPerChip

ossim_uint32 ossimCcfHead::theSamplesPerChip
private

Definition at line 167 of file ossimCcfHead.h.

Referenced by print().

◆ theStartOfData

std::vector<std::streampos> ossimCcfHead::theStartOfData
private

Definition at line 184 of file ossimCcfHead.h.

Referenced by print(), and startOfData().

◆ theValidImageVertices

std::vector<ossimIpt> ossimCcfHead::theValidImageVertices
private

Definition at line 175 of file ossimCcfHead.h.

Referenced by print().

◆ theVersionNumber

ossim_uint32 ossimCcfHead::theVersionNumber
private

Definition at line 165 of file ossimCcfHead.h.

Referenced by parseCcfHeader(), and print().


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