41 static const ossimTrace traceDebug(
"ossimHdf5ImageHandler:debug");
48 static const string LAYER_KW =
"layer";
152 vector<char> dataBuffer(clipRectSizeInBytes);
168 if ( float_buffer[i] < -999.0 )
169 float_buffer[i] = NP;
174 result->
loadBand((
void*)&dataBuffer.front(), clipRect, band);
204 const char* prefix)
const 228 static const char* M =
"ossimHdf5ImageHandler::open(filename) -- ";
252 vector<H5::DataSet> datasetList;
257 if ( datasetList.empty() )
266 std::vector<H5::DataSet>::iterator dataset = datasetList.begin();
267 while (dataset != datasetList.end())
282 datasetList.erase(dataset);
292 << datasetList[i].getObjName() <<
"\n";
295 if ( datasetList.empty() )
302 std::vector<H5::DataSet>::iterator dataset = datasetList.begin();
303 while (dataset != datasetList.end())
322 std::vector<ossimHdf5ImageDataset>::const_iterator i =
m_entries.begin();
325 std::cout << (*i) << endl;
338 if (reduced_res_level == 0)
354 if (reduced_res_level == 0)
450 entryNames.push_back(
m_entries[i]->getName());
457 entryList.resize( SIZE );
538 if ( !property.
valid() )
544 property->valueToString(s);
563 if ( name.
string() == LAYER_KW )
virtual void loadBand(const void *src, const ossimIrect &src_rect, ossim_uint32 band)
void clear()
Erases the entire container.
bool initialize(const H5::DataSet &dataset)
Opens datasetName and initializes all data members on success.
virtual bool isSourceEnabled() const
ossimRefPtr< ossimImageGeometry > theGeometry
void allocate()
Allocates the tile.
ossimRefPtr< ossimImageData > m_tile
virtual ossim_uint32 getNumberOfBands() const
std::vector< ossimRefPtr< ossimHdf5ImageDataset > > m_entries
virtual ossim_uint32 getNumberOfEntries() const
ossimFilename theImageFile
virtual void setImageRectangle(const ossimIrect &rect)
bool getRoot(H5::Group &root) const
Assigns the root group.
virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level=0) const
Returns the zero based image rectangle for the reduced resolution data set (rrds) passed in...
Represents serializable keyword/value map.
ossimFilename expand() const
Method to do file name expansion.
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.
virtual bool open()
The derived class needs to initialize the raster dataset names m_renderableNames in their constructor...
This is the base class for all imagery using HDF5 as the file format.
bool contains(char aChar) const
ossimScalarType getScalarType(const H5::DataSet *dataset)
const ossimIpt & ul() const
virtual ossimDataObjectStatus getDataObjectStatus() const
ossimRefPtr< ossimHdf5 > m_hdf5
virtual double getMinPixelValue(ossim_uint32 band=0) const
Retuns the min pixel value.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossimString getShortName() const
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual ossim_uint32 getImageTileWidth() const
Returns the tile width of the image or 0 if the image is not tiled.
const ossimIpt & ll() const
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
bool open(const ossimFilename &hdf5File)
Opens specified HDF5 file.
void ref() const
increment the reference count by one, indicating that this object has another pointer which is refere...
virtual void initialize()
Initialize the data buffer.
virtual bool isValidRLevel(ossim_uint32 resLevel) const
Determines if the passed in reslution level is valid.
virtual double getMinPixelValue(ossim_uint32 band=0) const
Retuns the min pixel value.
bool completely_within(const ossimIrect &rect) const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
virtual ~ossimHdf5ImageHandler()
virtual destructor
virtual bool getOverviewTile(ossim_uint32 resLevel, ossimImageData *result)
Method to get an overview tile.
static ossimImageDataFactory * instance()
ossimHdf5ImageHandler()
default constructor
bool close()
Closes the file and deletes all pointers.
virtual ossimDataObjectStatus validate() const
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &rect, ossim_uint32 resLevel=0)
Returns a pointer to a tile given an origin representing the upper left corner of the tile to grab fr...
virtual ossimString getClassName() const
virtual ossim_uint32 getNumberOfInputBands() const
Returns the number of bands in the image.
virtual void loadMetaData()
There is an external file with an omd extension.
unsigned int ossim_uint32
virtual ossim_uint32 getCurrentEntry() const
virtual ossimIrect getImageRectangle() const
vector< ossimIpt > theValidImageVertices
OSSIM_DLL ossim_uint32 scalarSizeInBytes(ossimScalarType scalarType)
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
Get propterty names.
const ossimIpt & lr() const
virtual void close()
Deletes the overview and clears the valid image vertices.
friend class ossimHdf5ImageDataset
virtual void close()
Close method.
ossimRefPtr< ossimHdf5ImageDataset > getCurrentDataset()
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossimIrect clipToRect(const ossimIrect &rect) const
virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level=0) const
Returns the number of lines in the image.
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
virtual bool setCurrentEntry(ossim_uint32 entryIdx)
ossim_uint32 m_currentEntry
const ossimIpt & ur() const
void unref() const
decrement the reference count by one, indicating that a pointer to this object is referencing it...
Low-level OSSIM interface to HDF5 libraries.
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual void makeBlank()
Initializes data to null pixel values.
virtual void completeOpen()
Will complete the opening process.
ossimRefPtr< ossimImageHandler > theOverview
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
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.
virtual void getEntryNames(std::vector< ossimString > &entryNames) const
Get the name of entry as a string.
ossim_uint32 area() const
ossimFilename theOverviewFile
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level=0) const
Returns the number of samples in the image.
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual ossimString getLongName() const
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
#define RTTI_DEF1(cls, name, b1)
virtual double getNullPixelValue(ossim_uint32 band=0) const
static bool getNdimDatasets(H5::Group group, std::vector< H5::DataSet > &datasetList, bool recursive=false)
Assigns list of all multi-dimensional datasets under current active group.
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
Get propterty method.
virtual ossimScalarType getOutputScalarType() const
Returns the output pixel type of the tile source.
std::vector< ossimString > m_renderableNames
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual ossim_uint32 getImageTileHeight() const
Returns the tile width of the image or 0 if the image is not tiled.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual void setProperty(ossimRefPtr< ossimProperty > property)
Set propterty method.
const ossimString & getName() const
virtual void getEntryList(std::vector< ossim_uint32 > &entryList) const
const std::string & string() const