DGtal 1.4.0
|
Aim: implements a factory from an HDF5 file. More...
#include <DGtal/images/ImageFactoryFromHDF5.h>
Public Types | |
typedef ImageFactoryFromHDF5< TImageContainer > | Self |
typedef TImageContainer | ImageContainer |
Types copied from the container. | |
typedef ImageContainer::Domain | Domain |
typedef ImageContainer | OutputImage |
New types. | |
typedef OutputImage::Value | Value |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CImage< TImageContainer >)) | |
Checking concepts. | |
BOOST_CONCEPT_ASSERT ((concepts::CBoundedNumber< Value >)) | |
ImageFactoryFromHDF5 (const std::string &aFilename, const std::string &aDataset) | |
~ImageFactoryFromHDF5 () | |
const Domain & | domain () const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
OutputImage * | requestImage (const Domain &aDomain) |
void | flushImage (OutputImage *outputImage) |
void | detachImage (OutputImage *outputImage) |
Data Fields | |
hid_t | file |
hid_t | dataset |
hid_t | datatype |
hid_t | dataspace |
Protected Attributes | |
Domain * | myDomain |
Alias on the image domain. | |
const std::string | myFilename |
HDF5 filename and datasetname. | |
const std::string | myDataset |
Private Member Functions | |
ImageFactoryFromHDF5 (const ImageFactoryFromHDF5 &other) | |
ImageFactoryFromHDF5 & | operator= (const ImageFactoryFromHDF5 &other) |
Aim: implements a factory from an HDF5 file.
Description of template class 'ImageFactoryFromHDF5'
TImageContainer | an image container type (model of CImage). |
The factory images production (images are copied, so it's a creation process) is done with the function 'requestImage' so the deletion must be done with the function 'detachImage'.
The update of the original image is done with the function 'flushImage'.
Definition at line 196 of file ImageFactoryFromHDF5.h.
typedef ImageContainer::Domain DGtal::ImageFactoryFromHDF5< TImageContainer >::Domain |
Definition at line 209 of file ImageFactoryFromHDF5.h.
typedef TImageContainer DGtal::ImageFactoryFromHDF5< TImageContainer >::ImageContainer |
Types copied from the container.
Definition at line 208 of file ImageFactoryFromHDF5.h.
typedef ImageContainer DGtal::ImageFactoryFromHDF5< TImageContainer >::OutputImage |
New types.
Definition at line 212 of file ImageFactoryFromHDF5.h.
typedef ImageFactoryFromHDF5<TImageContainer> DGtal::ImageFactoryFromHDF5< TImageContainer >::Self |
Definition at line 202 of file ImageFactoryFromHDF5.h.
typedef OutputImage::Value DGtal::ImageFactoryFromHDF5< TImageContainer >::Value |
Definition at line 213 of file ImageFactoryFromHDF5.h.
|
inline |
Constructor.
aFilename | HDF5 filename. |
aDataset | datasetname. |
Definition at line 226 of file ImageFactoryFromHDF5.h.
References DGtal::ImageFactoryFromHDF5< TImageContainer >::dataset, DGtal::ImageFactoryFromHDF5< TImageContainer >::dataspace, DGtal::ImageFactoryFromHDF5< TImageContainer >::datatype, DGtal::ImageFactoryFromHDF5< TImageContainer >::file, DGtal::ImageFactoryFromHDF5< TImageContainer >::myDataset, DGtal::ImageFactoryFromHDF5< TImageContainer >::myDomain, and DGtal::ImageFactoryFromHDF5< TImageContainer >::myFilename.
|
inline |
Destructor.
Definition at line 262 of file ImageFactoryFromHDF5.h.
References DGtal::ImageFactoryFromHDF5< TImageContainer >::dataset, DGtal::ImageFactoryFromHDF5< TImageContainer >::dataspace, DGtal::ImageFactoryFromHDF5< TImageContainer >::datatype, DGtal::ImageFactoryFromHDF5< TImageContainer >::file, and DGtal::ImageFactoryFromHDF5< TImageContainer >::myDomain.
|
private |
DGtal::ImageFactoryFromHDF5< TImageContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CBoundedNumber< Value >) | ) |
DGtal::ImageFactoryFromHDF5< TImageContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CImage< TImageContainer >) | ) |
Checking concepts.
|
inline |
Free (i.e. delete) an OutputImage.
outputImage | the OutputImage. |
Definition at line 543 of file ImageFactoryFromHDF5.h.
|
inline |
Returns a reference to the underlying image domain.
Definition at line 291 of file ImageFactoryFromHDF5.h.
References DGtal::ImageFactoryFromHDF5< TImageContainer >::myDomain.
|
inline |
Flush (i.e. write/synchronize) an OutputImage.
outputImage | the OutputImage. |
Definition at line 435 of file ImageFactoryFromHDF5.h.
References DGtal::HyperRectDomain< TSpace >::ConstSubRange::begin(), DGtal::ImageFactoryFromHDF5< TImageContainer >::dataspace, DGtal::ImageContainerBySTLVector< TDomain, TValue >::domain(), DGtal::HyperRectDomain< TSpace >::ConstSubRange::end(), DGtal::Trace::error(), DGtal::H5DSpecializations< TImageFactory, T >::H5DwriteS(), DGtal::ImageFactoryFromHDF5< TImageContainer >::myDomain, DGtal::HyperRectDomain< TSpace >::subRange(), and DGtal::trace.
|
inline |
Checks the validity/consistency of the object.
Definition at line 311 of file ImageFactoryFromHDF5.h.
References DGtal::ImageFactoryFromHDF5< TImageContainer >::myDomain.
|
private |
|
inline |
Returns a pointer of an OutputImage created with the Domain aDomain.
aDomain | the domain. |
Definition at line 323 of file ImageFactoryFromHDF5.h.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::ImageFactoryFromHDF5< TImageContainer >::dataspace, DGtal::HyperRectDomain< TSpace >::end(), DGtal::Trace::error(), DGtal::H5DSpecializations< TImageFactory, T >::H5DreadS(), DGtal::ImageFactoryFromHDF5< TImageContainer >::myDomain, DGtal::ImageContainerBySTLVector< TDomain, TValue >::setValue(), and DGtal::trace.
void DGtal::ImageFactoryFromHDF5< TImageContainer >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
hid_t DGtal::ImageFactoryFromHDF5< TImageContainer >::dataset |
Definition at line 568 of file ImageFactoryFromHDF5.h.
Referenced by DGtal::ImageFactoryFromHDF5< TImageContainer >::ImageFactoryFromHDF5(), and DGtal::ImageFactoryFromHDF5< TImageContainer >::~ImageFactoryFromHDF5().
hid_t DGtal::ImageFactoryFromHDF5< TImageContainer >::dataspace |
Definition at line 569 of file ImageFactoryFromHDF5.h.
Referenced by DGtal::ImageFactoryFromHDF5< TImageContainer >::flushImage(), DGtal::ImageFactoryFromHDF5< TImageContainer >::ImageFactoryFromHDF5(), DGtal::ImageFactoryFromHDF5< TImageContainer >::requestImage(), and DGtal::ImageFactoryFromHDF5< TImageContainer >::~ImageFactoryFromHDF5().
hid_t DGtal::ImageFactoryFromHDF5< TImageContainer >::datatype |
Definition at line 569 of file ImageFactoryFromHDF5.h.
Referenced by DGtal::ImageFactoryFromHDF5< TImageContainer >::ImageFactoryFromHDF5(), and DGtal::ImageFactoryFromHDF5< TImageContainer >::~ImageFactoryFromHDF5().
hid_t DGtal::ImageFactoryFromHDF5< TImageContainer >::file |
Definition at line 568 of file ImageFactoryFromHDF5.h.
Referenced by DGtal::ImageFactoryFromHDF5< TImageContainer >::ImageFactoryFromHDF5(), and DGtal::ImageFactoryFromHDF5< TImageContainer >::~ImageFactoryFromHDF5().
|
protected |
Definition at line 563 of file ImageFactoryFromHDF5.h.
Referenced by DGtal::ImageFactoryFromHDF5< TImageContainer >::ImageFactoryFromHDF5().
|
protected |
Alias on the image domain.
Default constructor.
Definition at line 559 of file ImageFactoryFromHDF5.h.
Referenced by DGtal::ImageFactoryFromHDF5< TImageContainer >::domain(), DGtal::ImageFactoryFromHDF5< TImageContainer >::flushImage(), DGtal::ImageFactoryFromHDF5< TImageContainer >::ImageFactoryFromHDF5(), DGtal::ImageFactoryFromHDF5< TImageContainer >::isValid(), DGtal::ImageFactoryFromHDF5< TImageContainer >::requestImage(), and DGtal::ImageFactoryFromHDF5< TImageContainer >::~ImageFactoryFromHDF5().
|
protected |
HDF5 filename and datasetname.
Definition at line 562 of file ImageFactoryFromHDF5.h.
Referenced by DGtal::ImageFactoryFromHDF5< TImageContainer >::ImageFactoryFromHDF5().