Loading...
Searching...
No Matches
casacore::ImageInterface< T > Class Template Referenceabstract
images package (libcasa_images) » Images_module

More...

`#include <ImageInterface.h>`

## Public Member Functions

| ImageInterface ()
| ImageInterface (const RegionHandler &regionHandler)
| Construct for a specific region handler object.
| ImageInterface (const ImageInterface &other)
| Copy constructor (copy semantics).
virtual | ~ImageInterface ()
virtual MaskedLattice< T > * | cloneML () const
| Make a copy of the derived object (reference semantics).
virtual ImageInterface< T > * | cloneII () const =0
virtual String | imageType () const =0
| Get the image type (returns name of derived class).
virtual void | resize (const TiledShape &newShape)=0
| Function which changes the shape of the image (N.B.
virtual Bool | setUnits (const Unit &newUnits)
| Function which get and set the units associated with the image pixels (i.e.
virtual const Unit & | units () const
virtual String | name (Bool stripPath=False) const =0
| Return the name of the current ImageInterface object.
virtual Bool | setCoordinateInfo (const CoordinateSystem &coords)
| Functions to set or replace the coordinate information in the Image Returns False on failure, e.g.
const CoordinateSystem & | coordinates () const
virtual LELCoordinates | lelCoordinates () const
| Function to get a LELCoordinate object containing the coordinates.
LoggerHolder & | logger ()
| Get access to the LoggerHolder.
const LoggerHolder & | logger () const
LogIO & | logSink ()
| Allow messages to be logged to this ImageInterface.
const LogIO & | logSink () const
void | appendLog (const LoggerHolder &other)
| Add the messages from the other image logger to this one.
const TableRecord & | miscInfo () const
| Often we have miscellaneous information we want to attach to an image.
virtual Bool | setMiscInfo (const RecordInterface &newInfo)
const ImageInfo & | imageInfo () const
| The ImageInfo object contains some miscellaneous information about the image which unlike that stored in MiscInfo, has a standard list of things, such as the restoring beam.
ImageInfo & | rwImageInfo ()
| Get non-const access to the ImageInfo.
virtual Bool | setImageInfo (const ImageInfo &info)
virtual ImageAttrHandler & | attrHandler (Bool createHandler=False)
| Get access to the attribute handler.
ImageAttrHandler & | roAttrHandler () const
Bool | canDefineRegion () const
| Can the image handle region definition?
virtual ImageRegion | makeMask (const String &name, Bool defineAsRegion=True, Bool setAsDefaultMask=True, Bool initialize=False, Bool value=True)
| Make a mask which is suitable for the type of image.
virtual void | defineRegion (const String &name, const ImageRegion &region, RegionHandler::GroupType, Bool overwrite=False)
| Define a region/mask belonging to the image.
virtual Bool | hasRegion (const String &regionName, RegionHandler::GroupType=RegionHandler::Any) const
| Does the image have a region with the given name?
virtual ImageRegion * | getImageRegionPtr (const String &name, RegionHandler::GroupType=RegionHandler::Any, Bool throwIfUnknown=True) const
| Get a region/mask belonging to the image from the given group (which can be Any).
virtual void | renameRegion (const String &newName, const String &oldName, RegionHandler::GroupType=RegionHandler::Any, Bool overwrite=False)
| Rename a region.
virtual void | removeRegion (const String &name, RegionHandler::GroupType=RegionHandler::Any, Bool throwIfUnknown=True)
| Remove a region/mask belonging to the image from the given group (which can be Any).
virtual Vector< String > | regionNames (RegionHandler::GroupType=RegionHandler::Any) const
| Get the names of all regions/masks.
virtual void | useMask (MaskSpecifier=MaskSpecifier())
| Use the mask as specified.
virtual void | setDefaultMask (const String &regionName)
| Set the default pixelmask to the mask with the given name (which has to exist in the "masks" group).
virtual String | getDefaultMask () const
| Get the name of the default pixelmask.
ImageRegion | getRegion (const String &regionName, RegionHandler::GroupType=RegionHandler::Any) const
| Get a region belonging to the image.
String | makeUniqueRegionName (const String &rootName, uInt startNumber=1) const
| Make a unique region name from the given root name, thus make it such that the name is not already in use for a region or mask.
virtual Bool | ok () const =0
| Check class invariants.
Bool | toRecord (String &error, RecordInterface &outRec)
| Save and restore an ImageInterface object to or from a state Record.
Bool | fromRecord (String &error, const RecordInterface &inRec)
Public Member Functions inherited from casacore::MaskedLattice< T >
| MaskedLattice ()
| Default constructor.
| MaskedLattice (const MaskedLattice< T > &)
| Copy constructor.
virtual | ~MaskedLattice ()
| a virtual destructor is needed so that it will use the actual destructor in the derived class
virtual Lattice< T > * | clone () const
| Make a copy of the derived object (reference semantics).
virtual Bool | isMasked () const
| Has the object really a mask?
virtual Bool | hasPixelMask () const
| Does the lattice have a pixelmask?
virtual const Lattice< Bool > & | pixelMask () const
| Get access to the pixelmask.
virtual Lattice< Bool > & | pixelMask ()
const LatticeRegion & | region () const
| Get the region used.
Bool | getMask (COWPtr< Array< Bool > > &buffer, Bool removeDegenerateAxes=False) const
| Get the mask or a slice from the mask.
Bool | getMaskSlice (COWPtr< Array< Bool > > &buffer, const Slicer &section, Bool removeDegenerateAxes=False) const
Bool | getMaskSlice (COWPtr< Array< Bool > > &buffer, const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) const
Bool | getMaskSlice (COWPtr< Array< Bool > > &buffer, const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False) const
Bool | getMask (Array< Bool > &buffer, Bool removeDegenerateAxes=False)
Bool | getMaskSlice (Array< Bool > &buffer, const Slicer &section, Bool removeDegenerateAxes=False)
Bool | getMaskSlice (Array< Bool > &buffer, const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False)
Bool | getMaskSlice (Array< Bool > &buffer, const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False)
Array< Bool > | getMask (Bool removeDegenerateAxes=False) const
Array< Bool > | getMaskSlice (const Slicer &section, Bool removeDegenerateAxes=False) const
Array< Bool > | getMaskSlice (const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) const
Array< Bool > | getMaskSlice (const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False) const
virtual Bool | doGetMaskSlice (Array< Bool > &buffer, const Slicer &section)
| The function (in the derived classes) doing the actual work.
Public Member Functions inherited from casacore::Lattice< T >
virtual | ~Lattice ()
| a virtual destructor is needed so that it will use the actual destructor in the derived class
virtual DataType | dataType () const
| Get the data type of the lattice.
T | operator() (const IPosition &where) const
| Return the value of the single element located at the argument IPosition.
virtual T | getAt (const IPosition &where) const
virtual void | putAt (const T &value, const IPosition &where)
| Put the value of a single element.
Bool | get (COWPtr< Array< T > > &buffer, Bool removeDegenerateAxes=False) const
| Functions which extract an Array of values from a Lattice.
Bool | getSlice (COWPtr< Array< T > > &buffer, const Slicer &section, Bool removeDegenerateAxes=False) const
Bool | getSlice (COWPtr< Array< T > > &buffer, const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) const
Bool | getSlice (COWPtr< Array< T > > &buffer, const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False) const
Bool | get (Array< T > &buffer, Bool removeDegenerateAxes=False)
Bool | getSlice (Array< T > &buffer, const Slicer &section, Bool removeDegenerateAxes=False)
Bool | getSlice (Array< T > &buffer, const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False)
Bool | getSlice (Array< T > &buffer, const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False)
Array< T > | get (Bool removeDegenerateAxes=False) const
Array< T > | getSlice (const Slicer &section, Bool removeDegenerateAxes=False) const
Array< T > | getSlice (const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) const
Array< T > | getSlice (const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False) const
void | putSlice (const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
| A function which places an Array of values within this instance of the Lattice at the location specified by the IPosition "where", incrementing by "stride".
void | putSlice (const Array< T > &sourceBuffer, const IPosition &where)
void | put (const Array< T > &sourceBuffer)
virtual void | set (const T &value)
| Set all elements in the Lattice to the given value.
virtual void | apply (T(*function)(T))
| Replace every element, x, of the Lattice with the result of f(x).
virtual void | apply (T(*function)(const T &))
virtual void | apply (const Functional< T, T > &function)
void | operator+= (const Lattice< T > &other)
| Add, subtract, multiple, or divide by another Lattice.
void | operator-= (const Lattice< T > &other)
void | operator*= (const Lattice< T > &other)
void | operator/= (const Lattice< T > &other)
virtual void | copyData (const Lattice< T > &from)
| Copy the data from the given lattice to this one.
virtual void | copyDataTo (Lattice< T > &to) const
| Copy the data from this lattice to the given lattice.
virtual uInt | advisedMaxPixels () const
| This function returns the advised maximum number of pixels to include in the cursor of an iterator.
virtual LatticeIterInterface< T > * | makeIter (const LatticeNavigator &navigator, Bool useRef) const
| These functions are used by the LatticeIterator class to generate an iterator of the correct type for a specified Lattice.
virtual Bool | doGetSlice (Array< T > &buffer, const Slicer &section)=0
| The functions (in the derived classes) doing the actual work.
virtual void | doPutSlice (const Array< T > &buffer, const IPosition &where, const IPosition &stride)=0
Public Member Functions inherited from casacore::LatticeBase
virtual | ~LatticeBase ()
| A virtual destructor is needed so that it will use the actual destructor in the derived class.
virtual Bool | isPersistent () const
| Is the lattice persistent and can it be loaded by other processes as well?
virtual Bool | isPaged () const
| Is the lattice paged to disk?
virtual Bool | canReferenceArray () const
| Can the lattice data be referenced as an array section?
virtual Bool | isWritable () const
| Is the lattice writable?
virtual void | save (const String &fileName) const
| Save the image in an AipsIO file with the given name.
virtual Bool | lock (FileLocker::LockType, uInt nattempts)
| It is strongly recommended to use class LatticeLocker to handle lattice locking.
virtual void | unlock ()
virtual Bool | hasLock (FileLocker::LockType) const
virtual void | resync ()
| Resynchronize the Lattice object with the lattice file.
virtual void | flush ()
| Flush the data (but do not unlock).
virtual void | tempClose ()
| Temporarily close the lattice.
virtual void | reopen ()
| Explicitly reopen the temporarily closed lattice.
virtual IPosition | shape () const =0
| Return the shape of the Lattice including all degenerate axes (ie.
virtual uInt | ndim () const
| Return the number of axes in this Lattice.
virtual size_t | nelements () const
| Return the total number of elements in this Lattice.
size_t | size () const
Bool | conform (const LatticeBase &other) const
| Return a value of "True" if this instance of Lattice and 'other' have the same shape, otherwise returns a value of "False".
IPosition | niceCursorShape (uInt maxPixels) const
| Returns a recommended cursor shape for iterating through all the pixels in the Lattice.
IPosition | niceCursorShape () const
virtual IPosition | doNiceCursorShape (uInt maxPixels) const
| The function (in the derived classes) doing the actual work.
virtual uInt | maximumCacheSize () const
| Maximum cache size - not necessarily all used.
virtual void | setMaximumCacheSize (uInt howManyPixels)
| Set the maximum (allowed) cache size as indicated.
virtual void | setCacheSizeInTiles (uInt howManyTiles)
| Set the actual cache size for this Array to be big enough for the indicated number of tiles.
virtual void | setCacheSizeFromPath (const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath)
| Set the cache size as to "fit" the indicated path.
virtual void | clearCache ()
| Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called.
virtual void | showCacheStatistics (ostream &os) const
| Report on cache success.

## Protected Member Functions

ImageInterface & | operator= (const ImageInterface &other)
| Assignment (copy semantics) is only useful for derived classes.
Bool | restoreImageInfo (const RecordInterface &rec)
| Restore the image info from the record.
void | setLogMember (const LoggerHolder &logger)
| Set the image logger variable.
void | setImageInfoMember (const ImageInfo &imageInfo)
| Set the image info variable.
void | setCoordsMember (const CoordinateSystem &coords)
| Set the coordinate system variable.
void | setUnitMember (const Unit &unit)
| Set the unit variable.
void | setMiscInfoMember (const RecordInterface &rec)
| Set the miscinfo variable.
RegionHandler * | getRegionHandler ()
| Get access to the region handler.
Protected Member Functions inherited from casacore::MaskedLattice< T >
MaskedLattice< T > & | operator= (const MaskedLattice< T > &)
| Assignment can only be used by derived classes.
virtual const LatticeRegion * | getRegionPtr () const =0
| Get a pointer to the region used.
Protected Member Functions inherited from casacore::Lattice< T >
| Lattice ()
| Define default constructor to satisfy compiler.
virtual void | handleMath (const Lattice< T > &from, int oper)
| Handle the Math operators (+=, -=, *=, /=).
virtual void | handleMathTo (Lattice< T > &to, int oper) const
| Lattice (const Lattice< T > &)
| Copy constructor and assignment can only be used by derived classes.
Lattice< T > & | operator= (const Lattice< T > &)
void | handleMathTo (Lattice< Bool > &, int) const
Protected Member Functions inherited from casacore::LatticeBase
| LatticeBase ()
| Define default constructor to be used by derived classes.
| LatticeBase (const LatticeBase &)
| Copy constructor and assignment can only be used by derived classes.
LatticeBase & | operator= (const LatticeBase &)
void | throwBoolMath () const
| Throw an exception for arithmetic on a Bool Lattice.

## Private Attributes

CoordinateSystem | coords_p
| It is the job of the derived class to make these variables valid.
LoggerHolder | log_p
ImageInfo | imageInfo_p
Unit | unit_p
TableRecord | miscInfo_p
RegionHandler * | regHandPtr_p
| The region handling object.
ImageAttrHandler | itsBaseAttrHandler
| The attribute handling object.

## Detailed Description

template<class T>
class casacore::ImageInterface< T >

A base class for astronomical images.

### Intended use:

Public interface

### Prerequisite

- Lattices
- CoordinateSystem

### Etymology

The ImageInterface class name is derived from its role as the cookie cutter Interface base class for Images.

### Synopsis

The ImageInterface class is an abstract base class. All Image classes should derive from this class to ensure functions which operate on Images will work for all Image derivations.

An Image is currently defined as an Array of pixels, a Boolean mask, defining which pixels are valid and coordinates to define the reference frame. The only concrete class currently derived from this Interface is PagedImage, which allows the image to be stored on disk, and only reads specified portions of the image into memory.

### Example

As this is an abstract base class it is not possible to construct an instance of this object. It can however be used as a function argument.
eg 1. (used in dImageInterface.cc)

Float sumPixels(const ImageInterface<Float>& image){
uInt rowLength = image.shape()(0);
IPosition rowShape(image.ndim());
rowShape = 1; rowShape(0) = rowLength;
Float sumPix = 0;
RO_LatticeIterator<Float> iter(image, rowShape);
while(!iter.atEnd()){
sumPix += sum(iter.vectorCursor());
iter++;
}
return sumPix;
}
casacore::IPosition
Definition IPosition.h:117
casacore::ImageInterface::ImageInterface
ImageInterface()
casacore::LatticeBase::shape
virtual IPosition shape() const =0
Return the shape of the Lattice including all degenerate axes (ie.
casacore::LatticeBase::ndim
virtual uInt ndim() const
Return the number of axes in this Lattice.
casacore::RO_LatticeIterator
Definition LatticeIterator.h:203
casacore::sum
LatticeExprNode sum(const LatticeExprNode &expr)
casacore::uInt
unsigned int uInt
Definition aipstype.h:49
casacore::Float
float Float
Definition aipstype.h:52

The main purpose of this class is for programming objects, the following example is of how one would derive from ImageInterface:
eg 2.

template <class T> class myNewImage : public ImageInterface<T>
{
public:
// default constructor
myNewImage();
// argumented constructor
myNewImage(...);
// destructor
~myNewImage
// the shape function is forced upon us by the Lattice base class
IPosition shape() const;
// doGetSlice is another function required of all Lattice objects.
Bool doGetSlice(<Array<T>& buffer, const Slicer& section);
// etc..\.
private:
// put the actual map data down here.
// etc..\.
};
casacore::Array
Definition Array.h:155
casacore::Lattice::doGetSlice
virtual Bool doGetSlice(Array< T > &buffer, const Slicer &section)=0
The functions (in the derived classes) doing the actual work.
casacore::Slicer
Definition Slicer.h:287
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40

### Motivation

The use of abstract base classes to guide inheritance seemed appropriate for Images to ensure that CoordinateSystems and masking get handled uniformly.

### To Do

- replace ImageCoordinates

Definition at line 144 of file ImageInterface.h.

## Constructor & Destructor Documentation

## ImageInterface() [1/3]

template<class T>

casacore::ImageInterface< T >::ImageInterface | ( |  | ) |

Referenced by casacore::ImageConcat< T >::_updatePixelAndWorldValues(), casacore::ImageConcat< T >::checkNonConcatAxisCoordinates(), casacore::CurvedImage2D< T >::cloneII(), casacore::ExtendImage< T >::cloneII(), casacore::HDF5Image< T >::cloneII(), casacore::ImageConcat< T >::cloneII(), casacore::ImageExpr< T >::cloneII(), cloneII(), casacore::PagedImage< T >::cloneII(), casacore::RebinImage< T >::cloneII(), casacore::SubImage< T >::cloneII(), casacore::TempImage< T >::cloneII(), casacore::CurvedImage2D< T >::CurvedImage2D(), casacore::ExtendImage< T >::ExtendImage(), casacore::ImageConcat< T >::image(), ImageInterface(), logSink(), operator=(), casacore::RebinImage< T >::RebinImage(), roAttrHandler(), casacore::ImageConcat< T >::setImage(), casacore::SubImage< T >::SubImage(), casacore::SubImage< T >::SubImage(), casacore::SubImage< T >::SubImage(), casacore::SubImage< T >::SubImage(), casacore::SubImage< T >::SubImage(), and casacore::SubImage< T >::SubImage().

## ImageInterface() [2/3]

template<class T>

casacore::ImageInterface< T >::ImageInterface | ( | const RegionHandler & | regionHandler | ) |

Construct for a specific region handler object.

## ImageInterface() [3/3]

template<class T>

casacore::ImageInterface< T >::ImageInterface | ( | const ImageInterface< T > & | other | ) |

Copy constructor (copy semantics).

References ImageInterface().

## ~ImageInterface()

template<class T>

virtual casacore::ImageInterface< T >::~ImageInterface | ( |  | ) |

virtual

## Member Function Documentation

## appendLog()

template<class T>

void casacore::ImageInterface< T >::appendLog | ( | const LoggerHolder & | other | ) |

inline

Add the messages from the other image logger to this one.

Definition at line 217 of file ImageInterface.h.

References log_p.

## attrHandler()

template<class T>

virtual ImageAttrHandler & casacore::ImageInterface< T >::attrHandler | ( | Bool | createHandler = False | ) |

virtual

Get access to the attribute handler.

By default an empty handler is returned where no groups can be added to.

Reimplemented in casacore::CurvedImage2D< T >, casacore::ExtendImage< T >, casacore::HDF5Image< T >, casacore::PagedImage< T >, casacore::RebinImage< T >, and casacore::SubImage< T >.

References casacore::False.

Referenced by roAttrHandler().

## canDefineRegion()

template<class T>

Bool casacore::ImageInterface< T >::canDefineRegion | ( |  | ) | const

inline

Can the image handle region definition?

Definition at line 255 of file ImageInterface.h.

References regHandPtr_p.

## cloneII()

template<class T>

virtual ImageInterface< T > * casacore::ImageInterface< T >::cloneII | ( |  | ) | const

pure virtual

Implemented in casacore::CurvedImage2D< T >, casacore::ExtendImage< T >, casacore::FITSErrorImage, casacore::FITSImage, casacore::FITSQualityImage, casacore::HDF5Image< T >, casacore::ImageConcat< T >, casacore::ImageExpr< T >, casacore::ImageExpr< Bool >, casacore::MIRIADImage, casacore::PagedImage< T >, casacore::RebinImage< T >, casacore::SubImage< T >, and casacore::TempImage< T >.

References ImageInterface().

## cloneML()

template<class T>

virtual MaskedLattice< T > * casacore::ImageInterface< T >::cloneML | ( |  | ) | const

virtual

Make a copy of the derived object (reference semantics).

Implements casacore::MaskedLattice< T >.

References casacore::MaskedLattice< T >::MaskedLattice().

## coordinates()

template<class T>

const CoordinateSystem & casacore::ImageInterface< T >::coordinates | ( |  | ) | const

inline

Definition at line 193 of file ImageInterface.h.

References coords_p.

Referenced by casacore::ImageConcat< T >::_updatePixelAndWorldValues().

## defineRegion()

template<class T>

virtual void casacore::ImageInterface< T >::defineRegion | ( | const String & | name,
|  | const ImageRegion & | region,
|  | RegionHandler::GroupType | ,
|  | Bool | overwrite = False )

virtual

Define a region/mask belonging to the image.

The group type determines if it stored as a region or mask. If overwrite=False, an exception will be thrown if the region already exists.
An exception is thrown if canDefineRegion is False.

References casacore::False, name(), and casacore::MaskedLattice< T >::region().

## fromRecord()

template<class T>

Bool casacore::ImageInterface< T >::fromRecord | ( | String & | error,
|  | const RecordInterface & | inRec )

References casacore::RecordInterface().

## getDefaultMask()

template<class T>

virtual String casacore::ImageInterface< T >::getDefaultMask | ( |  | ) | const

virtual

Get the name of the default pixelmask.

An empty string is returned if no default pixelmask.

## getImageRegionPtr()

template<class T>

virtual ImageRegion * casacore::ImageInterface< T >::getImageRegionPtr | ( | const String & | name,
|  | RegionHandler::GroupType | = RegionHandler::Any,
|  | Bool | throwIfUnknown = True ) const

virtual

Get a region/mask belonging to the image from the given group (which can be Any).

Optionally an exception is thrown if the region does not exist. A zero pointer is returned if the region does not exist. The caller has to delete the ImageRegion object created.

References casacore::RegionHandler::Any, name(), and casacore::True.

## getRegion()

template<class T>

ImageRegion casacore::ImageInterface< T >::getRegion | ( | const String & | regionName,
|  | RegionHandler::GroupType | = RegionHandler::Any ) const

Get a region belonging to the image.

An exception is thrown if the region does not exist.

References casacore::RegionHandler::Any.

## getRegionHandler()

template<class T>

RegionHandler * casacore::ImageInterface< T >::getRegionHandler | ( |  | ) |

inline protected

Get access to the region handler.

Definition at line 377 of file ImageInterface.h.

References regHandPtr_p.

## hasRegion()

template<class T>

virtual Bool casacore::ImageInterface< T >::hasRegion | ( | const String & | regionName,
|  | RegionHandler::GroupType | = RegionHandler::Any ) const

virtual

Does the image have a region with the given name?

References casacore::RegionHandler::Any.

## imageInfo()

template<class T>

const ImageInfo & casacore::ImageInterface< T >::imageInfo | ( |  | ) | const

inline

The ImageInfo object contains some miscellaneous information about the image which unlike that stored in MiscInfo, has a standard list of things, such as the restoring beam.

Note that setImageInfo REPLACES the information with the new information. It is up to the derived class to make the ImageInfo permanent.

Definition at line 238 of file ImageInterface.h.

References imageInfo_p.

Referenced by setImageInfoMember().

## imageType()

template<class T>

virtual String casacore::ImageInterface< T >::imageType | ( |  | ) | const

pure virtual

Get the image type (returns name of derived class).

Reimplemented from casacore::LatticeBase.

Implemented in casacore::CurvedImage2D< T >, casacore::ExtendImage< T >, casacore::FITSErrorImage, casacore::FITSImage, casacore::FITSQualityImage, casacore::HDF5Image< T >, casacore::ImageConcat< T >, casacore::ImageExpr< T >, casacore::ImageExpr< Bool >, casacore::MIRIADImage, casacore::PagedImage< T >, casacore::RebinImage< T >, casacore::SubImage< T >, and casacore::TempImage< T >.

## lelCoordinates()

template<class T>

virtual LELCoordinates casacore::ImageInterface< T >::lelCoordinates | ( |  | ) | const

virtual

Function to get a LELCoordinate object containing the coordinates.

Reimplemented from casacore::LatticeBase.

## logger() [1/2]

template<class T>

LoggerHolder & casacore::ImageInterface< T >::logger | ( |  | ) |

inline

Get access to the LoggerHolder.

Definition at line 202 of file ImageInterface.h.

References log_p.

Referenced by casacore::ImageConcat< T >::_updatePixelAndWorldValues(), logSink(), and setLogMember().

## logger() [2/2]

template<class T>

const LoggerHolder & casacore::ImageInterface< T >::logger | ( |  | ) | const

inline

Definition at line 204 of file ImageInterface.h.

References log_p.

## logSink() [1/2]

template<class T>

LogIO & casacore::ImageInterface< T >::logSink | ( |  | ) |

inline

Allow messages to be logged to this ImageInterface.

Definition at line 210 of file ImageInterface.h.

References logger(), and casacore::LoggerHolder::logio().

Referenced by logSink().

## logSink() [2/2]

template<class T>

const LogIO & casacore::ImageInterface< T >::logSink | ( |  | ) | const

inline

Definition at line 212 of file ImageInterface.h.

References ImageInterface(), and logSink().

## makeMask()

template<class T>

virtual ImageRegion casacore::ImageInterface< T >::makeMask | ( | const String & | name,
|  | Bool | defineAsRegion = True,
|  | Bool | setAsDefaultMask = True,
|  | Bool | initialize = False,
|  | Bool | value = True )

virtual

Make a mask which is suitable for the type of image.

Optionally the mask can be initialized with the given value (by default it will not).
Optionally the mask can be defined as an image region/mask and turned in the default mask for the image. By default it will.

References casacore::False, name(), casacore::NewDelAllocator< T >::value, and casacore::True.

## makeUniqueRegionName()

template<class T>

String casacore::ImageInterface< T >::makeUniqueRegionName | ( | const String & | rootName,
|  | uInt | startNumber = 1 ) const

Make a unique region name from the given root name, thus make it such that the name is not already in use for a region or mask.

The root name is returned if it is already unique. Otherwise a number is appended to the root name to make it unique. The number starts at the given number and is incremented until the name is unique.

## miscInfo()

template<class T>

const TableRecord & casacore::ImageInterface< T >::miscInfo | ( |  | ) | const

inline

Often we have miscellaneous information we want to attach to an image.

This is where it goes.
Note that setMiscInfo REPLACES the information with the new information. It can fail if, e.g., the underlying table is not writable.

Definition at line 226 of file ImageInterface.h.

References miscInfo_p.

Referenced by casacore::ImageConcat< T >::_updatePixelAndWorldValues().

## name()

template<class T>

virtual String casacore::ImageInterface< T >::name | ( | Bool | stripPath = False | ) | const

pure virtual

Return the name of the current ImageInterface object.

This will generally be a file name for images that have a persistent form. Any path before the actual file name can be optionally stripped off.

Reimplemented from casacore::LatticeBase.

Implemented in casacore::CurvedImage2D< T >, casacore::ExtendImage< T >, casacore::FITSImage, casacore::FITSQualityImage, casacore::HDF5Image< T >, casacore::ImageConcat< T >, casacore::ImageExpr< T >, casacore::ImageExpr< Bool >, casacore::MIRIADImage, casacore::PagedImage< T >, casacore::RebinImage< T >, casacore::SubImage< T >, and casacore::TempImage< T >.

References casacore::False.

Referenced by defineRegion(), getImageRegionPtr(), makeMask(), and removeRegion().

## ok()

template<class T>

virtual Bool casacore::ImageInterface< T >::ok | ( |  | ) | const

pure virtual

Check class invariants.

Reimplemented from casacore::LatticeBase.

Implemented in casacore::CurvedImage2D< T >, casacore::ExtendImage< T >, casacore::FITSImage, casacore::FITSQualityImage, casacore::HDF5Image< T >, casacore::ImageConcat< T >, casacore::ImageExpr< T >, casacore::ImageExpr< Bool >, casacore::MIRIADImage, casacore::PagedImage< T >, casacore::RebinImage< T >, casacore::SubImage< T >, and casacore::TempImage< T >.

## operator=()

template<class T>

ImageInterface & casacore::ImageInterface< T >::operator= | ( | const ImageInterface< T > & | other | ) |

protected

Assignment (copy semantics) is only useful for derived classes.

References ImageInterface().

## regionNames()

template<class T>

virtual Vector< String > casacore::ImageInterface< T >::regionNames | ( | RegionHandler::GroupType | = RegionHandler::Any | ) | const

virtual

Get the names of all regions/masks.

References casacore::RegionHandler::Any.

## removeRegion()

template<class T>

virtual void casacore::ImageInterface< T >::removeRegion | ( | const String & | name,
|  | RegionHandler::GroupType | = RegionHandler::Any,
|  | Bool | throwIfUnknown = True )

virtual

Remove a region/mask belonging to the image from the given group (which can be Any).

Optionally an exception is thrown if the region does not exist.

Reimplemented in casacore::HDF5Image< T >, casacore::PagedImage< T >, and casacore::TempImage< T >.

References casacore::RegionHandler::Any, name(), and casacore::True.

## renameRegion()

template<class T>

virtual void casacore::ImageInterface< T >::renameRegion | ( | const String & | newName,
|  | const String & | oldName,
|  | RegionHandler::GroupType | = RegionHandler::Any,
|  | Bool | overwrite = False )

virtual

Rename a region.

If a region with the new name already exists, it is deleted or an exception is thrown (depending on overwrite). The region name is looked up in the given group(s).
An exception is thrown if the old region name does not exist.

References casacore::RegionHandler::Any, and casacore::False.

## resize()

template<class T>

virtual void casacore::ImageInterface< T >::resize | ( | const TiledShape & | newShape | ) |

pure virtual

Function which changes the shape of the image (N.B.

the data is thrown away - the Image will be filled with nonsense afterwards)

Implemented in casacore::CurvedImage2D< T >, casacore::ExtendImage< T >, casacore::FITSImage, casacore::FITSQualityImage, casacore::HDF5Image< T >, casacore::ImageConcat< T >, casacore::ImageExpr< T >, casacore::ImageExpr< Bool >, casacore::MIRIADImage, casacore::PagedImage< T >, casacore::RebinImage< T >, casacore::SubImage< T >, and casacore::TempImage< T >.

## restoreImageInfo()

template<class T>

Bool casacore::ImageInterface< T >::restoreImageInfo | ( | const RecordInterface & | rec | ) |

protected

Restore the image info from the record.

References casacore::RecordInterface().

## roAttrHandler()

template<class T>

ImageAttrHandler & casacore::ImageInterface< T >::roAttrHandler | ( |  | ) | const

inline

Definition at line 250 of file ImageInterface.h.

References attrHandler(), casacore::False, and ImageInterface().

## rwImageInfo()

template<class T>

ImageInfo & casacore::ImageInterface< T >::rwImageInfo | ( |  | ) |

inline

Get non-const access to the ImageInfo.

Definition at line 241 of file ImageInterface.h.

References imageInfo_p.

## setCoordinateInfo()

template<class T>

virtual Bool casacore::ImageInterface< T >::setCoordinateInfo | ( | const CoordinateSystem & | coords | ) |

virtual

Functions to set or replace the coordinate information in the Image Returns False on failure, e.g.

if the number of axes do not match.

Reimplemented in casacore::HDF5Image< T >, and casacore::PagedImage< T >.

## setCoordsMember()

template<class T>

void casacore::ImageInterface< T >::setCoordsMember | ( | const CoordinateSystem & | coords | ) |

inline protected

Set the coordinate system variable.

Definition at line 365 of file ImageInterface.h.

References coords_p.

Referenced by casacore::ImageConcat< T >::_updatePixelAndWorldValues().

## setDefaultMask()

template<class T>

virtual void casacore::ImageInterface< T >::setDefaultMask | ( | const String & | regionName | ) |

virtual

Set the default pixelmask to the mask with the given name (which has to exist in the "masks" group).

If the image table is writable, the setting is persistent by writing the name as a keyword. If the given regionName is the empty string, the default pixelmask is unset.

Reimplemented in casacore::HDF5Image< T >, casacore::PagedImage< T >, and casacore::TempImage< T >.

## setImageInfo()

template<class T>

virtual Bool casacore::ImageInterface< T >::setImageInfo | ( | const ImageInfo & | info | ) |

virtual

Reimplemented in casacore::HDF5Image< T >, casacore::ImageConcat< T >, and casacore::PagedImage< T >.

## setImageInfoMember()

template<class T>

void casacore::ImageInterface< T >::setImageInfoMember | ( | const ImageInfo & | imageInfo | ) |

protected

Set the image info variable.

References imageInfo().

## setLogMember()

template<class T>

void casacore::ImageInterface< T >::setLogMember | ( | const LoggerHolder & | logger | ) |

inline protected

Set the image logger variable.

Definition at line 358 of file ImageInterface.h.

References log_p, and logger().

## setMiscInfo()

template<class T>

virtual Bool casacore::ImageInterface< T >::setMiscInfo | ( | const RecordInterface & | newInfo | ) |

virtual

Reimplemented in casacore::HDF5Image< T >, casacore::ImageConcat< T >, casacore::ImageExpr< T >, casacore::ImageExpr< Bool >, casacore::MIRIADImage, and casacore::PagedImage< T >.

References casacore::RecordInterface().

## setMiscInfoMember()

template<class T>

void casacore::ImageInterface< T >::setMiscInfoMember | ( | const RecordInterface & | rec | ) |

inline protected

Set the miscinfo variable.

Definition at line 373 of file ImageInterface.h.

References miscInfo_p, and casacore::RecordInterface().

Referenced by casacore::ImageConcat< T >::_updatePixelAndWorldValues().

## setUnitMember()

template<class T>

void casacore::ImageInterface< T >::setUnitMember | ( | const Unit & | unit | ) |

inline protected

Set the unit variable.

Definition at line 369 of file ImageInterface.h.

References unit_p.

## setUnits()

template<class T>

virtual Bool casacore::ImageInterface< T >::setUnits | ( | const Unit & | newUnits | ) |

virtual

Function which get and set the units associated with the image pixels (i.e.

the "brightness" unit). setUnits() returns False if it cannot set the unit for some reason (e.g. the underlying file is not writable).

Reimplemented in casacore::HDF5Image< T >, and casacore::PagedImage< T >.

## toRecord()

template<class T>

Bool casacore::ImageInterface< T >::toRecord | ( | String & | error,
|  | RecordInterface & | outRec )

Save and restore an ImageInterface object to or from a state Record.

References casacore::RecordInterface().

## units()

template<class T>

virtual const Unit & casacore::ImageInterface< T >::units | ( |  | ) | const

inline virtual

Definition at line 180 of file ImageInterface.h.

References unit_p.

Referenced by casacore::ImageConcat< T >::_updatePixelAndWorldValues().

## useMask()

template<class T>

virtual void casacore::ImageInterface< T >::useMask | ( | MaskSpecifier | = MaskSpecifier() | ) |

virtual

Use the mask as specified.

If a mask was already in use, it is replaced by the new one.

Reimplemented in casacore::HDF5Image< T >, casacore::PagedImage< T >, and casacore::TempImage< T >.

## Member Data Documentation

## coords_p

template<class T>

CoordinateSystem casacore::ImageInterface< T >::coords_p

private

It is the job of the derived class to make these variables valid.

Definition at line 382 of file ImageInterface.h.

Referenced by coordinates(), and setCoordsMember().

## imageInfo_p

template<class T>

ImageInfo casacore::ImageInterface< T >::imageInfo_p

private

Definition at line 384 of file ImageInterface.h.

Referenced by imageInfo(), and rwImageInfo().

## itsBaseAttrHandler

template<class T>

ImageAttrHandler casacore::ImageInterface< T >::itsBaseAttrHandler

private

The attribute handling object.

Definition at line 392 of file ImageInterface.h.

## log_p

template<class T>

LoggerHolder casacore::ImageInterface< T >::log_p

private

Definition at line 383 of file ImageInterface.h.

Referenced by appendLog(), logger(), logger(), and setLogMember().

## miscInfo_p

template<class T>

TableRecord casacore::ImageInterface< T >::miscInfo_p

private

Definition at line 386 of file ImageInterface.h.

Referenced by miscInfo(), and setMiscInfoMember().

## regHandPtr_p

template<class T>

RegionHandler* casacore::ImageInterface< T >::regHandPtr_p

private

The region handling object.

Definition at line 389 of file ImageInterface.h.

Referenced by canDefineRegion(), and getRegionHandler().

## unit_p

template<class T>

Unit casacore::ImageInterface< T >::unit_p

private

Definition at line 385 of file ImageInterface.h.

Referenced by setUnitMember(), and units().

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

- images/Images/ImageFITSConverter.h
- images/Images/ImageInterface.h