[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
HDF5ImportInfo Class Reference |
Argument object for the function readHDF5(). More...
#include <vigra/hdf5impex.hxx>
Public Member Functions | |
hid_t | getDatasetHandle () const |
const std::string & | getFilePath () const |
hid_t | getH5FileHandle () const |
const std::string & | getPathInFile () const |
const char * | getPixelType () const |
HDF5ImportInfo (const char *filePath, const char *pathInFile) | |
MultiArrayIndex | numDimensions () const |
PixelType | pixelType () const |
ArrayVector< hsize_t > const & | shape () const |
MultiArrayIndex | shapeOfDimension (const int dim) const |
Argument object for the function readHDF5().
See readHDF5() for a usage example. This object must be used to read an image or array from an HDF5 file and enquire about its properties.
#include <vigra/hdf5impex.hxx>
Namespace: vigra
HDF5ImportInfo | ( | const char * | filePath, |
const char * | pathInFile | ||
) |
Construct HDF5ImportInfo object.
The dataset pathInFile in the HDF5 file filename is accessed to read its properties. pathInFile may contain '/'-separated group names, but must end with the name of the desired dataset:
const std::string& getFilePath | ( | ) | const |
Get the filename of this HDF5 object.
const std::string& getPathInFile | ( | ) | const |
Get the dataset's full name in the HDF5 file.
hid_t getH5FileHandle | ( | ) | const |
Get a handle to the file represented by this info object.
hid_t getDatasetHandle | ( | ) | const |
Get a handle to the dataset represented by this info object.
MultiArrayIndex numDimensions | ( | ) | const |
Get the number of dimensions of the dataset represented by this info object.
ArrayVector<hsize_t> const& shape | ( | ) | const |
Get the shape of the dataset represented by this info object.
Note that the memory order between VIGRA and HDF5 files differs: VIGRA uses Fortran-order, while HDF5 uses C-order. This function therefore reverses the axis order relative to the file contents. That is, when the axes in the file are ordered as 'z', 'y', 'x', this function will return the shape in the order 'x', 'y', 'z'.
MultiArrayIndex shapeOfDimension | ( | const int | dim | ) | const |
Get the shape (length) of the dataset along dimension dim.
Note that the memory order between VIGRA and HDF5 files differs: VIGRA uses Fortran-order, while HDF5 uses C-order. This function therefore reverses the axis order relative to the file contents. That is, when the axes in the file are ordered as 'z', 'y', 'x', this function will return the shape in the order 'x', 'y', 'z'.
const char* getPixelType | ( | ) | const |
Query the pixel type of the dataset.
Possible values are:
PixelType pixelType | ( | ) | const |
Query the pixel type of the dataset.
Same as getPixelType(), but the result is returned as a ImageImportInfo::PixelType enum. This is useful to implement a switch() on the pixel type.
Possible values are:
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|