OpenGM  2.3.x
Discrete Graphical Model Library
Enumerations | Functions | Variables
marray::hdf5 Namespace Reference

HDF5 import/export support. More...

Enumerations

enum  FileAccessMode { READ_ONLY, READ_WRITE }
 
enum  HDF5Version { DEFAULT_HDF5_VERSION, LATEST_HDF5_VERSION }
 

Functions

hid_t createFile (const std::string &filename, HDF5Version hdf5version)
 Create an HDF5 file. More...
 
hid_t openFile (const std::string &filename, FileAccessMode fileAccessMode, HDF5Version hdf5version)
 Open an HDF5 file. More...
 
void closeFile (const hid_t &handle)
 Close an HDF5 file. More...
 
hid_t createGroup (const hid_t &parentHandle, const std::string &groupName)
 Create an HDF5 group. More...
 
hid_t openGroup (const hid_t &parentHandle, const std::string &groupName)
 Open an HDF5 group. More...
 
void closeGroup (const hid_t &handle)
 Close an HDF5 group. More...
 
template<class T >
void save (const hid_t &groupHandle, const std::string &datasetName, const Marray< T > &in)
 Save an Marray as an HDF5 dataset. More...
 
template<class T , bool isConst>
void save (const hid_t &groupHandle, const std::string &datasetName, const View< T, isConst > &in)
 Save a View as an HDF5 dataset. More...
 
template<class T >
void save (const hid_t &groupHandle, const std::string &datasetName, const std::vector< T > &in)
 Save an std::vector as an HDF5 dataset. More...
 
template<class T , class BaseIterator , class ShapeIterator >
void saveHyperslab (const hid_t &groupHandle, const std::string &datasetName, BaseIterator baseBegin, BaseIterator baseEnd, ShapeIterator shapeBegin, const Marray< T > &in)
 Save an Marray as a hyperslab into an HDF5 dataset. More...
 
template<class T , class ShapeIterator >
void create (const hid_t &groupHandle, const std::string &datasetName, ShapeIterator begin, ShapeIterator end, CoordinateOrder coordinateOrder)
 Create and close an HDF5 dataset to store Marray data. More...
 
template<class T >
void load (const hid_t &groupHandle, const std::string &datasetName, Marray< T > &out)
 Load an Marray from an HDF5 dataset. More...
 
template<class T >
void loadShape (const hid_t &groupHandle, const std::string &datasetName, Vector< T > &out)
 Load the shape of an HDF5 dataset. More...
 
template<class T , class BaseIterator , class ShapeIterator >
void loadHyperslab (const hid_t &groupHandle, const std::string &datasetName, BaseIterator baseBegin, BaseIterator baseEnd, ShapeIterator shapeBegin, Marray< T > &out)
 Load a hyperslab from an HDF5 dataset into an Marray. More...
 

Variables

const char reverseShapeAttributeName [14] = "reverse-shape"
 

Detailed Description

HDF5 import/export support.

Enumeration Type Documentation

Enumerator
READ_ONLY 
READ_WRITE 

Definition at line 49 of file marray_hdf5.hxx.

Enumerator
DEFAULT_HDF5_VERSION 
LATEST_HDF5_VERSION 

Definition at line 50 of file marray_hdf5.hxx.

Function Documentation

void marray::hdf5::closeFile ( const hid_t &  handle)
inline

Close an HDF5 file.

Parameters
handleHandle to the HDF5 file.
See also
openFile(), createFile()

Definition at line 810 of file marray_hdf5.hxx.

+ Here is the caller graph for this function:

void marray::hdf5::closeGroup ( const hid_t &  handle)
inline

Close an HDF5 group.

Parameters
handleHDF5 handle on group to close.
See also
openGroup(), createGroup()

Definition at line 870 of file marray_hdf5.hxx.

+ Here is the caller graph for this function:

template<class T , class ShapeIterator >
void marray::hdf5::create ( const hid_t &  groupHandle,
const std::string &  datasetName,
ShapeIterator  begin,
ShapeIterator  end,
CoordinateOrder  coordinateOrder 
)

Create and close an HDF5 dataset to store Marray data.

Parameters
groupHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
beginIterator to the beginning of a sequence that determines the shape of the dataset.
endIterator to the end of a sequence that determines the shape of the dataset.
coordinateOrderCoordinate order of the Marray.
See also
save(), saveHyperslab()

Definition at line 174 of file marray_hdf5.hxx.

hid_t marray::hdf5::createFile ( const std::string &  filename,
HDF5Version  hdf5version 
)
inline

Create an HDF5 file.

Parameters
filenameName of the file.
hdf5versionHDF5 version tag.
Returns
HDF5 handle
See also
openFile(), closeFile()

Definition at line 747 of file marray_hdf5.hxx.

+ Here is the caller graph for this function:

hid_t marray::hdf5::createGroup ( const hid_t &  parentHandle,
const std::string &  groupName 
)
inline

Create an HDF5 group.

Parameters
parentHandleHDF5 handle on the parent group or file.
groupNameName of the group.
Returns
HDF5 handle on the created group
See also
openGroup(), closeGroup()

Definition at line 827 of file marray_hdf5.hxx.

+ Here is the caller graph for this function:

template<class T >
void marray::hdf5::load ( const hid_t &  groupHandle,
const std::string &  datasetName,
Marray< T > &  out 
)

Load an Marray from an HDF5 dataset.

Parameters
groupHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
outMarray.
See also
loadHyperslab()

Definition at line 396 of file marray_hdf5.hxx.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T , class BaseIterator , class ShapeIterator >
void marray::hdf5::loadHyperslab ( const hid_t &  groupHandle,
const std::string &  datasetName,
BaseIterator  baseBegin,
BaseIterator  baseEnd,
ShapeIterator  shapeBegin,
Marray< T > &  out 
)

Load a hyperslab from an HDF5 dataset into an Marray.

Parameters
groupHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
baseBeginIterator to the beginning of the sequence that determines the first coordinate of the hyperslab.
baseEndIterator to the end of the sequence that determines the first coordinate of the hyperslab.
shapeBeginIterator to the beginning of the sequence that determines the shape of the hyperslab.
outMarray.
See also
saveHyperslab(), create()

Definition at line 526 of file marray_hdf5.hxx.

template<class T >
void marray::hdf5::loadShape ( const hid_t &  groupHandle,
const std::string &  datasetName,
Vector< T > &  out 
)

Load the shape of an HDF5 dataset.

Parameters
groupHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
outShape.
See also
load()

Definition at line 470 of file marray_hdf5.hxx.

+ Here is the call graph for this function:

hid_t marray::hdf5::openFile ( const std::string &  filename,
FileAccessMode  fileAccessMode,
HDF5Version  hdf5version 
)
inline

Open an HDF5 file.

Parameters
filenameName of the file.
fileAccessModeFile access mode.
hdf5versionHDF5 version tag.
Returns
HDF5 handle
See also
closeFile(), createFile()

Definition at line 778 of file marray_hdf5.hxx.

+ Here is the caller graph for this function:

hid_t marray::hdf5::openGroup ( const hid_t &  parentHandle,
const std::string &  groupName 
)
inline

Open an HDF5 group.

Parameters
parentHandleHDF5 handle on the parent group or file.
groupNameName of the group.
Returns
HDF5 handle on the opened group.
See also
createGroup(), closeGroup()

Definition at line 850 of file marray_hdf5.hxx.

+ Here is the caller graph for this function:

template<class T >
void marray::hdf5::save ( const hid_t &  groupHandle,
const std::string &  datasetName,
const Marray< T > &  in 
)

Save an Marray as an HDF5 dataset.

Parameters
groupHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
inMarray.
See also
saveHyperslab()

Definition at line 265 of file marray_hdf5.hxx.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T , bool isConst>
void marray::hdf5::save ( const hid_t &  groupHandle,
const std::string &  datasetName,
const View< T, isConst > &  in 
)
inline

Save a View as an HDF5 dataset.

Parameters
groupHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
inView.
See also
saveHyperslab()

Definition at line 356 of file marray_hdf5.hxx.

+ Here is the call graph for this function:

template<class T >
void marray::hdf5::save ( const hid_t &  groupHandle,
const std::string &  datasetName,
const std::vector< T > &  in 
)

Save an std::vector as an HDF5 dataset.

Parameters
groupHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
instd::vector.
See also
saveHyperslab()

Definition at line 374 of file marray_hdf5.hxx.

+ Here is the call graph for this function:

template<class T , class BaseIterator , class ShapeIterator >
void marray::hdf5::saveHyperslab ( const hid_t &  groupHandle,
const std::string &  datasetName,
BaseIterator  baseBegin,
BaseIterator  baseEnd,
ShapeIterator  shapeBegin,
const Marray< T > &  in 
)

Save an Marray as a hyperslab into an HDF5 dataset.

Parameters
groupHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
baseBeginIterator to the beginning of the sequence that determines the first coordinate of the hyperslab.
baseEndIterator to the end of the sequence that determines the first coordinate of the hyperslab.
shapeBeginIterator to the beginning of the sequence that determines the shape of the hyperslab.
inMarray.
See also
loadHyperslab(), create()

Definition at line 641 of file marray_hdf5.hxx.

+ Here is the call graph for this function:

Variable Documentation

const char marray::hdf5::reverseShapeAttributeName[14] = "reverse-shape"

Definition at line 45 of file marray_hdf5.hxx.