casa::ImageMetaDataRW Class Reference

A class in which to store and allow read-write access to image metadata. More...

#include <ImageMetaDataRW.h>

Inheritance diagram for casa::ImageMetaDataRW:
casa::ImageMetaDataBase

List of all members.

Public Member Functions

 ImageMetaDataRW ()
 ImageMetaDataRW (SPIIF image)
 ImageMetaDataRW (SPIIC image)
Bool remove (const String &key)
 remove, if possible, the specified parameter.
Bool removeMask (const String &maskName)
 remove the specified mask.
Record toRecord (Bool verbose) const
 convert the header info to a Record and list to logger if verbose=True
Bool add (const String &key, const ValueHolder &value)
 add a key-value pair
Bool set (const String &key, const ValueHolder &value)
 set (update) the value associated with the key.
void setCsys (const Record &coordinates)
 set the coordinate system from a Record.

Protected Member Functions

SPCIIF _getFloatImage () const
SPCIIC _getComplexImage () const
const ImageInfo & _getInfo () const
const CoordinateSystem & _getCoords () const
Vector< String > _getAxisNames () const
Vector< String > _getAxisUnits () const
GaussianBeam _getBeam () const
String _getBrightnessUnit () const
String _getImType () const
vector< Quantity > _getIncrements () const
Vector< String > _getMasks () const
String _getObject () const
String _getEquinox () const
MEpoch _getObsDate () const
String _getObserver () const
String _getProjection () const
String _getRefFreqType () const
Vector< Double > _getRefPixel () const
Vector< Quantity > _getRefValue () const
Quantity _getRestFrequency () const
String _getTelescope () const
Record _getStatistics () const
Vector< String > _getStokes () const

Private Member Functions

std::unique_ptr< CoordinateSystem > _makeCoordinateSystem (const Record &coordinates, const IPosition &shape)
void _setCoordinateValue (const String &key, const ValueHolder &value)
String _getString (const String &key, const ValueHolder &value) const
void _setUserDefined (const String &key, const ValueHolder &v)
Bool _setUnit (const String &unit)
Bool _setCsys (const CoordinateSystem &csys)
Bool _setImageInfo (const ImageInfo &info)
const TableRecord _miscInfo () const
void _setMiscInfo (const TableRecord &rec)
Bool _hasRegion (const String &maskName) const
Bool _isWritable () const
template<class T , class U >
void _modHistory (const String &func, const String &keyword, const T &oldVal, const U &newVal)
template<class T >
void _addHistory (const String &func, const String &keyword, const T &newVal)
void _toHistory (const String &origin, const String &record)

Static Private Member Functions

static Quantity _getQuantity (const ValueHolder &v)
template<class T >
static String _quotify (const T &val)

Private Attributes

SPIIF _floatImage
SPIIC _complexImage
String _bunit
 These are mutable because they are only to be set once and then cached.
String _imtype
String _object
String _equinox
String _observer
String _projection
String _reffreqtype
String _telescope
MEpoch _obsdate
Quantity _restFreq
Vector< String > _masks
Vector< String > _stokes
GaussianBeam _beam
Vector< String > _axisNames
Vector< String > _axisUnits
Vector< Double > _refPixel
vector< Quantity > _refVal
vector< Quantity > _increment
Record _header
Record _stats

Detailed Description

A class in which to store and allow read-write access to image metadata.

Intended use:

Public interface

Prerequisite

Etymology

The ImageMetaDataRW class name is derived from its role as holding image metadata and providing read-write access.

Synopsis

The ImageMetaDataRW object is meant to allow access to image metadata (eg, shape, coordinate system info such as spectral and polarization axes numbers, etc). It allows write access to some values. This class contains the writable methods and extends ImageMetaData which contains the read-only methods.

Example

Construct an object of this class by passing the associated image to the constructor.

 PagedImage<Float> myImage("myImage");
 ImageMetaDataRW<Float> myImageMetaData(myImage);

Motivation

This class is meant to provide an object-oriented interface for accessing image metadata without polluting the ImageInterface and CoordinateSystem classes with these methods.

Definition at line 78 of file ImageMetaDataRW.h.


Constructor & Destructor Documentation

casa::ImageMetaDataRW::ImageMetaDataRW (  ) 
casa::ImageMetaDataRW::ImageMetaDataRW ( SPIIF  image  ) 
casa::ImageMetaDataRW::ImageMetaDataRW ( SPIIC  image  ) 

Member Function Documentation

template<class T >
void casa::ImageMetaDataRW::_addHistory ( const String &  func,
const String &  keyword,
const T &  newVal 
) [inline, private]
Vector<String> casa::ImageMetaDataRW::_getAxisNames (  )  const [protected, virtual]
Vector<String> casa::ImageMetaDataRW::_getAxisUnits (  )  const [protected, virtual]
GaussianBeam casa::ImageMetaDataRW::_getBeam (  )  const [protected, virtual]
String casa::ImageMetaDataRW::_getBrightnessUnit (  )  const [protected, virtual]
SPCIIC casa::ImageMetaDataRW::_getComplexImage (  )  const [inline, protected, virtual]

Implements casa::ImageMetaDataBase.

Definition at line 111 of file ImageMetaDataRW.h.

References _complexImage.

const CoordinateSystem& casa::ImageMetaDataRW::_getCoords (  )  const [protected, virtual]
String casa::ImageMetaDataRW::_getEquinox (  )  const [protected, virtual]
SPCIIF casa::ImageMetaDataRW::_getFloatImage (  )  const [inline, protected, virtual]

Implements casa::ImageMetaDataBase.

Definition at line 109 of file ImageMetaDataRW.h.

References _floatImage.

String casa::ImageMetaDataRW::_getImType (  )  const [protected, virtual]
vector<Quantity> casa::ImageMetaDataRW::_getIncrements (  )  const [protected, virtual]
const ImageInfo& casa::ImageMetaDataRW::_getInfo (  )  const [protected, virtual]
Vector<String> casa::ImageMetaDataRW::_getMasks (  )  const [protected, virtual]
String casa::ImageMetaDataRW::_getObject (  )  const [protected, virtual]
MEpoch casa::ImageMetaDataRW::_getObsDate (  )  const [protected, virtual]
String casa::ImageMetaDataRW::_getObserver (  )  const [protected, virtual]
String casa::ImageMetaDataRW::_getProjection (  )  const [protected, virtual]

Reimplemented from casa::ImageMetaDataBase.

static Quantity casa::ImageMetaDataRW::_getQuantity ( const ValueHolder &  v  )  [static, private]
String casa::ImageMetaDataRW::_getRefFreqType (  )  const [protected, virtual]
Vector<Double> casa::ImageMetaDataRW::_getRefPixel (  )  const [protected, virtual]
Vector<Quantity> casa::ImageMetaDataRW::_getRefValue (  )  const [protected, virtual]
Quantity casa::ImageMetaDataRW::_getRestFrequency (  )  const [protected, virtual]
Record casa::ImageMetaDataRW::_getStatistics (  )  const [protected, virtual]
Vector<String> casa::ImageMetaDataRW::_getStokes (  )  const [protected, virtual]
String casa::ImageMetaDataRW::_getString ( const String &  key,
const ValueHolder &  value 
) const [private]
String casa::ImageMetaDataRW::_getTelescope (  )  const [protected, virtual]
Bool casa::ImageMetaDataRW::_hasRegion ( const String &  maskName  )  const [private]
Bool casa::ImageMetaDataRW::_isWritable (  )  const [private]
std::unique_ptr<CoordinateSystem> casa::ImageMetaDataRW::_makeCoordinateSystem ( const Record &  coordinates,
const IPosition &  shape 
) [private]
const TableRecord casa::ImageMetaDataRW::_miscInfo (  )  const [private]

Reimplemented from casa::ImageMetaDataBase.

template<class T , class U >
void casa::ImageMetaDataRW::_modHistory ( const String &  func,
const String &  keyword,
const T &  oldVal,
const U &  newVal 
) [inline, private]
template<class T >
static String casa::ImageMetaDataRW::_quotify ( const T &  val  )  [inline, static, private]
void casa::ImageMetaDataRW::_setCoordinateValue ( const String &  key,
const ValueHolder &  value 
) [private]
Bool casa::ImageMetaDataRW::_setCsys ( const CoordinateSystem &  csys  )  [private]
Bool casa::ImageMetaDataRW::_setImageInfo ( const ImageInfo &  info  )  [private]
void casa::ImageMetaDataRW::_setMiscInfo ( const TableRecord &  rec  )  [private]
Bool casa::ImageMetaDataRW::_setUnit ( const String &  unit  )  [private]
void casa::ImageMetaDataRW::_setUserDefined ( const String &  key,
const ValueHolder &  v 
) [private]
void casa::ImageMetaDataRW::_toHistory ( const String &  origin,
const String &  record 
) [private]
Bool casa::ImageMetaDataRW::add ( const String &  key,
const ValueHolder &  value 
)

add a key-value pair

Bool casa::ImageMetaDataRW::remove ( const String &  key  ) 

remove, if possible, the specified parameter.

Returns True if removal was successful.

Bool casa::ImageMetaDataRW::removeMask ( const String &  maskName  ) 

remove the specified mask.

If the empty string is given, all masks will be removed. Returns True if successful, False otherwise or if the specfied mask does not exist.

Bool casa::ImageMetaDataRW::set ( const String &  key,
const ValueHolder &  value 
)

set (update) the value associated with the key.

void casa::ImageMetaDataRW::setCsys ( const Record &  coordinates  ) 

set the coordinate system from a Record.

Record casa::ImageMetaDataRW::toRecord ( Bool  verbose  )  const [virtual]

convert the header info to a Record and list to logger if verbose=True

Implements casa::ImageMetaDataBase.


Member Data Documentation

Vector<String> casa::ImageMetaDataRW::_axisNames [mutable, private]

Definition at line 168 of file ImageMetaDataRW.h.

Vector<String> casa::ImageMetaDataRW::_axisUnits [mutable, private]

Definition at line 168 of file ImageMetaDataRW.h.

GaussianBeam casa::ImageMetaDataRW::_beam [mutable, private]

Definition at line 167 of file ImageMetaDataRW.h.

String casa::ImageMetaDataRW::_bunit [mutable, private]

These are mutable because they are only to be set once and then cached.

If this contract is broken, and they are set elsewhere defects will likely occur.

Definition at line 162 of file ImageMetaDataRW.h.

Definition at line 157 of file ImageMetaDataRW.h.

Referenced by _getComplexImage().

String casa::ImageMetaDataRW::_equinox [mutable, private]

Definition at line 162 of file ImageMetaDataRW.h.

Definition at line 156 of file ImageMetaDataRW.h.

Referenced by _getFloatImage().

Record casa::ImageMetaDataRW::_header [mutable, private]

Definition at line 171 of file ImageMetaDataRW.h.

String casa::ImageMetaDataRW::_imtype [mutable, private]

Definition at line 162 of file ImageMetaDataRW.h.

vector<Quantity> casa::ImageMetaDataRW::_increment [mutable, private]

Definition at line 170 of file ImageMetaDataRW.h.

Vector<String> casa::ImageMetaDataRW::_masks [mutable, private]

Definition at line 166 of file ImageMetaDataRW.h.

String casa::ImageMetaDataRW::_object [mutable, private]

Definition at line 162 of file ImageMetaDataRW.h.

MEpoch casa::ImageMetaDataRW::_obsdate [mutable, private]

Definition at line 164 of file ImageMetaDataRW.h.

String casa::ImageMetaDataRW::_observer [mutable, private]

Definition at line 162 of file ImageMetaDataRW.h.

String casa::ImageMetaDataRW::_projection [mutable, private]

Definition at line 162 of file ImageMetaDataRW.h.

String casa::ImageMetaDataRW::_reffreqtype [mutable, private]

Definition at line 162 of file ImageMetaDataRW.h.

Vector<Double> casa::ImageMetaDataRW::_refPixel [mutable, private]

Definition at line 169 of file ImageMetaDataRW.h.

vector<Quantity> casa::ImageMetaDataRW::_refVal [mutable, private]

Definition at line 170 of file ImageMetaDataRW.h.

Quantity casa::ImageMetaDataRW::_restFreq [mutable, private]

Definition at line 165 of file ImageMetaDataRW.h.

Record casa::ImageMetaDataRW::_stats [mutable, private]

Definition at line 171 of file ImageMetaDataRW.h.

Vector<String> casa::ImageMetaDataRW::_stokes [mutable, private]

Definition at line 166 of file ImageMetaDataRW.h.

String casa::ImageMetaDataRW::_telescope [mutable, private]

Definition at line 162 of file ImageMetaDataRW.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1