OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimBitMaskTileSource.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: Oscar Kramer
8 //
9 //*******************************************************************
10 // $Id: ossimBitMaskTileSource.h 2644 2011-05-26 15:20:11Z oscar.kramer $
11 
12 #ifndef ossimBitMaskTileSource_HEADER
13 #define ossimBitMaskTileSource_HEADER
14 
17 
18 class ossimImageGeometry;
19 
20 //*************************************************************************************************
62 //*************************************************************************************************
63 
65 {
66 public:
67 
69 
72  virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect, ossim_uint32 rLevel=0);
73 
74  virtual bool isValidRLevel (ossim_uint32 res_level) const;
75  virtual ossim_uint32 getNumberOfLines (ossim_uint32 res_level=0) const;
76  virtual ossim_uint32 getNumberOfSamples(ossim_uint32 res_level=0) const;
77 
78  virtual ossim_uint32 getNumberOfInputBands() const { return 1; }
79  virtual ossim_uint32 getNumberOfOutputBands() const { return 1; }
80  virtual ossimScalarType getOutputScalarType() const { return OSSIM_UINT8; }
81  virtual ossim_uint32 getImageTileWidth() const { return 0; }
82  virtual ossim_uint32 getImageTileHeight() const { return 0; }
83 
84  virtual bool isOpen() const;
85  virtual bool open();
86  virtual void close();
87 
88  virtual double getNullPixelValue(ossim_uint32 /*band=0*/) const { return 0; }
89  virtual double getMinPixelValue (ossim_uint32 /*band=0*/) const { return 0; }
90  virtual double getMaxPixelValue (ossim_uint32 /*band=0*/) const { return 1.0; }
91 
95 
98 
101  void setAssociatedImageHandler(ossimImageHandler* handler);
102 
106  void setAssociatedMaskWriter(ossimBitMaskWriter* maskWriter);
107 
108 protected:
109  virtual ~ossimBitMaskTileSource();
110 
112  bool isSupportedExtension();
113 
114  virtual void establishDecimationFactors();
115 
117  vector<ossim_uint8*> m_buffers;
118  vector<ossimIpt> m_bufferSizes;
119 
123 
128 
129  TYPE_DATA
130 };
131 
132 #endif
133 
virtual ossim_uint32 getNumberOfInputBands() const
virtual bool open()=0
Pure virtual open.
virtual ossim_uint32 getImageTileHeight() const
Returns the tile width of the image or 0 if the image is not tiled.
virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual double getNullPixelValue(ossim_uint32) const
Each band has a null pixel associated with it.
ossimRefPtr< ossimImageHandler > m_handler
For backward compatibility with older mask format ("Ming Mask"), provide for associating the mask wit...
virtual ossim_uint32 getNumberOfDecimationLevels() const
This returns the total number of decimation levels.
virtual bool isValidRLevel(ossim_uint32 resLevel) const
Determines if the passed in reslution level is valid.
virtual bool isOpen() const =0
Derived classes must implement this method to be concrete.
vector< ossimIpt > m_bufferSizes
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
This is the image handler for providing mask pixels to an ossimMaskFilter object. ...
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual void close()
Deletes the overview and clears the valid image vertices.
Class for computing a mask from an input image source and writing the mask file to disk...
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual void establishDecimationFactors()
Virtual method determines the decimation factors at each resolution level.
virtual double getMaxPixelValue(ossim_uint32) const
Returns the max pixel of the band.
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
ossimScalarType
ossimRefPtr< ossimImageData > m_tile
This class defines an abstract Handler which all image handlers(loaders) should derive from...
ossimRefPtr< ossimBitMaskWriter > m_maskWriter
This class can be used during overview generation, in which case there will be a simultaneous mask wr...
#define OSSIM_DLL
virtual ossim_uint32 getImageTileWidth() const
Returns the tile width of the image or 0 if the image is not tiled.
virtual double getMinPixelValue(ossim_uint32) const
Retuns the min pixel value.
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
8 bit unsigned integer
vector< ossim_uint8 * > m_buffers
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)