casacore
|
#include <ImageAttrHandler.h>
Public Member Functions | |
ImageAttrHandler () | |
Default constructor. More... | |
virtual | ~ImageAttrHandler () |
virtual void | flush () |
Flush the attibrutes if needed. More... | |
virtual Bool | hasGroup (const String &name) |
Test if the given attribute group is present. More... | |
virtual Vector< String > | groupNames () const |
Get all attribute group names. More... | |
virtual ImageAttrGroup & | openGroup (const String &groupName) |
Get access to a group. More... | |
virtual ImageAttrGroup & | createGroup (const String &groupName) |
Create an attribute group with the given name. More... | |
virtual void | closeGroup (const String &groupName) |
Close the group with the given name. More... | |
Abstract base class for an image attributes handler.
Public interface
This class makes it possible to store extra attributes with an image to describe atrbitrary meta information.
For LOFAR it was needed to store extra meta information and to be able to convert it from casacore table format to HDF5 format and vice-versa. Furthermore, it must be possible to access the information in a way that arbitrary info can be stored and retrieved.
An ImageAttrHandler object handles those attributes in an image. Specific handler classes exist for images stored in casacore and in HDF5 format. The attributes are divided into group which are handled by ImageAttrGroup. A group (e.g. LOFAR_SOURCES) maps to a subtable in casacore format and a group in HDF5 format.
This example shows how to get attributes from an image.
LOFAR needed functionality to store arbitrary attributes.
Definition at line 91 of file ImageAttrHandler.h.
|
inline |
Default constructor.
Definition at line 95 of file ImageAttrHandler.h.
|
virtual |
|
virtual |
Close the group with the given name.
The default implementation does nothing.
Reimplemented in casacore::ImageAttrHandlerHDF5, and casacore::ImageAttrHandlerCasa.
|
virtual |
Create an attribute group with the given name.
The default implementation throws an exception.
Reimplemented in casacore::ImageAttrHandlerHDF5, and casacore::ImageAttrHandlerCasa.
|
virtual |
Flush the attibrutes if needed.
The default implementation does nothing.
Reimplemented in casacore::ImageAttrHandlerHDF5, and casacore::ImageAttrHandlerCasa.
Get all attribute group names.
The default implementation returns an empty vector.
Reimplemented in casacore::ImageAttrHandlerHDF5, and casacore::ImageAttrHandlerCasa.
Test if the given attribute group is present.
The default implementation returns False.
Reimplemented in casacore::ImageAttrHandlerHDF5, and casacore::ImageAttrHandlerCasa.
|
virtual |
Get access to a group.
The default implementation throws an exception.
Reimplemented in casacore::ImageAttrHandlerHDF5, and casacore::ImageAttrHandlerCasa.