OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimOverviewSequencer.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: David Burken
6 //
7 // Description: Class definition for sequencer for building overview files.
8 //
9 //----------------------------------------------------------------------------
10 // $Id: ossimOverviewSequencer.h 22149 2013-02-11 21:36:10Z dburken $
11 #ifndef ossimOverviewSequencer_HEADER
12 #define ossimOverviewSequencer_HEADER 1
13 
16 #include <ossim/base/ossimIpt.h>
22 #include <string>
23 #include <vector>
24 
26 
32 
33 {
34 public:
35 
38 
42  ossim_uint32 getNumberOfTiles()const;
43 
47  ossim_uint32 getNumberOfTilesHorizontal()const;
48 
52  ossim_uint32 getNumberOfTilesVertical()const;
53 
60  virtual void getOutputImageRectangle(ossimIrect& rect) const;
61 
67  void setImageHandler(ossimImageHandler* input);
68 
74  void setBitMaskObjects(ossimBitMaskWriter* mask_writer,
75  ossimMaskFilter* mask_filter);
76 
81  void setSourceLevel(ossim_uint32 level);
82 
87  ossimHistogramMode getHistogramMode() const;
88 
93  void setHistogramMode(ossimHistogramMode mode);
94 
98  void writeHistogram();
99 
104  void writeHistogram(const ossimFilename& file);
105 
115  virtual void initialize();
116 
122  virtual void setToStartOfSequence();
123 
137  virtual ossimRefPtr<ossimImageData> getNextTile();
138 
143  virtual void slaveProcessTiles();
144 
148  virtual bool isMaster()const;
149 
151  ossimIpt getTileSize() const;
152 
159  void setTileSize(const ossimIpt& pt);
160 
170  void setResampleType(
172 
178  void setScanForMinMax(bool flag);
179 
181  bool getScanForMinMax() const;
182 
189  void setScanForMinMaxNull(bool flag);
190 
192  bool getScanForMinMaxNull() const;
193 
207  bool writeOmdFile(const std::string& file);
208 
209 protected:
210 
212  virtual ~ossimOverviewSequencer();
213 
219  void getInputTileRectangle(ossimIrect& inputRect) const;
220 
226  void getOutputTileRectangle(ossimIrect& outputRect) const;
227 
233  void updateTileDimensions();
234 
238  void resampleTile(const ossimImageData* inputTile);
239 
240  template <class T> void resampleTile(const ossimImageData* inputTile,
241  T dummy);
242 
244  void clearMinMaxNullArrays();
245 
255 
258 
261 
264 
267 
269 
271 
278 
282 
284  std::vector<ossim_float64> m_minValues;
285  std::vector<ossim_float64> m_maxValues;
286  std::vector<ossim_float64> m_nulValues;
287 };
288 
289 #endif /* #ifndef ossimOverviewSequencer_HEADER */
std::vector< ossim_float64 > m_maxValues
ossimHistogramMode
ossim_int32 m_decimationFactor
TODO make this handle any decimation.
ossim_uint32 m_histoTileIndex
Used to determine which tiles to accumulate a histogram from.
ossimRefPtr< ossimImageData > m_tile
ossimReferenced allows for shared object ref counting if the reference count ever gets to 0 or less i...
ossimRefPtr< ossimImageHandler > m_imageHandler
ossimRefPtr< ossimBitMaskWriter > m_maskWriter
std::vector< ossim_float64 > m_nulValues
std::vector< ossim_float64 > m_minValues
Arrays o hold the min value for each band for scan min/max methods.
ossimFilterResampler::ossimFilterResamplerType m_resampleType
Currently only handles NEAREST_NEIGHBOR and BOX (default = BOX)
bool m_dirtyFlag
Dirty flag - if true, this object is not initialized.
ossimRefPtr< ossimMaskFilter > m_maskFilter
bool m_scanForMinMax
Control flags for min, max, null scanning.
unsigned int ossim_uint32
ossimRefPtr< ossimMultiBandHistogram > m_histogram
ossim_uint32 m_sourceResLevel
This is the resolution level to build overviews from.
Class for computing a mask from an input image source and writing the mask file to disk...
This class defines an abstract Handler which all image handlers(loaders) should derive from...
#define OSSIM_DLL
ossimHistogramMode m_histoMode
int ossim_int32