casacore
|
Abstract base class for an image attributes handler. More...
#include <ImageAttrHandlerCasa.h>
Public Member Functions | |
ImageAttrHandlerCasa () | |
Default construct from the image table. More... | |
ImageAttrHandlerCasa & | attachTable (const Table &image, Bool createHandler=False) |
Attach the table and return this object. More... | |
virtual | ~ImageAttrHandlerCasa () |
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... | |
Public Member Functions inherited from casacore::ImageAttrHandler | |
ImageAttrHandler () | |
Default constructor. More... | |
virtual | ~ImageAttrHandler () |
Private Attributes | |
Bool | itsCanAdd |
Table | itsImageTable |
std::map< String, ImageAttrGroupCasa > | itsGroupMap |
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.
The attributes are divided into handlers. Each handler can reside in a subtable of the image or in a handler in HDF5. All attributes in a handler have the same number of values, where each value can be a scalar or (small) array. It is possible to define units and measure info for an attribute.
This example shows how to get attributes from an image. make it known to the image.
LOFAR needed functionality to store arbitrary attributes.
Definition at line 87 of file ImageAttrHandlerCasa.h.
casacore::ImageAttrHandlerCasa::ImageAttrHandlerCasa | ( | ) |
Default construct from the image table.
|
virtual |
ImageAttrHandlerCasa& casacore::ImageAttrHandlerCasa::attachTable | ( | const Table & | image, |
Bool | createHandler = False |
||
) |
Attach the table and return this object.
It looks for the table keyword ATTRGROUPS which contains the subtables defining the attribute groups. If the keyword does not exist, it will be added if createHandler
is set. Otherwise the handler is an empty one and no groups can be added to it.
|
virtual |
Close the group with the given name.
It will flush its attributes. Nothing is done if it is not open.
Reimplemented from casacore::ImageAttrHandler.
|
virtual |
Create an attribute group with the given name.
Reimplemented from casacore::ImageAttrHandler.
|
virtual |
Flush the attibrutes if needed.
Reimplemented from casacore::ImageAttrHandler.
Get all attribute group names.
Reimplemented from casacore::ImageAttrHandler.
Test if the given attribute group is present.
Reimplemented from casacore::ImageAttrHandler.
|
virtual |
Get access to a group.
Reimplemented from casacore::ImageAttrHandler.
|
private |
Definition at line 124 of file ImageAttrHandlerCasa.h.
|
private |
Definition at line 126 of file ImageAttrHandlerCasa.h.
|
private |
Definition at line 125 of file ImageAttrHandlerCasa.h.