radarlib  1.4.6
OdimH5v21::OdimData Class Reference

Generic OdimH5 v2.1 data group. More...

#include <radarlib/odimh5v21_classes.hpp>

Inheritance diagram for OdimH5v21::OdimData:
OdimH5v21::PolarScanData OdimH5v21::Product_2D_Data

Public Member Functions

virtual H5::Group * getH5Object ()
 Get the HDF5 group associated to this object. More...
 
virtual bool existWhat ()
 Test is the WHAT attributes group exist. More...
 
virtual bool existWhere ()
 Test is the WHERE attributes group exist. More...
 
virtual bool existHow ()
 Test is the HOW attributes group exist. More...
 
virtual MetadataGroupgetWhat ()
 Get the WHAT attributes group. More...
 
virtual MetadataGroupgetWhere ()
 Get the WHERE attributes group. More...
 
virtual MetadataGroupgetHow ()
 Get the HOW attributes group. More...
 
virtual H5::AtomType getDataType ()
 Get the HDF5 atom type of the elements of the HDF5 dataset contained inside this 'data' group. More...
 
virtual int getDataWidth ()
 Get the width (cols num) of the matrix associated to this data group. More...
 
virtual int getDataHeight ()
 Get the height (rows num) of the matrix associated to this data group. More...
 
virtual void getDataDimension (int *height, int *width)
 Get height and width (rows and cols num) of the matrix associated to this data group. More...
 
virtual void writeData (const void *buff, int width, int height, const H5::DataType &elemtype)
 Write data to the matrix associated to this 'data' group. More...
 
virtual void writeData (const char *buff, int width, int height)
 Write data to the matrix associated to this 'data' group. More...
 
virtual void writeData (const unsigned char *buff, int width, int height)
 Write data to the matrix associated to this 'data' group. More...
 
virtual void writeData (const unsigned short *buff, int width, int height)
 Write data to the matrix associated to this 'data' group. More...
 
virtual void writeData (const float *buff, int width, int height)
 Write data to the matrix associated to this 'data' group. More...
 
virtual void writeData (const DataMatrix< char > &matrix)
 Write data to the matrix associated to this 'data' group. More...
 
virtual void writeData (const DataMatrix< unsigned char > &matrix)
 Write data to the matrix associated to this 'data' group. More...
 
virtual void writeData (const DataMatrix< unsigned short > &matrix)
 Write data to the matrix associated to this 'data' group. More...
 
virtual void writeData (const DataMatrix< float > &matrix)
 Write data to the matrix associated to this 'data' group. More...
 
virtual void readData (void *buffer)
 Read data from the dataset of this 'data' group. More...
 
virtual int getQualityCount ()
 Get the number of 'quality' groups inside this data group. More...
 
virtual OdimQualitycreateQuality ()
 Create a new group 'Quality' inside this data. More...
 
virtual OdimQualitygetQuality (int index)
 Get an existing Quality group using the given index. More...
 
virtual void removeQuality (int index)
 Remove a 'quality' group from this dataset. More...
 

Detailed Description

Generic OdimH5 v2.1 data group.

All OdimH5 datasets can store one o more data groups.
This class represents a generic OdimH5 data group.
Generic data allow only to read/write attributes and matrices of binary data (RayMatrix).
Users are responsible for manipulating informations following OdimH5 specifications.

See also
OdimDataset, RayMatrix

Member Function Documentation

◆ getH5Object()

H5::Group * OdimH5v21::OdimData::getH5Object ( )
virtual

Get the HDF5 group associated to this object.

Get the HDF5 group associated to this object

Remarks
user must not delete this object
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ existWhat()

bool OdimH5v21::OdimData::existWhat ( )
virtual

Test is the WHAT attributes group exist.

Check if the WHAT attributes group of this object exist.

Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ existWhere()

bool OdimH5v21::OdimData::existWhere ( )
virtual

Test is the WHERE attributes group exist.

Check if the WHERE attributes group of this object exist.

Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ existHow()

bool OdimH5v21::OdimData::existHow ( )
virtual

Test is the HOW attributes group exist.

Check if the HOW attributes group of this object exist.

Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ getWhat()

MetadataGroup * OdimH5v21::OdimData::getWhat ( )
virtual

Get the WHAT attributes group.

Get the WHAT attributes group of this object. If it does not exist it will be created

Remarks
user must not delete this object
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ getWhere()

MetadataGroup * OdimH5v21::OdimData::getWhere ( )
virtual

Get the WHERE attributes group.

Get the WHERE attributes group of this object. If it does not exist it will be created

Remarks
user must not delete this object
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ getHow()

MetadataGroup * OdimH5v21::OdimData::getHow ( )
virtual

Get the HOW attributes group.

Get the HOW attributes group of this object. If it does not exist it will be created

Remarks
user must not delete this object
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ getDataType()

H5::AtomType OdimH5v21::OdimData::getDataType ( )
virtual

Get the HDF5 atom type of the elements of the HDF5 dataset contained inside this 'data' group.

Get the HDF5 atom type of the elements of the HDF5 dataset contained inside this 'data' group.
If the HDF5 dataset is not present then NATIVE_OPAQUE will be returned. OdimH5 allow only atomic types: char, schar, uchar, short, ushort, int, uint, long, ulong, llong, ullong, float, double.

Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5UnsupportedExceptionif the dataset type cannot be converted to an atomic type

◆ getDataWidth()

int OdimH5v21::OdimData::getDataWidth ( )
virtual

Get the width (cols num) of the matrix associated to this data group.

Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ getDataHeight()

int OdimH5v21::OdimData::getDataHeight ( )
virtual

Get the height (rows num) of the matrix associated to this data group.

Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ getDataDimension()

void OdimH5v21::OdimData::getDataDimension ( int *  height,
int *  width 
)
virtual

Get height and width (rows and cols num) of the matrix associated to this data group.

Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ writeData() [1/9]

void OdimH5v21::OdimData::writeData ( const void *  buff,
int  width,
int  height,
const H5::DataType &  elemtype 
)
virtual

Write data to the matrix associated to this 'data' group.

Write data to the matrix associated to this 'data' group from the given buffer where each element has the given type.
The buffer must be a continuous memory array logically organized as a matrix divided in rows and cols.

The size of the buffer must be at least equal to (height * width * elemtype.getSize()). Otherwise a buffer overflow will occur.

Parameters
buffthe buffer containing the data to write
widththe number of cols in the matrix
heightthe number of rows in the matrix
elemtypethe HDF5 datatype of the buffer's elements
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ writeData() [2/9]

void OdimH5v21::OdimData::writeData ( const char *  buff,
int  width,
int  height 
)
virtual

Write data to the matrix associated to this 'data' group.

Write data to the matrix associated to this 'data' group from the given 8 bit signed buffer

Parameters
buffthe buffer containing the data to write
widththe number of cols in the matrix
heightthe number of rows in the matrix
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ writeData() [3/9]

void OdimH5v21::OdimData::writeData ( const unsigned char *  buff,
int  width,
int  height 
)
virtual

Write data to the matrix associated to this 'data' group.

Write data to the matrix associated to this 'data' group from the given 8 bit unsigned buffer

Parameters
buffthe buffer containing the data to write
widththe number of cols in the matrix
heightthe number of rows in the matrix
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ writeData() [4/9]

void OdimH5v21::OdimData::writeData ( const unsigned short *  buff,
int  width,
int  height 
)
virtual

Write data to the matrix associated to this 'data' group.

Write data to the matrix associated to this 'data' group from the given 16 bit unsigned char buffer

Parameters
buffthe buffer containing the data to write
widththe number of cols in the matrix
heightthe number of rows in the matrix
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ writeData() [5/9]

void OdimH5v21::OdimData::writeData ( const float *  buff,
int  width,
int  height 
)
virtual

Write data to the matrix associated to this 'data' group.

Write data to the matrix associated to this 'data' group from the given 32 bit floating point buffer

Parameters
buffthe buffer containing the data to write
widththe number of cols in the matrix
heightthe number of rows in the matrix
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ writeData() [6/9]

void OdimH5v21::OdimData::writeData ( const DataMatrix< char > &  matrix)
virtual

Write data to the matrix associated to this 'data' group.

Write data to the matrix associated to this 'data' group from the DataMatrix object.
The HDF5 dataset will be created using the size and type of the given matrix object.

Parameters
matrixthe matrix object containing the data
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ writeData() [7/9]

void OdimH5v21::OdimData::writeData ( const DataMatrix< unsigned char > &  matrix)
virtual

Write data to the matrix associated to this 'data' group.

Write data to the matrix associated to this 'data' group from the DataMatrix object.
The HDF5 dataset will be created using the size and type of the given matrix object.

Parameters
matrixthe matrix object containing the data
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ writeData() [8/9]

void OdimH5v21::OdimData::writeData ( const DataMatrix< unsigned short > &  matrix)
virtual

Write data to the matrix associated to this 'data' group.

Write data to the matrix associated to this 'data' group from the DataMatrix object.
The HDF5 dataset will be created using the size and type of the given matrix object.

Parameters
matrixthe matrix object containing the data
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ writeData() [9/9]

void OdimH5v21::OdimData::writeData ( const DataMatrix< float > &  matrix)
virtual

Write data to the matrix associated to this 'data' group.

Write data to the matrix associated to this 'data' group from the DataMatrix object The HDF5 dataset will be created using the size and type of the given matrix object

Parameters
matrixthe matrix object containing the data
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ readData()

void OdimH5v21::OdimData::readData ( void *  buffer)
virtual

Read data from the dataset of this 'data' group.

Read data from the dataset of this 'data' group into the given buffer.
The buffer must be large enough to store all elements in the HDF5 dataset.
The minimum size in byte is (getDataWidth() x getDataHeight() x getDataType().getSize()).

Parameters
bufferthe buffer to store the loaded data
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ getQualityCount()

int OdimH5v21::OdimData::getQualityCount ( )
virtual

Get the number of 'quality' groups inside this data group.

Returns
the number of 'quality' groups
Exceptions
OdimH5Exceptionif an unexpected error occurs

◆ createQuality()

OdimQuality * OdimH5v21::OdimData::createQuality ( )
virtual

Create a new group 'Quality' inside this data.

Returns
the object associated to the new 'quality' group
Exceptions
OdimH5Exceptionif an unexpected error occurs
Remarks
User is responsible for deleting the returned object

◆ getQuality()

OdimQuality * OdimH5v21::OdimData::getQuality ( int  index)
virtual

Get an existing Quality group using the given index.

Get an existing dataset using the given index

Parameters
indexthe quality index from 0 to n-1
Returns
the OdimQuality object associated to the HDF5 group or NULL if the group does not exist
Exceptions
OdimH5Exceptionif an unexpected error occurs
Remarks
User is responsible for deleting the returned object

◆ removeQuality()

void OdimH5v21::OdimData::removeQuality ( int  index)
virtual

Remove a 'quality' group from this dataset.

Remove a 'quality' group from this dataset

Parameters
indexthe dataset index from 0 to n-1
Exceptions
OdimH5Exceptionif an unexpected error occurs

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