casa
$Rev:20696$
|
Provides and lists information about the header of an image. More...
#include <ImageSummary.h>
Public Member Functions | |
ImageSummary (const ImageInterface< T > &) | |
Constructor. | |
ImageSummary (const ImageSummary< T > &other) | |
Copy constructor. | |
~ImageSummary () | |
Destructor. | |
ImageSummary< T > & | operator= (const ImageSummary< T > &other) |
Assignment operator. | |
Int | ndim () const |
Retrieve number of image dimension. | |
IPosition | shape () const |
Retrieve image shape. | |
IPosition | tileShape () const |
Retrieve tile shape with which image is stored on disk. | |
Vector< String > | axisNames (Bool pixelOrder=True) const |
Retrieve axis names in pixel or world axis order. | |
Vector< Double > | referencePixels (Bool oneRel=True) const |
Retrieve reference pixels (0 or 1 rel) | |
Vector< Double > | referenceValues (Bool pixelOrder=True) const |
Retrieve reference values in pixel or world axis order. | |
Vector< Double > | axisIncrements (Bool pixelOrder=True) const |
Retrieve axis increments in pixel or world axis order. | |
Vector< String > | axisUnits (Bool pixelOrder=True) const |
Retrieve axis units in pixel or world axis order. | |
Unit | units () const |
Retrieve image units. | |
String | name () const |
Retrieve image name. | |
String | observer () const |
Retrieve observer name. | |
String | obsDate (MEpoch &date) const |
Return epoch of observation as MEpoch or formatted string. | |
String | telescope () const |
Return telescope. | |
Bool | restFrequency (String &restFreqString, Quantum< Double > &restFreq) const |
Return rest frequency. | |
Bool | frequencySystem (String &freqTypeString, MFrequency::Types &freqType) const |
Return frequency system. | |
Bool | directionSystem (String &dirTypeString, MDirection::Types &dirType) const |
Return direction system. | |
Bool | hasAMask () const |
Retrieve whether image has mask or not. | |
Vector< String > | maskNames () const |
Retrieve mask names. | |
Vector< String > | regionNames () const |
Retrieve region names. | |
String | defaultMaskName () const |
Retrieve default mask name. | |
String | imageType () const |
Retrieve image type. | |
Vector< String > | list (LogIO &os, const MDoppler::Types velocityType=MDoppler::RADIO, Bool postLocally=False, const Bool verbose=False) |
List all header information. | |
Bool | setNewImage (const ImageInterface< T > &image) |
Set a new image. | |
Private Member Functions | |
String | makeMasksString () const |
String | makeRegionsString () const |
void | _listMultiBeam (LogIO &os, const Bool verbose) const |
void | _chanInfoToStream (ostream &os, const SpectralCoordinate *const &spCoord, const uInt chan, const uInt chanWidth, const uInt freqPrec, const uInt velWidth, const uInt velPrec) const |
void | _beamToStream (ostream &os, const GaussianBeam &beam, const Unit &unit) const |
Private Attributes | |
CoordinateSystem | cSys_p |
ObsInfo | obsInfo_p |
ImageInfo | imageInfo_p |
const ImageInterface< T > * | pImage_p |
Provides and lists information about the header of an image.
Public interface
This class lists the ancilliary descriptive information from an image
Images consist of pixel values and descriptive information. This information describes the coordinate system, the image units etc. This class enables you to retrieve the descriptive information and/or list it.
The functions that retrieve specific coordinate information in vectors (e.g. referenceValues
) return it in the order of the (pixel) axes of the image. Note that this can be different from the order in which the CoordinateSystem functions of similar name might return them. This is because the order of the coordinates in the CoordinateSystem is not necessarily the same order as the pixel axes in the associated image, although of course there is a known association.
Tip: This class lists information about the coordinates in the image; The Coordinates classes can maintain the information in a variety of units; For example, angular quantities are by default in radians, but the manipulator of a CoordinateSystem may have converted to some other unit such as arcseconds; This means that when this class fetches coordinate information and returns it to you (such as the referenceValues()
function, the information is returned to you in whatever units the coordinates are currently in; It does not convert it;
PagedImage<Float> inImage(fileName); ImageSummary<Float> summary(inImage); LogOrigin or("myClass", "myFunction(...)", WHERE); LogIO os(or); summary.list(os);
A PagedImage
object is constructed and then logged to the supplied LogIO
object.
The viewing of the descriptive image information is a basic capability.
Definition at line 120 of file ImageSummary.h.
casa::ImageSummary< T >::ImageSummary | ( | const ImageInterface< T > & | ) |
Constructor.
casa::ImageSummary< T >::ImageSummary | ( | const ImageSummary< T > & | other | ) |
Copy constructor.
casa::ImageSummary< T >::~ImageSummary | ( | ) |
Destructor.
void casa::ImageSummary< T >::_beamToStream | ( | ostream & | os, |
const GaussianBeam & | beam, | ||
const Unit & | unit | ||
) | const [private] |
void casa::ImageSummary< T >::_chanInfoToStream | ( | ostream & | os, |
const SpectralCoordinate *const & | spCoord, | ||
const uInt | chan, | ||
const uInt | chanWidth, | ||
const uInt | freqPrec, | ||
const uInt | velWidth, | ||
const uInt | velPrec | ||
) | const [private] |
void casa::ImageSummary< T >::_listMultiBeam | ( | LogIO & | os, |
const Bool | verbose | ||
) | const [private] |
Vector<Double> casa::ImageSummary< T >::axisIncrements | ( | Bool | pixelOrder = True | ) | const |
Retrieve axis increments in pixel or world axis order.
Retrieve axis names in pixel or world axis order.
Retrieve axis units in pixel or world axis order.
String casa::ImageSummary< T >::defaultMaskName | ( | ) | const |
Retrieve default mask name.
Empty if none
Bool casa::ImageSummary< T >::directionSystem | ( | String & | dirTypeString, |
MDirection::Types & | dirType | ||
) | const |
Return direction system.
Returns False if none.
Bool casa::ImageSummary< T >::frequencySystem | ( | String & | freqTypeString, |
MFrequency::Types & | freqType | ||
) | const |
Return frequency system.
Returns False if none.
Bool casa::ImageSummary< T >::hasAMask | ( | ) | const |
Retrieve whether image has mask or not.
String casa::ImageSummary< T >::imageType | ( | ) | const |
Retrieve image type.
Vector<String> casa::ImageSummary< T >::list | ( | LogIO & | os, |
const MDoppler::Types | velocityType = MDoppler::RADIO , |
||
Bool | postLocally = False , |
||
const Bool | verbose = False |
||
) |
List all header information.
By default, the reference values and pixel increments are converted to a "nice" unit before formatting (e.g. RA is shown as HH:MM:SS.S). For spectral axes, both frequency and velocity information is listed. You can specify what velocity definition you want with velocityType
If postLocally is True, the formatted strings are returned in the return value
String casa::ImageSummary< T >::makeMasksString | ( | ) | const [private] |
String casa::ImageSummary< T >::makeRegionsString | ( | ) | const [private] |
Vector<String> casa::ImageSummary< T >::maskNames | ( | ) | const |
Retrieve mask names.
String casa::ImageSummary< T >::name | ( | ) | const |
Retrieve image name.
Any prepended path is stripped off.
Int casa::ImageSummary< T >::ndim | ( | ) | const |
Retrieve number of image dimension.
String casa::ImageSummary< T >::obsDate | ( | MEpoch & | date | ) | const |
Return epoch of observation as MEpoch or formatted string.
String casa::ImageSummary< T >::observer | ( | ) | const |
Retrieve observer name.
ImageSummary<T>& casa::ImageSummary< T >::operator= | ( | const ImageSummary< T > & | other | ) |
Assignment operator.
Vector<Double> casa::ImageSummary< T >::referencePixels | ( | Bool | oneRel = True | ) | const |
Retrieve reference pixels (0 or 1 rel)
Vector<Double> casa::ImageSummary< T >::referenceValues | ( | Bool | pixelOrder = True | ) | const |
Retrieve reference values in pixel or world axis order.
Vector<String> casa::ImageSummary< T >::regionNames | ( | ) | const |
Retrieve region names.
Bool casa::ImageSummary< T >::restFrequency | ( | String & | restFreqString, |
Quantum< Double > & | restFreq | ||
) | const |
Return rest frequency.
Returns False if none.
Bool casa::ImageSummary< T >::setNewImage | ( | const ImageInterface< T > & | image | ) |
Set a new image.
IPosition casa::ImageSummary< T >::shape | ( | ) | const |
Retrieve image shape.
String casa::ImageSummary< T >::telescope | ( | ) | const |
Return telescope.
IPosition casa::ImageSummary< T >::tileShape | ( | ) | const |
Retrieve tile shape with which image is stored on disk.
Unit casa::ImageSummary< T >::units | ( | ) | const |
Retrieve image units.
CoordinateSystem casa::ImageSummary< T >::cSys_p [private] |
Definition at line 215 of file ImageSummary.h.
ImageInfo casa::ImageSummary< T >::imageInfo_p [private] |
Definition at line 217 of file ImageSummary.h.
ObsInfo casa::ImageSummary< T >::obsInfo_p [private] |
Definition at line 216 of file ImageSummary.h.
const ImageInterface<T>* casa::ImageSummary< T >::pImage_p [private] |
Definition at line 218 of file ImageSummary.h.