OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimHdf5ImageDataset.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: OSSIM HDF5 Image DataSet.
10 //
11 //----------------------------------------------------------------------------
12 // $Id
13 
14 #ifndef ossimHdf5ImageDataset_HEADER
15 #define ossimHdf5ImageDataset_HEADER 1
16 
18 #include <ossim/base/ossimIrect.h>
19 #include <iosfwd>
20 #include <string>
21 #include <ossim/hdf5/ossimHdf5.h>
23 #include <ossim/base/ossimRefPtr.h>
24 
25 // Forward class declarations:
26 class ossimImageData;
27 class ossimEndian;
28 class ossimIpt;
29 class ossimIrect;
31 
36 {
37 public:
40 
43 
46 
48  void close();
49 
51 
56  bool initialize( const H5::DataSet& dataset);
57 
65  const H5::DataSet* getDataset() const;
66 
74  H5::DataSet* getDataset();
75 
77  std::string getName() const;
78 
81 
83  ossim_uint32 getNumberOfBands() const;
84 
86  ossim_uint32 getNumberOfLines() const;
87 
89  ossim_uint32 getNumberOfSamples() const;
90 
92  bool getSwapFlag() const;
93 
94  const ossimIpt& getSubImageOffset() const;
95 
96  const ossimIrect& getValidImageRect() const;
97 
98  double getMaxPixelValue(ossim_uint32 band=0) const;
99  double getMinPixelValue(ossim_uint32 band=0) const;
100 
101  bool isMinPixelSet()const;
102  bool isMaxPixelSet()const;
103 
116  void getTileBuf(void* buffer, const ossimIrect& rect, ossim_uint32 band, bool scale=true);
117 
118 
123  std::ostream& print(std::ostream& out) const;
124 
126  const ossimHdf5ImageDataset& obj);
127 private:
129  bool determineExtents();
130  bool scanForValidImageRect();
131  bool determineScalarType();
132  bool scanForMinMax();
133 
136  H5::DataSet m_dataset;
137  H5::DataSpace m_dataSpace;
142  ossimEndian* m_endian; // For byte swapping if needed.
143  std::vector<ossim_float32> m_minValue;
144  std::vector<ossim_float32> m_maxValue;
145 
146 
149  ossimIrect m_validRect; // image rect offset relative to full image
150 
151 }; // End: class ossimH5ImageDataset
152 
153 #endif /* #ifndef ossimH5ImageDataset_HEADER */
#define OSSIMDLLEXPORT
ossimReferenced allows for shared object ref counting if the reference count ever gets to 0 or less i...
This is the base class for all imagery using HDF5 as the file format.
ossimScalarType getScalarType(const H5::DataSet *dataset)
Class encapsulates a HDF5 Data set that can be loaded as an image.
std::ostream & print(H5::H5File *file, std::ostream &out)
Print method.
Definition: ossimH5Util.cpp:41
ossimIrect m_validRect
H5 data can have null rows on the front or end.
ossimRefPtr< ossimHdf5 > m_hdf5
ostream & operator<<(ostream &out, const ossimAxes &axes)
Definition: ossimAxes.h:88
unsigned int ossim_uint32
std::vector< ossim_float32 > m_maxValue
ossimScalarType
ossimReferenced & operator=(const ossimReferenced &)
#define OSSIM_DLL
std::vector< ossim_float32 > m_minValue
ossimRefPtr< ossimHdf5ImageHandler > m_handler
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23