OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimHdf5ImageHandler.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * *
3  * O S S I M *
4  * Open Source, Geospatial Image Processing Project *
5  * License: MIT, see LICENSE at the top-level directory *
6  * *
7  *****************************************************************************/
8 
9 #ifndef ossimHdf5ImageHandler_HEADER
10 #define ossimHdf5ImageHandler_HEADER 1
11 
13 #include <ossim/base/ossimIrect.h>
14 #include <ossim/base/ossimRefPtr.h>
16 #include <ossim/hdf5/ossimHdf5.h>
18 #include <vector>
19 #include <string>
20 #include <mutex>
27 {
28  friend class ossimHdf5ImageDataset;
29 
30 public:
31 
34 
36  virtual ~ossimHdf5ImageHandler();
37 
39  virtual ossimString getShortName() const;
40 
42  virtual ossimString getLongName() const;
43 
45  virtual ossimString getClassName() const;
46 
53  ossim_uint32 resLevel=0);
66  virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
67 
72  virtual ossim_uint32 getNumberOfInputBands() const;
73 
79  virtual ossim_uint32 getNumberOfOutputBands()const;
80 
85  virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
86 
91  virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
92 
97  virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
98 
103  virtual bool saveState(ossimKeywordlist& kwl,
104  const char* prefix=0)const;
105 
110  virtual bool loadState(const ossimKeywordlist& kwl,
111  const char* prefix=0);
112 
116  virtual ossimScalarType getOutputScalarType() const;
117 
124  virtual ossim_uint32 getImageTileWidth() const;
125 
132  virtual ossim_uint32 getImageTileHeight() const;
133 
134  virtual bool isOpen() const;
135 
137  virtual void close();
138  virtual void loadMetaData();
142  virtual ossim_uint32 getNumberOfEntries()const;
143 
156  virtual void getEntryNames(std::vector<ossimString>& entryNames) const;
157 
163  virtual void getEntryList(std::vector<ossim_uint32>& entryList) const;
164 
165  virtual bool setCurrentEntry(ossim_uint32 entryIdx);
166 
170  virtual ossim_uint32 getCurrentEntry() const;
171 
172  ossimRefPtr<ossimHdf5ImageDataset> getCurrentDataset();
173 
175  virtual double getNullPixelValue(ossim_uint32 band=0) const;
176  virtual double getMaxPixelValue(ossim_uint32 band=0) const;
177  virtual double getMinPixelValue(ossim_uint32 band=0) const;
178 
188  virtual void setProperty(ossimRefPtr<ossimProperty> property);
189 
194  virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name) const;
195 
200  virtual void getPropertyNames(std::vector<ossimString>& propertyNames) const;
201 
206  virtual bool open();
207 
208  const std::vector<ossimString>& getRenderableSetNames() { return m_renderableNames; }
209 
212  void addRenderable(const ossimString& datasetName) { m_renderableNames.push_back(datasetName); }
213 
214 protected:
216  void allocate();
217 
218  std::vector<ossimString> m_renderableNames;
220  std::vector<ossimRefPtr<ossimHdf5ImageDataset> > m_entries;
223  std::mutex m_mutex;
224 
225  TYPE_DATA
226 };
227 
228 #endif /* #ifndef ossimH5Reader_HEADER */
virtual bool open()=0
Pure virtual open.
void addRenderable(const ossimString &datasetName)
Adds the dataset name, either the full HDF5 path or the simple object name, to the list of renderable...
ossimRefPtr< ossimImageData > m_tile
std::vector< ossimRefPtr< ossimHdf5ImageDataset > > m_entries
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual void getEntryNames(std::vector< ossimString > &entryNames) const
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.
This is the base class for all imagery using HDF5 as the file format.
virtual ossimString getClassName() const
Definition: ossimObject.cpp:64
Class encapsulates a HDF5 Data set that can be loaded as an image.
ossimRefPtr< ossimHdf5 > m_hdf5
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual ossimString getShortName() const
Definition: ossimObject.cpp:48
virtual bool isOpen() const =0
Derived classes must implement this method to be concrete.
virtual double getMinPixelValue(ossim_uint32 band=0) const
Retuns the min pixel value.
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
#define TYPE_DATA
Definition: ossimRtti.h:339
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
const std::vector< ossimString > & getRenderableSetNames()
virtual void close()
Deletes the overview and clears the valid image vertices.
virtual ossim_uint32 getCurrentEntry() const
virtual ossimIrect getImageRectangle(ossim_uint32 resLevel=0) const
Returns zero-based bounding rectangle of the image.
virtual ossim_uint32 getNumberOfEntries() const
virtual void getEntryList(std::vector< ossim_uint32 > &entryList) const
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.
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...
virtual void loadMetaData()
There is an external file with an omd extension.
#define OSSIM_DLL
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual ossim_uint32 getNumberOfInputBands() const =0
virtual bool setCurrentEntry(ossim_uint32 entryIdx)
std::vector< ossimString > m_renderableNames
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)