[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| HDF5ImportInfo Class Reference Import/Export of Images and Arrays in HDF5 Format |

Argument object for the function readHDF5(). More...

`#include <vigra/hdf5impex.hxx>`

List of all members.

## 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

## Detailed Description

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

## Constructor & Destructor Documentation

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:

                HDF5ImportInfo info(filename, "/group1/group2/my_dataset");

## Member Function Documentation

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:

"UINT8"
  8-bit unsigned integer (unsigned char)
"INT16"
  16-bit signed integer (short)
"UINT16"
  16-bit unsigned integer (unsigned short)
"INT32"
  32-bit signed integer (long)
"UINT32"
  32-bit unsigned integer (unsigned long)
"FLOAT"
  32-bit floating point (float)
"DOUBLE"
  64-bit floating point (double)

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:

UINT8
  8-bit unsigned integer (unsigned char)
INT16
  16-bit signed integer (short)
UINT16
  16-bit unsigned integer (unsigned short)
INT32
  32-bit signed integer (long)
UINT32
  32-bit unsigned integer (unsigned long)
FLOAT
  32-bit floating point (float)
DOUBLE
  64-bit floating point (double)

The documentation for this class was generated from the following file:

- vigra/hdf5impex.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.9.0 (Tue Nov 6 2012)