OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimCcfTileSource.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: MIT
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: David Burken
8 //
9 // Description:
10 //
11 // Contains class declaration for CcfTileSource.
12 //
13 // A ccf (Chip Chunk Format) is a double tiled format. Image data is
14 // arranged in chips and chunks. Each chip is 32 x 32 pixels. Each chunk
15 // is 8 x 8 chips for a single band image. Bands are interleaved by chip
16 // so a rgb image has a red chip a green chip, then a blue chip which
17 // would make the chunk 24 x 8 chips.
18 //
19 //*******************************************************************
20 // $Id: ossimCcfTileSource.h 16075 2009-12-10 15:46:43Z gpotts $
21 
22 #ifndef ossimCcfTileSource_HEADER
23 #define ossimCcfTileSource_HEADER
24 
25 #include <fstream>
26 
29 
30 class ossimImageData;
31 
33 {
34 public:
35 
37 
38  virtual ossimString getShortName()const;
39  virtual ossimString getLongName()const;
40 
49  virtual bool open();
50 
51  virtual void close();
52 
54  ossim_uint32 resLevel=0);
55 
68  virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
69 
74  virtual ossim_uint32 getNumberOfInputBands() const;
75  virtual ossim_uint32 getNumberOfOutputBands()const;
76 
82  ossim_uint32 reduced_res_level = 0) const;
83 
89  ossim_uint32 reduced_res_level = 0) const;
90 
97 
103  ossim_uint32 reduced_res_level = 0) const;
104 
109  bool setOutputBandList(const vector<ossim_uint32>& outputBandList);
110 
115  virtual bool saveState(ossimKeywordlist& kwl,
116  const char* prefix=0)const;
117 
122  virtual bool loadState(const ossimKeywordlist& kwl,
123  const char* prefix=0);
124 
128  virtual ossimScalarType getOutputScalarType() const;
129 
133  virtual ossim_uint32 getTileWidth() const;
134 
138  virtual ossim_uint32 getTileHeight() const;
139 
146  virtual ossim_uint32 getImageTileWidth() const;
147 
154  virtual ossim_uint32 getImageTileHeight() const;
155 
156  virtual bool isOpen()const;
157 
164  const ossimString& name)const;
165 
170  virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
171 
172 
173 protected:
174  virtual ~ossimCcfTileSource();
175 
176  void initVerticesFromHeader();
177 
178  // Disallow these...
179  ossimCcfTileSource(const ossimCcfTileSource& source);
181 
185  bool fillBuffer(const ossimIrect& tile_rect,
186  const ossimIrect& clip_rect,
187  const ossimIrect& image_rect,
188  ossim_uint32 reduced_res_level,
189  ossimImageData* tile);
190 
194  bool fillUshortBuffer(const ossimIrect& tile_rect,
195  const ossimIrect& clip_rect,
196  const ossimIrect& image_rect,
197  ossim_uint32 reduced_res_level,
198  ossimImageData* tile);
199 
203  bool fillUcharBuffer(const ossimIrect& tile_rect,
204  const ossimIrect& clip_rect,
205  const ossimIrect& image_rect,
206  ossim_uint32 reduced_res_level,
207  ossimImageData* tile);
208 
212  void adjustToStartOfChunk(ossimIpt& pt) const;
213 
217  void adjustToStartOfChip(ossimIpt& pt) const;
218 
219  bool isEcgGeom(const ossimFilename& filename)const;
220 
225  vector<ossim_uint32> theOutputBandList;
227 
228 
229 TYPE_DATA
230 };
231 
232 #endif
virtual bool open()=0
Pure virtual open.
vector< ossim_uint32 > theOutputBandList
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
const ossimImageSource & operator=(const ossimImageSource &)
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
virtual ossimString getShortName() const
Definition: ossimObject.cpp:48
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
virtual ossim_uint32 getNumberOfDecimationLevels() const
This returns the total number of decimation levels.
virtual bool isOpen() const =0
Derived classes must implement this method to be concrete.
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
#define TYPE_DATA
Definition: ossimRtti.h:339
ossimRefPtr< ossimImageData > theTile
virtual ossim_uint32 getImageTileHeight() const =0
Returns the tile width of the image or 0 if the image is not tiled.
unsigned int ossim_uint32
virtual ossimString getLongName() const
Definition: ossimObject.cpp:53
virtual void close()
Deletes the overview and clears the valid image vertices.
virtual ossimIrect getImageRectangle(ossim_uint32 resLevel=0) const
Returns zero-based bounding rectangle of the image.
ossimScalarType
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual ossim_uint32 getImageTileWidth() const =0
Returns the tile width of the image or 0 if the image is not tiled.
ossim_uint8 * theChipBuffer
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
This class defines an abstract Handler which all image handlers(loaders) should derive from...
#define OSSIM_DLL
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual ossim_uint32 getNumberOfInputBands() const =0
virtual bool setOutputBandList(const std::vector< ossim_uint32 > &band_list)
If the image handler "isBandSeletor()" then the band selection of the output chip can be controlled...
unsigned char ossim_uint8
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
int ossim_int32
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)