23 #ifdef OSSIM_ID_ENABLED 24 static const char OSSIM_ID[] =
"$Id";
27 static ossimTrace traceDebug(
"ossimHdfReader:debug");
33 return (fabs(left - right) < epsilon);
42 m_currentEntryRender(0),
106 static const char MODULE[] =
"ossimHdfReader::open";
111 << MODULE <<
" entered...\n" 138 std::vector<ossimString> entryStringList;
145 if (entryStringList.size() > 0)
147 for (
ossim_uint32 i = 0; i < entryStringList.size(); i++)
184 << MODULE <<
" exit status = " << (result?
"true":
"false\n")
193 std::vector<ossimString> fileList = fileName.
split(
":");
194 if (fileList.size() > 0)
305 if ( ext ==
"hdf" || ext ==
"h4" || ext ==
"hdf4" ||
306 ext ==
"he4" || ext ==
"hdf5" || ext ==
"he5" || ext ==
"h5" ||
408 std::vector<ossimString> entryStringList;
410 if (entryId < entryStringList.size())
412 return entryStringList[entryId];
426 result = GDALGetDriverShortName(driver);
bool isSDSDataset(ossimString fileName)
void clear()
Erases the entire container.
virtual bool isSourceEnabled() const
virtual ossimString getShortName() const
Returns short name.
ossimRefPtr< ossimImageGeometry > theGeometry
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
bool doubleEquals(ossim_float64 left, ossim_float64 right, ossim_float64 epsilon)
virtual ossimString getClassName() const
Returns class name.
virtual ossim_uint32 getNumberOfBands() const
virtual void getEntryNames(std::vector< ossimString > &entryStringList) const
ossimFilename theImageFile
virtual void setImageRectangle(const ossimIrect &rect)
virtual ossimString getLongName() const
Returns long name.
ossimRefPtr< ossimImageData > m_tile
Represents serializable keyword/value map.
std::vector< ossimDpt > theDecimationFactors
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 bool setOutputBandList(const std::vector< ossim_uint32 > &band_list)
If the image handler "isBandSeletor()" then the band selection of the output chip can be controlled...
virtual ossim_uint32 getNumberOfEntries() const
bool contains(char aChar) const
virtual ossim_uint32 getImageTileWidth() 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
Gets number of lines for res level.
virtual bool open()
Open method.
void split(std::vector< ossimString > &result, const ossimString &separatorList, bool skipBlankFields=false) const
Splits this string into a vector of strings (fields) using the delimiter list specified.
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level=0) const
Returns the number of bands in the image.
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const
Gets the number of samples for res level.
virtual ossim_uint32 getImageTileWidth() const
Returns the tile width of the image or 0 if the image is not tiled.
ossimScalarType m_scalarType
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 loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual bool isValidRLevel(ossim_uint32 resLevel) const
Determines if the passed in reslution level is valid.
bool completely_within(const ossimIrect &rect) const
virtual void loadTile(const void *src, const ossimIrect &src_rect, ossimInterleaveType il_type)
#define RTTI_DEF1_INST(cls, name, b1)
ossimRefPtr< ossimGdalTileSource > m_gdalTileSource
virtual bool getOverviewTile(ossim_uint32 resLevel, ossimImageData *result)
Method to get an overview tile.
static ossimImageDataFactory * instance()
virtual ossim_uint32 getImageTileHeight() const
Returns the tile width of the image or 0 if the image is not tiled.
virtual ossimDataObjectStatus validate() const
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level=0) const
Returns the number of bands available from an image.
virtual ossim_uint32 getNumberOfInputBands() const
Returns the number of bands in the image.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual void setFilename(const ossimFilename &filename)
Sets the filename.
unsigned int ossim_uint32
bool isSupportedExtension()
virtual void close()
Method to close current entry.
virtual ossimIrect getImageRectangle() const
virtual ~ossimHdfReader()
virtural destructor
ossim_uint32 m_currentEntryRender
virtual ossimScalarType getOutputScalarType() const
Returns the output pixel type of the tile source.
virtual void close()
Deletes the overview and clears the valid image vertices.
static ossimString downcase(const ossimString &aString)
virtual ossimIrect getImageRectangle(ossim_uint32 resLevel=0) const
Returns zero-based bounding rectangle of the image.
virtual ossim_uint32 getNumberOfInputBands() const
Returns the number of bands in the image.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, 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 void getEntryList(std::vector< ossim_uint32 > &entryList) const
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossimIrect clipToRect(const ossimIrect &rect) const
void unref() const
decrement the reference count by one, indicating that a pointer to this object is referencing it...
virtual ossimScalarType getOutputScalarType() const
Returns the output pixel type of the tile source.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
virtual bool setCurrentEntry(ossim_uint32 entryIdx)
virtual bool setOutputBandList(const std::vector< ossim_uint32 > &band_list)
If the image handler "isBandSeletor()" then the band selection of the output chip can be controlled...
virtual void makeBlank()
Initializes data to null pixel values.
virtual void completeOpen()
Will complete the opening process.
ossimRefPtr< ossimImageHandler > theOverview
This class defines an abstract Handler which all image handlers(loaders) should derive from...
ossimString getDriverName()
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &rect, ossim_uint32 resLevel=0)
Method to grab a tile(rectangle) from image.
virtual const void * getBuf() const
std::vector< ossim_uint32 > m_entryFileList
ossimString getEntryString(ossim_uint32 entryId) const
ossim_uint32 m_numberOfBands
ossimFilename theOverviewFile
virtual ossim_uint32 getImageTileHeight() const
Returns the tile width of the image or 0 if the image is not tiled.
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual bool isOpen() const
Method to test for open file stream.
virtual bool setCurrentEntry(ossim_uint32 entryIdx)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
ossimHdfReader()
default construtor