casacore
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::ImageSummary< T > Class Template Reference

More...

#include <ImageSummary.h>

Public Member Functions

 ImageSummary (const ImageInterface< T > &)
 Constructor. More...
 
 ImageSummary (const ImageSummary< T > &other)
 Copy constructor. More...
 
 ~ImageSummary ()
 Destructor. More...
 
ImageSummary< T > & operator= (const ImageSummary< T > &other)
 Assignment operator. More...
 
Int ndim () const
 Retrieve number of image dimension. More...
 
IPosition shape () const
 Retrieve image shape. More...
 
IPosition tileShape () const
 Retrieve tile shape with which image is stored on disk. More...
 
Vector< StringaxisNames (Bool pixelOrder=True) const
 Retrieve axis names in pixel or world axis order. More...
 
Vector< DoublereferencePixels (Bool oneRel=True) const
 Retrieve reference pixels (0 or 1 rel) More...
 
Vector< DoublereferenceValues (Bool pixelOrder=True) const
 Retrieve reference values in pixel or world axis order. More...
 
Vector< DoubleaxisIncrements (Bool pixelOrder=True) const
 Retrieve axis increments in pixel or world axis order. More...
 
Vector< StringaxisUnits (Bool pixelOrder=True) const
 Retrieve axis units in pixel or world axis order. More...
 
Unit units () const
 Retrieve image units. More...
 
String name () const
 Retrieve image name. More...
 
String observer () const
 Retrieve observer name. More...
 
String obsDate (MEpoch &date) const
 Return epoch of observation as MEpoch or formatted string. More...
 
String telescope () const
 Return telescope. More...
 
Bool restFrequency (String &restFreqString, Quantum< Double > &restFreq) const
 Return rest frequency. More...
 
Bool frequencySystem (String &freqTypeString, MFrequency::Types &freqType) const
 Return frequency system. More...
 
Bool directionSystem (String &dirTypeString, MDirection::Types &dirType) const
 Return direction system. More...
 
Bool hasAMask () const
 Retrieve whether image has mask or not. More...
 
Vector< StringmaskNames () const
 Retrieve mask names. More...
 
Vector< StringregionNames () const
 Retrieve region names. More...
 
String defaultMaskName () const
 Retrieve default mask name. More...
 
String imageType () const
 Retrieve image type. More...
 
Vector< Stringlist (LogIO &os, const MDoppler::Types velocityType=MDoppler::RADIO, Bool postLocally=False, const Bool verbose=False)
 List all header information. More...
 
Bool setNewImage (const ImageInterface< T > &image)
 Set a new image. More...
 

Private Member Functions

String makeMasksString () const
 
String makeRegionsString () const
 

Private Attributes

CoordinateSystem cSys_p
 
ObsInfo obsInfo_p
 
ImageInfo imageInfo_p
 
const ImageInterface< T > * pImage_p
 

Detailed Description

template<class T>
class casacore::ImageSummary< T >

Provides and lists information about the header of an image.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This class lists the ancilliary descriptive information from an image

Synopsis

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;

Example

PagedImage<Float> inImage(fileName);
ImageSummary<Float> summary(inImage);
LogOrigin or("myClass", "myFunction(...)", WHERE);
LogIO os(or);
summary.list(os);
#define WHERE
Definition: LogOrigin.h:211

A PagedImage object is constructed and then logged to the supplied LogIO object.

Motivation

The viewing of the descriptive image information is a basic capability.

Definition at line 120 of file ImageSummary.h.

Constructor & Destructor Documentation

◆ ImageSummary() [1/2]

template<class T >
casacore::ImageSummary< T >::ImageSummary ( const ImageInterface< T > &  )

Constructor.

◆ ImageSummary() [2/2]

template<class T >
casacore::ImageSummary< T >::ImageSummary ( const ImageSummary< T > &  other)

Copy constructor.

◆ ~ImageSummary()

template<class T >
casacore::ImageSummary< T >::~ImageSummary ( )

Destructor.

Member Function Documentation

◆ axisIncrements()

template<class T >
Vector<Double> casacore::ImageSummary< T >::axisIncrements ( Bool  pixelOrder = True) const

Retrieve axis increments in pixel or world axis order.


◆ axisNames()

template<class T >
Vector<String> casacore::ImageSummary< T >::axisNames ( Bool  pixelOrder = True) const

Retrieve axis names in pixel or world axis order.

◆ axisUnits()

template<class T >
Vector<String> casacore::ImageSummary< T >::axisUnits ( Bool  pixelOrder = True) const

Retrieve axis units in pixel or world axis order.

◆ defaultMaskName()

template<class T >
String casacore::ImageSummary< T >::defaultMaskName ( ) const

Retrieve default mask name.

Empty if none

◆ directionSystem()

template<class T >
Bool casacore::ImageSummary< T >::directionSystem ( String dirTypeString,
MDirection::Types dirType 
) const

Return direction system.

Returns False if none.

◆ frequencySystem()

template<class T >
Bool casacore::ImageSummary< T >::frequencySystem ( String freqTypeString,
MFrequency::Types freqType 
) const

Return frequency system.

Returns False if none.

◆ hasAMask()

template<class T >
Bool casacore::ImageSummary< T >::hasAMask ( ) const

Retrieve whether image has mask or not.

◆ imageType()

template<class T >
String casacore::ImageSummary< T >::imageType ( ) const

Retrieve image type.

◆ list()

template<class T >
Vector<String> casacore::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

◆ makeMasksString()

template<class T >
String casacore::ImageSummary< T >::makeMasksString ( ) const
private

◆ makeRegionsString()

template<class T >
String casacore::ImageSummary< T >::makeRegionsString ( ) const
private

◆ maskNames()

template<class T >
Vector<String> casacore::ImageSummary< T >::maskNames ( ) const

Retrieve mask names.

◆ name()

template<class T >
String casacore::ImageSummary< T >::name ( ) const

Retrieve image name.

Any prepended path is stripped off.

◆ ndim()

template<class T >
Int casacore::ImageSummary< T >::ndim ( ) const

Retrieve number of image dimension.

◆ obsDate()

template<class T >
String casacore::ImageSummary< T >::obsDate ( MEpoch date) const

Return epoch of observation as MEpoch or formatted string.

◆ observer()

template<class T >
String casacore::ImageSummary< T >::observer ( ) const

Retrieve observer name.

◆ operator=()

template<class T >
ImageSummary<T>& casacore::ImageSummary< T >::operator= ( const ImageSummary< T > &  other)

Assignment operator.

◆ referencePixels()

template<class T >
Vector<Double> casacore::ImageSummary< T >::referencePixels ( Bool  oneRel = True) const

Retrieve reference pixels (0 or 1 rel)

◆ referenceValues()

template<class T >
Vector<Double> casacore::ImageSummary< T >::referenceValues ( Bool  pixelOrder = True) const

Retrieve reference values in pixel or world axis order.


◆ regionNames()

template<class T >
Vector<String> casacore::ImageSummary< T >::regionNames ( ) const

Retrieve region names.

◆ restFrequency()

template<class T >
Bool casacore::ImageSummary< T >::restFrequency ( String restFreqString,
Quantum< Double > &  restFreq 
) const

Return rest frequency.

Returns False if none.

◆ setNewImage()

template<class T >
Bool casacore::ImageSummary< T >::setNewImage ( const ImageInterface< T > &  image)

Set a new image.

◆ shape()

template<class T >
IPosition casacore::ImageSummary< T >::shape ( ) const

Retrieve image shape.

◆ telescope()

template<class T >
String casacore::ImageSummary< T >::telescope ( ) const

Return telescope.

◆ tileShape()

template<class T >
IPosition casacore::ImageSummary< T >::tileShape ( ) const

Retrieve tile shape with which image is stored on disk.

◆ units()

template<class T >
Unit casacore::ImageSummary< T >::units ( ) const

Retrieve image units.

Member Data Documentation

◆ cSys_p

template<class T >
CoordinateSystem casacore::ImageSummary< T >::cSys_p
private

Definition at line 215 of file ImageSummary.h.

◆ imageInfo_p

template<class T >
ImageInfo casacore::ImageSummary< T >::imageInfo_p
private

Definition at line 217 of file ImageSummary.h.

◆ obsInfo_p

template<class T >
ObsInfo casacore::ImageSummary< T >::obsInfo_p
private

Definition at line 216 of file ImageSummary.h.

◆ pImage_p

template<class T >
const ImageInterface<T>* casacore::ImageSummary< T >::pImage_p
private

Definition at line 218 of file ImageSummary.h.


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