OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimBitMaskWriter.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: ossimBitMaskWriter.h 2644 2011-05-26 15:20:11Z oscar.kramer $
11 
12 #ifndef ossimBitMaskWriter_HEADER
13 #define ossimBitMaskWriter_HEADER
14 
15 #include <ossim/base/ossimRefPtr.h>
16 #include <ossim/base/ossimIpt.h>
20 #include <vector>
21 
22 class ossimFilename;
23 class ossimKeywordlist;
24 class ossimImageHandler;
26 
27 //*************************************************************************************************
68 //*************************************************************************************************
70 {
71 public:
72  static const char* BM_STARTING_RLEVEL_KW;
73  static const char* MASK_FILE_MAGIC_NUMBER;
74 
77 
79 
81  void setBogusPixel(double pixel_value);
82 
84  void setBogusPixelRange(double min, double max);
85 
87  void setStartingResLevel(ossim_uint32 res_level) { m_startingResLevel = res_level; }
88 
91  void generateMask(ossimRefPtr<ossimImageData> tile, ossim_uint32 rLevel);
92 
97  bool buildOverviews(ossim_uint32 total_num_rlevels);
98 
101  virtual bool loadState(const ossimKeywordlist& spec, const char* prefix=0);
102 
103  virtual bool isOpen() const;
104  virtual bool open();
105  virtual void close();
106 
107  virtual bool canConnectMyInputTo(ossim_int32 myInputIndex,
108  const ossimConnectableObject* object) const;
109  virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject,
110  bool makeOutputConnection=true,
111  bool createEventFlag=true);
112 
113 protected:
115 
117  void initializeFlipper();
118 
120  void reset();
121 
124  ossimIpt computeImageSize(ossim_uint32 rlevel, ossimImageData* tile) const;
125 
128  vector<ossim_uint8 *> m_buffers;
129  vector<ossimIpt> m_bufferSizes;
132 };
133 
134 #endif
135 
ossimIpt m_imageSize
Size of full res source image.
virtual void close()=0
static const char * BM_STARTING_RLEVEL_KW
Represents serializable keyword/value map.
vector< ossimIpt > m_bufferSizes
ossim_uint32 m_startingResLevel
static const char * MASK_FILE_MAGIC_NUMBER
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
vector< ossim_uint8 * > m_buffers
ossimRefPtr< ossimMemoryImageSource > m_memoryImage
unsigned int ossim_uint32
This is the image handler for providing mask pixels to an ossimMaskFilter object. ...
Class for computing a mask from an input image source and writing the mask file to disk...
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.
virtual bool isOpen() const =0
ossimRefPtr< ossimPixelFlipper > m_flipper
This class defines an abstract Handler which all image handlers(loaders) should derive from...
#define max(a, b)
Definition: auxiliary.h:76
#define OSSIM_DLL
virtual bool open()=0
virtual bool canConnectMyInputTo(ossim_int32 myInputIndex, const ossimConnectableObject *object) const =0
required to be overriden by derived classes
void setStartingResLevel(ossim_uint32 res_level)
Sets the starting resolution level for the mask.
#define min(a, b)
Definition: auxiliary.h:75
int ossim_int32