Class HDF5
Hierarchical Data Format version 5 interface.
public class HDF5 : SharedPtrObject, IDisposable
- Inheritance
-
HDF5
- Implements
- Inherited Members
Constructors
HDF5(string)
Open or create hdf5 file.
public HDF5(string fileName)
Parameters
fileName
stringSpecify the HDF5 filename.
Methods
AtDelete(string)
Delete an attribute from the root group.
public void AtDelete(string atLabel)
Parameters
atLabel
stringThe attribute to be deleted.
AtExists(string)
Check whether a given attribute exits or not in the root group.
public bool AtExists(string atLabel)
Parameters
atLabel
stringThe attribute name to be checked.
Returns
- bool
True if the attribute exists, False otherwise.
AtReadArray(IOutputArray, string)
Read an attribute from the root group.
public void AtReadArray(IOutputArray array, string atLabel)
Parameters
array
IOutputArrayThe output value
atLabel
stringAttribute name
AtReadDouble(string)
Read an attribute from the root group.
public double AtReadDouble(string atLabel)
Parameters
atLabel
stringAttribute name
Returns
- double
The double value
AtReadInt(string)
Read an attribute from the root group.
public int AtReadInt(string atLabel)
Parameters
atLabel
stringAttribute name
Returns
- int
The int value
AtReadString(string)
Read an attribute from the root group.
public string AtReadString(string atLabel)
Parameters
atLabel
stringAttribute name
Returns
- string
The String value
AtWrite(IInputArray, string)
Write an attribute inside the root group.
public void AtWrite(IInputArray value, string atLabel)
Parameters
value
IInputArrayAttribute value.
atLabel
stringAttribute name.
AtWrite(double, string)
Write an attribute inside the root group.
public void AtWrite(double value, string atLabel)
Parameters
AtWrite(int, string)
Write an attribute inside the root group.
public void AtWrite(int value, string atLabel)
Parameters
AtWrite(string, string)
Write an attribute inside the root group.
public void AtWrite(string value, string atLabel)
Parameters
Close()
Close and release hdf5 object.
public void Close()
DisposeObject()
Release all the unmanaged memory associate with this object
protected override void DisposeObject()
DsCreate(int, int, DepthType, int, string, int, VectorOfInt)
Create and allocate storage for two dimensional single or multi channel dataset.
public void DsCreate(int rows, int cols, DepthType depthType, int channels, string dsLabel, int compressLevel = -1, VectorOfInt dimsChunks = null)
Parameters
rows
intDeclare amount of rows
cols
intDeclare amount of columns
depthType
DepthTypeThe pixel depth type
channels
intThe number of channels
dsLabel
stringSpecify the hdf5 dataset label. Existing dataset label will cause an error.
compressLevel
intSpecify the compression level 0-9 to be used, -1 is the default value and means no compression. The value 0 also means no compression. A value 9 indicating the best compression ration. Note that a higher compression level indicates a higher computational cost. It relies on GNU gzip for compression.
dimsChunks
VectorOfIntEach array member specifies the chunking size to be used for block I/O, by default null means none at all.
DsRead(IOutputArray, string)
Read specific dataset from hdf5 file into Mat object.
public void DsRead(IOutputArray array, string dsLabel)
Parameters
array
IOutputArrayMat container where data reads will be returned.
dsLabel
stringSpecify the source hdf5 dataset label.
DsWrite(IInputArray, string)
Write or overwrite a Mat object into specified dataset of hdf5 file.
public void DsWrite(IInputArray array, string dsLabel)
Parameters
array
IInputArraySpecify Mat data array to be written.
dsLabel
stringSpecify the target hdf5 dataset label.
GrCreate(string)
Create a hdf5 group with default properties. The group is closed automatically after creation.
public void GrCreate(string grLabel)
Parameters
grLabel
stringSpecify the hdf5 group label.
HlExist(string)
Check if label exists or not.
public bool HlExist(string label)
Parameters
label
stringSpecify the hdf5 dataset label.
Returns
- bool
Returns true if dataset exists, and false otherwise.
KpRead(VectorOfKeyPoint, string, int, int)
Read specific keypoint dataset from hdf5 file into VectorOfKeyPoint object.
public void KpRead(VectorOfKeyPoint keypoints, string kpLabel, int offset = -1, int counts = -1)
Parameters
keypoints
VectorOfKeyPointContainer where data reads will be returned.
kpLabel
stringSpecify the source hdf5 dataset label.
offset
intSpecify the offset location over dataset from where read starts.
counts
intSpecify the amount of keypoints from dataset to read.
KpWrite(VectorOfKeyPoint, string, int, int)
Write or overwrite list of KeyPoint into specified dataset of hdf5 file.
public void KpWrite(VectorOfKeyPoint keypoints, string atLabel, int offset = -1, int counts = -1)
Parameters
keypoints
VectorOfKeyPointSpecify keypoints data list to be written.
atLabel
stringSpecify the target hdf5 dataset label.
offset
intSpecify the offset location on dataset from where keypoints will be (over)written into dataset.
counts
intSpecify the amount of keypoints that will be written into dataset.