casa
$Rev:20696$
|
A class in which to store and allow read-only access to image metadata. More...
#include <ImageMetaData.h>
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< Int > | directionShape () 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 |
A class in which to store and allow read-only access to image metadata.
Public interface
The ImageMetaData class name is derived from its role as holding image metadata.
The ImageMetaData object is meant to allow access to image metadata (eg, shape, coordinate system info such as spectral and polarization axes numbers, etc).
Construct an object of this class by passing the associated image to the constructor.
PagedImage<Float> myImage("myImage");
ImageMetaData<Float> myImageMetaData(myImage);
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.
casa::ImageMetaData< T >::ImageMetaData | ( | const ImageInterface< Float > *const & | image | ) |
casa::ImageMetaData< T >::ImageMetaData | ( | ) | [inline, private] |
Definition at line 136 of file ImageMetaData.h.
String casa::ImageMetaData< T >::_doStandardFormat | ( | Double | value, |
const String & | unit | ||
) | const [private] |
void casa::ImageMetaData< T >::_fieldToLog | ( | const String & | field, |
Int | precision = -1 |
||
) | const [private] |
precision < 0 => use default precision when printing numbers
void casa::ImageMetaData< T >::_toLog | ( | ) | const [private] |
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.
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.
Bool casa::ImageMetaData< T >::isChannelNumberValid | ( | const uInt | chan | ) | const |
Is the specified channel number valid for this image?
Bool casa::ImageMetaData< T >::isStokesValid | ( | const String & | stokesString | ) | const |
is the specified stokes parameter present in the image?
uInt casa::ImageMetaData< T >::nChannels | ( | ) | const |
uInt casa::ImageMetaData< T >::nStokes | ( | ) | const |
Get the number of stokes parameters in this image.
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.
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.
Record casa::ImageMetaData< T >::toRecord | ( | Bool | verbose | ) |
convert the header info to a Record and list to logger if verbose=True
const String casa::ImageMetaData< T >::_BEAMMAJOR [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_BEAMMINOR [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_BEAMPA [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_BUNIT [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_CTYPE [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_DATAMAX [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_DATAMIN [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_EQUINOX [static, private] |
Definition at line 122 of file ImageMetaData.h.
Record casa::ImageMetaData< T >::_header [private] |
Definition at line 134 of file ImageMetaData.h.
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.
const String casa::ImageMetaData< T >::_IMTYPE [static, private] |
Definition at line 122 of file ImageMetaData.h.
std::auto_ptr<LogIO> casa::ImageMetaData< T >::_log [private] |
Definition at line 133 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_MASKS [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_MAXPIXPOS [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_MAXPOS [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_MINPIXPOS [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_MINPOS [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_OBJECT [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_OBSDATE [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_OBSERVER [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_PROJECTION [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_REFFREQTYPE [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_RESTFREQ [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_SHAPE [static, private] |
Definition at line 122 of file ImageMetaData.h.
const String casa::ImageMetaData< T >::_TELESCOPE [static, private] |
Definition at line 122 of file ImageMetaData.h.