OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAdrgHeader.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Ken Melero
6 // Description: This class encapsulates the image parameters and
7 // support data for a ADRG image file(s).
8 //
9 //********************************************************************
10 // $Id: ossimAdrgHeader.h 10266 2007-01-14 19:27:14Z dburken $
11 
12 #ifndef ossimAdrgHeader_H
13 #define ossimAdrgHeader_H
14 
17 #include <ossim/base/ossimIrect.h>
18 
20 {
21 public:
22  // Instantiated with the image file (.img)
23  ossimAdrgHeader(const ossimFilename& img_file);
24  ~ossimAdrgHeader();
25 
27  {
28  OSSIM_OK = 0,
29  OSSIM_ERROR = 1
30  };
31 
32  enum
33  {
34  ADRG_TILE_SIZE = 128
35  };
36 
37  int errorStatus() const { return theErrorStatus; }
38 
40  const { return theHeaderFile; }
42  const { return theImageFile; }
44  const { return theValidImageRect; }
45 
46  ossim_uint32 pixelType() const { return thePixelType; }
47  ossim_uint32 interleaveType() const { return theInterleaveType; }
48  ossim_uint32 numberOfBands() const { return theNumberOfBands; }
49  ossim_uint32 lines() const { return theLines; }
50  ossim_uint32 tlines() const { return theLinesInTiles; }
51  ossim_uint32 samples() const { return theSamples; }
52  ossim_uint32 tsamples() const { return theSamplesInTiles; }
53  ossim_uint32 headerSize() const { return theHeaderSize; }
54  ossim_uint32 startRow() const { return theStartRow; }
55  ossim_uint32 startCol() const { return theStartCol; }
56  ossim_uint32 stopRow() const { return theStopRow; }
57  ossim_uint32 stopCol() const { return theStopCol; }
58 
59  ossim_uint32 tim(ossim_uint32 row, ossim_uint32 col) const;
60 
61  ossimString minLon() const { return theMinLon; }
62  ossimString minLat() const { return theMinLat; }
63  ossimString maxLon() const { return theMaxLon; }
64  ossimString maxLat() const { return theMaxLat; }
65 
66  double minLongitude() const;
67  double minLatitude() const;
68  double maxLongitude() const;
69  double maxLatitude() const;
70 
72  const ossimAdrgHeader& adrg);
73 
74 private:
75 
76  // Returns the longitude in decimal degrees given the formatted string.
77  double parseLongitudeString(const ossimString& lon) const;
78 
79  // Returns the latitude in decimal degrees given the formatted string.
80  double parseLatitudeString(const ossimString& lat) const;
81 
82  // prevent use.
84  ossimAdrgHeader(const ossimAdrgHeader& source);
85 
87 
91 
104  ossim_uint32* theTim; // Tile index map value -- only valid if TIF is 'Y'.
105 
110  ossimString theTif; // Tile index map flag -- Y indicates there are tiles
111  // with no data; N indicates that all tiles contain
112  // RGB graphic data.
113 
114  void parse();
115 };
116 
117 #endif
ossim_uint32 startRow() const
ossim_uint32 theSamplesInTiles
int errorStatus() const
ossimFilename file() const
ossimString minLon() const
ossim_uint32 pixelType() const
ossimString theMinLon
ossimString theMaxLon
ossimString minLat() const
ossim_uint32 numberOfBands() const
ossimFilename theImageFile
ossim_uint32 startCol() const
ossimString theTif
ostream & operator<<(ostream &out, const ossimAxes &axes)
Definition: ossimAxes.h:88
ossim_uint32 tsamples() const
ossimFilename imageFile() const
ossim_uint32 thePixelType
ossim_uint32 lines() const
unsigned int ossim_uint32
ossimString maxLat() const
ErrorStatus theErrorStatus
ossim_uint32 stopCol() const
ossim_uint32 * theTim
ossim_uint32 theStopCol
ossim_uint32 theStartCol
ossim_uint32 theLines
ossim_uint32 theStartRow
ossim_uint32 theStopRow
ossim_uint32 theInterleaveType
#define OSSIM_DLL
ossim_uint32 tlines() const
ossimString theMaxLat
ossim_uint32 theHeaderSize
ossimString theMinLat
ossim_uint32 theNumberOfBands
ossimIrect validImageRect() const
ossim_uint32 theLinesInTiles
ossim_uint32 theSamples
ossimFilename theHeaderFile
ossim_uint32 stopRow() const
ossimString maxLon() const
ossimIrect theValidImageRect
ossim_uint32 samples() const
ossim_uint32 headerSize() const
ossim_uint32 interleaveType() const
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23