casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
casa::ImageMetaData< T > Class Template Reference

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

#include <ImageMetaData.h>

List of all members.

Public Member Functions

 ImageMetaData (const ImageInterface< Float > *const &image)
uInt nChannels () const
Bool isChannelNumberValid (const uInt chan) const
 Is the specified channel number valid for this image?
Int stokesPixelNumber (const String &stokesString) const
 Get the pixel number on the polarization axis of the specified stokes parameter.
String stokesAtPixel (const uInt pixel) const
 get the stokes parameter at the specified pixel value on the polarization axis.
uInt nStokes () const
 Get the number of stokes parameters in this image.
Bool isStokesValid (const String &stokesString) const
 is the specified stokes parameter present in the image?
Vector< IntdirectionShape () const
 Get the shape of the direction axes.
Bool areChannelAndStokesValid (String &message, const uInt chan, const String &stokesString) const
 if the specified stokes parameter is valid.
Record toRecord (Bool verbose)
 convert the header info to a Record and list to logger if verbose=True

Private Member Functions

 ImageMetaData ()
void _toLog () const
void _fieldToLog (const String &field, Int precision=-1) const
 precision < 0 => use default precision when printing numbers
String _doStandardFormat (Double value, const String &unit) const

Private Attributes

const ImageInterface< Float >
*const 
_image
 I really would like this to be a shared pointer, but that currently causes some major issues for classes that depend on this.
std::auto_ptr< LogIO_log
Record _header

Static Private Attributes

static const String _BEAMMAJOR
static const String _BEAMMINOR
static const String _BEAMPA
static const String _BUNIT
static const String _CTYPE
static const String _DATAMAX
static const String _DATAMIN
static const String _EQUINOX
static const String _IMTYPE
static const String _MASKS
static const String _MAXPIXPOS
static const String _MAXPOS
static const String _MINPIXPOS
static const String _MINPOS
static const String _OBJECT
static const String _OBSDATE
static const String _OBSERVER
static const String _PROJECTION
static const String _RESTFREQ
static const String _REFFREQTYPE
static const String _SHAPE
static const String _TELESCOPE

Detailed Description

template<class T>
class casa::ImageMetaData< T >

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

Intended use:

Public interface

Prerequisite

Etymology

The ImageMetaData class name is derived from its role as holding image metadata.

Synopsis

The ImageMetaData object is meant to allow access to image metadata (eg, shape, coordinate system info such as spectral and polarization axes numbers, etc).

Example

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

    PagedImage<Float> myImage("myImage");
    ImageMetaData<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 75 of file ImageMetaData.h.


Constructor & Destructor Documentation

template<class T >
casa::ImageMetaData< T >::ImageMetaData ( const ImageInterface< Float > *const &  image)
template<class T >
casa::ImageMetaData< T >::ImageMetaData ( ) [inline, private]

Definition at line 136 of file ImageMetaData.h.


Member Function Documentation

template<class T >
String casa::ImageMetaData< T >::_doStandardFormat ( Double  value,
const String unit 
) const [private]
template<class T >
void casa::ImageMetaData< T >::_fieldToLog ( const String field,
Int  precision = -1 
) const [private]

precision < 0 => use default precision when printing numbers

template<class T >
void casa::ImageMetaData< T >::_toLog ( ) const [private]
template<class T >
Bool casa::ImageMetaData< T >::areChannelAndStokesValid ( String message,
const uInt  chan,
const String stokesString 
) const

if the specified stokes parameter is valid.

A message suitable for error notification is returned in the form of an in-out parameter if one or both of these is invalid.

template<class T >
Vector<Int> casa::ImageMetaData< T >::directionShape ( ) const

Get the shape of the direction axes.

Returns a two element Vector if there is a direction coordinate, if not returns a zero element vector.

template<class T >
Bool casa::ImageMetaData< T >::isChannelNumberValid ( const uInt  chan) const

Is the specified channel number valid for this image?

template<class T >
Bool casa::ImageMetaData< T >::isStokesValid ( const String stokesString) const

is the specified stokes parameter present in the image?

template<class T >
uInt casa::ImageMetaData< T >::nChannels ( ) const
template<class T >
uInt casa::ImageMetaData< T >::nStokes ( ) const

Get the number of stokes parameters in this image.

template<class T >
String casa::ImageMetaData< T >::stokesAtPixel ( const uInt  pixel) const

get the stokes parameter at the specified pixel value on the polarization axis.

returns "" if the specified pixel is out of range or if no polarization axis.

template<class T >
Int casa::ImageMetaData< T >::stokesPixelNumber ( const String stokesString) const

Get the pixel number on the polarization axis of the specified stokes parameter.

If the specified stokes parameter does not exist in the image, the value returned is not gauranteed to be anything other than outside the range of 0 to nStokes-1 inclusive. Return -1 if the specified stokes parameter is not present or if this image does not have a polarization axis.

template<class T >
Record casa::ImageMetaData< T >::toRecord ( Bool  verbose)

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


Member Data Documentation

template<class T >
const String casa::ImageMetaData< T >::_BEAMMAJOR [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_BEAMMINOR [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_BEAMPA [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_BUNIT [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_CTYPE [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_DATAMAX [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_DATAMIN [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_EQUINOX [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
Record casa::ImageMetaData< T >::_header [private]

Definition at line 134 of file ImageMetaData.h.

template<class T >
const ImageInterface<Float>* const casa::ImageMetaData< T >::_image [private]

I really would like this to be a shared pointer, but that currently causes some major issues for classes that depend on this.

If I can move ImageAnalysis::setRestoringBeam() into a class of its own that will mitigate some difficulties

Definition at line 132 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_IMTYPE [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
std::auto_ptr<LogIO> casa::ImageMetaData< T >::_log [private]

Definition at line 133 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_MASKS [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_MAXPIXPOS [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_MAXPOS [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_MINPIXPOS [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_MINPOS [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_OBJECT [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_OBSDATE [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_OBSERVER [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_PROJECTION [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_REFFREQTYPE [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_RESTFREQ [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_SHAPE [static, private]

Definition at line 122 of file ImageMetaData.h.

template<class T >
const String casa::ImageMetaData< T >::_TELESCOPE [static, private]

Definition at line 122 of file ImageMetaData.h.


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