OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Low-level OSSIM interface to HDF5 libraries. More...
#include <ossimHdf5.h>
Public Member Functions | |
ossimHdf5 () | |
~ossimHdf5 () | |
bool | open (const ossimFilename &hdf5File) |
Opens specified HDF5 file. More... | |
bool | isOpen () const |
bool | close () |
Closes the file and deletes all pointers. More... | |
bool | getRoot (H5::Group &root) const |
Assigns the root group. More... | |
H5::Group * | findGroupByName (const std::string &group_name, const H5::Group *parent_group=0, bool recursive=false) const |
Finds a group by name. More... | |
H5::DataSet * | findDatasetByName (const std::string &dataset_name, const H5::Group *group=0, bool recursive=false) const |
Finds a dataset by name. More... | |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Static Public Member Functions | |
static bool | getChildGroups (H5::Group group, std::vector< H5::Group > &groupList, bool recursive=false) |
Assigns list of groups under specified group. More... | |
static bool | getDatasets (H5::Group group, std::vector< H5::DataSet > &datasetList, bool recursive=false) |
Assigns list of datasets under specified group. More... | |
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. More... | |
static bool | getAttributes (const H5::H5Object &obj, std::vector< H5::Attribute > &attrList) |
static ossimByteOrder | getByteOrder (const H5::AbstractDs *obj) |
static ossimByteOrder | getByteOrder (const H5::AtomType &obj) |
static std::string | getDatatypeClassType (ossim_int32 type) |
static void | getExtents (const H5::DataSet &dataset, std::vector< ossim_uint32 > &extents) |
static ossimScalarType | getScalarType (const H5::DataSet &dataset) |
static ossimScalarType | getScalarType (const H5::DataType &datatype) |
static bool | floatTypeToString (std::string &result, const H5::FloatType &dataType, const char *dataPtr) |
static bool | intTypeToString (std::string &result, const H5::IntType &dataType, const char *dataPtr) |
static bool | stringTypeToString (std::string &result, const H5::StrType &dataType, const char *dataPtr) |
Private Attributes | |
ossimFilename | m_filename |
H5::H5File * | m_h5File |
Additional Inherited Members | |
![]() | |
virtual | ~ossimReferenced () |
Low-level OSSIM interface to HDF5 libraries.
Catches HDF5 exceptions on common operations. Note, all methods return by value as that is the way HDF5 returns objects. This seems very inefficient, particularly for large datasets. Hopefully they are shallow copies.
Definition at line 27 of file ossimHdf5.h.
ossimHdf5::ossimHdf5 | ( | ) |
Definition at line 20 of file ossimHdf5.cpp.
ossimHdf5::~ossimHdf5 | ( | ) |
bool ossimHdf5::close | ( | ) |
Closes the file and deletes all pointers.
Definition at line 72 of file ossimHdf5.cpp.
References m_h5File, ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by open(), and ~ossimHdf5().
H5::DataSet * ossimHdf5::findDatasetByName | ( | const std::string & | dataset_name, |
const H5::Group * | group = 0 , |
||
bool | recursive = false |
||
) | const |
Finds a dataset by name.
The first object with specified name (can be relative path – a naive string comparison is performed) under the specified group is returned.
group | If null, implies root group. |
recursive | If true, recursively visits all subgroups. |
Definition at line 295 of file ossimHdf5.cpp.
References ossimString::contains(), getDatasets(), getRoot(), ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by ossimHdf5Info::getKeywordlistDataset(), and ossimHdf5GridModel::initCoarseGrid().
H5::Group * ossimHdf5::findGroupByName | ( | const std::string & | group_name, |
const H5::Group * | parent_group = 0 , |
||
bool | recursive = false |
||
) | const |
Finds a group by name.
The first object with specified name (can be relative path – a naive string comparison is performed) under the specified parent group is returned.
group | If null, implies root group. |
recursive | If true, recursively visits all subgroups. |
Definition at line 251 of file ossimHdf5.cpp.
References ossimString::contains(), getChildGroups(), getRoot(), ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by ossimHdf5Info::getKeywordlistGroup(), and ossimHdf5GridModel::initCoarseGrid().
|
static |
Definition at line 577 of file ossimHdf5.cpp.
References ossim::byteOrder(), getByteOrder(), ossimString::string(), ossimEndian::swap(), and ossimString::toString().
Referenced by ossimHdf5Info::dumpArrayType(), ossimHdf5Info::dumpAttribute(), and ossimHdf5Info::dumpFloatType().
|
static |
objPath | Either relative or absolute path in file to object. |
Definition at line 227 of file ossimHdf5.cpp.
References ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by ossimHdf5Info::dumpAttributes(), and ossimHdf5Info::printAttributes().
|
static |
Definition at line 337 of file ossimHdf5.cpp.
References ossim::byteOrder(), OSSIM_BIG_ENDIAN, OSSIM_LITTLE_ENDIAN, ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by ossimHdf5ImageDataset::determineScalarType(), ossimHdf5Info::dumpArrayType(), ossimHdf5Info::dumpAttribute(), ossimHdf5Info::dumpDataset(), ossimHdf5Info::dumpNumerical(), floatTypeToString(), intTypeToString(), and ossimHdf5Info::print().
|
static |
Definition at line 378 of file ossimHdf5.cpp.
References ossim::byteOrder(), OSSIM_BIG_ENDIAN, and OSSIM_LITTLE_ENDIAN.
|
static |
Assigns list of groups under specified group.
recursive | If true, recursively visits all subgroups |
Definition at line 112 of file ossimHdf5.cpp.
References ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by ossimHdf5Info::dumpGroup(), findGroupByName(), getDatasets(), getNdimDatasets(), and ossimHdf5Info::printSubGroups().
|
static |
Assigns list of datasets under specified group.
recursive | If true, recursively visits all datasets for this group and subgroups |
Definition at line 150 of file ossimHdf5.cpp.
References getChildGroups(), ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by ossimHdf5Info::dumpGroup(), ossimHdf5Tool::execute(), findDatasetByName(), ossimHdf5Info::getKeywordlist(), and ossimHdf5Info::printDatasets().
|
static |
Definition at line 395 of file ossimHdf5.cpp.
Referenced by ossimHdf5Info::dumpAttribute(), ossimHdf5Info::dumpCompoundTypeInfo(), and ossimHdf5Info::dumpDataset().
|
static |
Definition at line 444 of file ossimHdf5.cpp.
References ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by ossimHdf5Info::dumpDataset().
|
static |
Assigns list of all multi-dimensional datasets under current active group.
recursive | If true, recursively visits all datasets for this group and subgroups |
Definition at line 188 of file ossimHdf5.cpp.
References getChildGroups(), ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by ossimHdf5Tool::execute().
bool ossimHdf5::getRoot | ( | H5::Group & | root | ) | const |
Assigns the root group.
Definition at line 93 of file ossimHdf5.cpp.
References m_h5File, ossimNotify(), and ossimNotifyLevel_WARN.
Referenced by ossimHdf5Tool::execute(), findDatasetByName(), findGroupByName(), ossimHdf5Info::getKeywordlist(), ossimHdf5Info::getKeywordlistDataset(), ossimHdf5Info::getKeywordlistGroup(), and ossimHdf5Info::print().
|
static |
Definition at line 475 of file ossimHdf5.cpp.
References ossim::isSigned(), OSSIM_FLOAT32, OSSIM_FLOAT64, OSSIM_SCALAR_UNKNOWN, OSSIM_SINT16, OSSIM_SINT32, OSSIM_SINT64, OSSIM_SINT8, OSSIM_UINT16, OSSIM_UINT32, OSSIM_UINT64, OSSIM_UINT8, ossimNotify(), ossimNotifyLevel_WARN, and size.
Referenced by ossimHdf5Info::dumpNumerical(), and ossimHdf5Info::dumpNumericalTypeInfo().
|
static |
|
static |
Definition at line 616 of file ossimHdf5.cpp.
References ossim::byteOrder(), getByteOrder(), ossimString::string(), ossimEndian::swap(), and ossimString::toString().
Referenced by ossimHdf5Info::dumpArrayType(), ossimHdf5Info::dumpAttribute(), and ossimHdf5Info::dumpIntType().
|
inline |
Definition at line 36 of file ossimHdf5.h.
bool ossimHdf5::open | ( | const ossimFilename & | hdf5File | ) |
Opens specified HDF5 file.
Definition at line 29 of file ossimHdf5.cpp.
References close(), ossimString::empty(), m_filename, m_h5File, ossimNotify(), ossimNotifyLevel_WARN, and ossimString::string().
Referenced by ossimHdf5ProjectionFactory::createProjection(), and ossimHdf5Info::open().
|
static |
|
private |
Definition at line 112 of file ossimHdf5.h.
Referenced by open().
|
private |
Definition at line 113 of file ossimHdf5.h.