casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
casacore::ImageInterface< T > Class Template Referenceabstract

A base class for astronomical images. More...

#include <PixelRangeDialog.qo.h>

Inheritance diagram for casacore::ImageInterface< T >:
casacore::MaskedLattice< T > casacore::Lattice< T > casacore::LatticeBase casacore::CurvedImage2D< T > casacore::ExtendImage< T > casacore::HDF5Image< T > casacore::ImageConcat< T > casacore::ImageExpr< T > casacore::PagedImage< T > casacore::RebinImage< T > casacore::SubImage< T > casacore::TempImage< T > casacore::ImageExpr< Bool > casacore::TempImage< casacore::DComplex >

Public Member Functions

 ImageInterface ()
 
 ImageInterface (const RegionHandler &regionHandler)
 Construct for a specific region handler object. More...
 
 ImageInterface (const ImageInterface &other)
 Copy constructor (copy semantics). More...
 
virtual ~ImageInterface ()
 
virtual MaskedLattice< T > * cloneML () const
 Make a copy of the derived object (reference semantics). More...
 
virtual ImageInterface< T > * cloneII () const =0
 
virtual String imageType () const =0
 Get the image type (returns name of derived class). More...
 
virtual void resize (const TiledShape &newShape)=0
 Function which changes the shape of the image (N.B. More...
 
virtual Bool setUnits (const Unit &newUnits)
 Function which get and set the units associated with the image pixels (i.e. More...
 
virtual const Unitunits () const
 
virtual String name (Bool stripPath=False) const =0
 Return the name of the current ImageInterface object. More...
 
virtual Bool setCoordinateInfo (const CoordinateSystem &coords)
 Functions to set or replace the coordinate information in the Image Returns False on failure, e.g. More...
 
const CoordinateSystemcoordinates () const
 
virtual LELCoordinates lelCoordinates () const
 Function to get a LELCoordinate object containing the coordinates. More...
 
LoggerHolderlogger ()
 Get access to the LoggerHolder. More...
 
const LoggerHolderlogger () const
 
LogIOlogSink ()
 Allow messages to be logged to this ImageInterface. More...
 
const LogIOlogSink () const
 
void appendLog (const LoggerHolder &other)
 Add the messages from the other image logger to this one. More...
 
const TableRecordmiscInfo () const
 Often we have miscellaneous information we want to attach to an image. More...
 
virtual Bool setMiscInfo (const RecordInterface &newInfo)
 
const ImageInfoimageInfo () 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. More...
 
ImageInforwImageInfo ()
 Get non-const access to the ImageInfo. More...
 
virtual Bool setImageInfo (const ImageInfo &info)
 
virtual ImageAttrHandlerattrHandler (Bool createHandler=False)
 Get access to the attribute handler. More...
 
ImageAttrHandlerroAttrHandler () const
 
Bool canDefineRegion () const
 Can the image handle region definition? More...
 
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. More...
 
virtual void defineRegion (const String &name, const ImageRegion &region, RegionHandler::GroupType, Bool overwrite=False)
 Define a region/mask belonging to the image. More...
 
virtual Bool hasRegion (const String &regionName, RegionHandler::GroupType=RegionHandler::Any) const
 Does the image have a region with the given name? More...
 
virtual ImageRegiongetImageRegionPtr (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). More...
 
virtual void renameRegion (const String &newName, const String &oldName, RegionHandler::GroupType=RegionHandler::Any, Bool overwrite=False)
 Rename a region. More...
 
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). More...
 
virtual Vector< StringregionNames (RegionHandler::GroupType=RegionHandler::Any) const
 Get the names of all regions/masks. More...
 
virtual void useMask (MaskSpecifier=MaskSpecifier())
 Use the mask as specified. More...
 
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). More...
 
virtual String getDefaultMask () const
 Get the name of the default pixelmask. More...
 
ImageRegion getRegion (const String &regionName, RegionHandler::GroupType=RegionHandler::Any) const
 Get a region belonging to the image. More...
 
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. More...
 
virtual Bool ok () const =0
 Check class invariants. More...
 
Bool toRecord (String &error, RecordInterface &outRec)
 Save and restore an ImageInterface object to or from a state Record. More...
 
Bool fromRecord (String &error, const RecordInterface &inRec)
 
- Public Member Functions inherited from casacore::MaskedLattice< T >
 MaskedLattice ()
 Default constructor. More...
 
 MaskedLattice (const MaskedLattice< T > &)
 Copy constructor. More...
 
virtual ~MaskedLattice ()
 a virtual destructor is needed so that it will use the actual destructor in the derived class More...
 
virtual Lattice< T > * clone () const
 Make a copy of the derived object (reference semantics). More...
 
virtual Bool isMasked () const
 Has the object really a mask? The default implementation returns True if the MaskedLattice has a region with a mask. More...
 
virtual Bool hasPixelMask () const
 Does the lattice have a pixelmask? The default implementation returns False. More...
 
virtual const Lattice< Bool > & pixelMask () const
 Get access to the pixelmask. More...
 
virtual Lattice< Bool > & pixelMask ()
 
const LatticeRegionregion () const
 Get the region used. More...
 
Bool getMask (COWPtr< Array< Bool > > &buffer, Bool removeDegenerateAxes=False) const
 Get the mask or a slice from the mask. More...
 
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< BoolgetMask (Bool removeDegenerateAxes=False) const
 
Array< BoolgetMaskSlice (const Slicer &section, Bool removeDegenerateAxes=False) const
 
Array< BoolgetMaskSlice (const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) const
 
Array< BoolgetMaskSlice (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. More...
 
- 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 More...
 
virtual DataType dataType () const
 Get the data type of the lattice. More...
 
operator() (const IPosition &where) const
 Return the value of the single element located at the argument IPosition. More...
 
virtual T getAt (const IPosition &where) const
 
virtual void putAt (const T &value, const IPosition &where)
 Put the value of a single element. More...
 
Bool get (COWPtr< Array< T > > &buffer, Bool removeDegenerateAxes=False) const
 Functions which extract an Array of values from a Lattice. More...
 
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". More...
 
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. More...
 
virtual void apply (T(*function)(T))
 Replace every element, x, of the Lattice with the result of f(x). More...
 
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. More...
 
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. More...
 
virtual void copyDataTo (Lattice< T > &to) const
 Copy the data from this lattice to the given lattice. More...
 
virtual uInt advisedMaxPixels () const
 This function returns the advised maximum number of pixels to include in the cursor of an iterator. More...
 
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. More...
 
virtual Bool doGetSlice (Array< T > &buffer, const Slicer &section)=0
 The functions (in the derived classes) doing the actual work. More...
 
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. More...
 
virtual Bool isPersistent () const
 Is the lattice persistent and can it be loaded by other processes as well? That is the case for a PagedArray or PagedImage and for an ImageExpr which does not use transient lattices or regions. More...
 
virtual Bool isPaged () const
 Is the lattice paged to disk?
The default implementation returns False. More...
 
virtual Bool canReferenceArray () const
 Can the lattice data be referenced as an array section? That is the case for an ArrayLattice or a Temp/SubLattice using it. More...
 
virtual Bool isWritable () const
 Is the lattice writable?
The default implementation returns True. More...
 
virtual void save (const String &fileName) const
 Save the image in an AipsIO file with the given name. More...
 
virtual Bool lock (FileLocker::LockType, uInt nattempts)
 It is strongly recommended to use class LatticeLocker to handle lattice locking. More...
 
virtual void unlock ()
 
virtual Bool hasLock (FileLocker::LockType) const
 
virtual void resync ()
 Resynchronize the Lattice object with the lattice file. More...
 
virtual void flush ()
 Flush the data (but do not unlock). More...
 
virtual void tempClose ()
 Temporarily close the lattice. More...
 
virtual void reopen ()
 Explicitly reopen the temporarily closed lattice. More...
 
virtual IPosition shape () const =0
 Return the shape of the Lattice including all degenerate axes (ie. More...
 
virtual uInt ndim () const
 Return the number of axes in this Lattice. More...
 
virtual size_t nelements () const
 Return the total number of elements in this Lattice. More...
 
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". More...
 
IPosition niceCursorShape (uInt maxPixels) const
 Returns a recommended cursor shape for iterating through all the pixels in the Lattice. More...
 
IPosition niceCursorShape () const
 
virtual IPosition doNiceCursorShape (uInt maxPixels) const
 The function (in the derived classes) doing the actual work. More...
 
virtual uInt maximumCacheSize () const
 Maximum cache size - not necessarily all used. More...
 
virtual void setMaximumCacheSize (uInt howManyPixels)
 Set the maximum (allowed) cache size as indicated. More...
 
virtual void setCacheSizeInTiles (uInt howManyTiles)
 Set the actual cache size for this Array to be big enough for the indicated number of tiles. More...
 
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. More...
 
virtual void clearCache ()
 Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called. More...
 
virtual void showCacheStatistics (ostream &os) const
 Report on cache success. More...
 

Protected Member Functions

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

Private Attributes

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

Detailed Description

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

A base class for astronomical images.

Intended use:

Public interface

Prerequisite

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;
}

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..\.
};

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

Definition at line 38 of file PixelRangeDialog.qo.h.

Constructor & Destructor Documentation

template<class T>
casacore::ImageInterface< T >::ImageInterface ( )
template<class T>
casacore::ImageInterface< T >::ImageInterface ( const RegionHandler regionHandler)

Construct for a specific region handler object.

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

Copy constructor (copy semantics).

template<class T>
virtual casacore::ImageInterface< T >::~ImageInterface ( )
virtual

Member Function Documentation

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 219 of file ImageInterface.h.

template<class T>
virtual ImageAttrHandler& casacore::ImageInterface< T >::attrHandler ( Bool  createHandler = False)
virtual
template<class T>
Bool casacore::ImageInterface< T >::canDefineRegion ( ) const
inline

Can the image handle region definition?

Definition at line 257 of file ImageInterface.h.

template<class T>
virtual ImageInterface<T>* casacore::ImageInterface< T >::cloneII ( ) const
pure virtual
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 >.

template<class T>
const CoordinateSystem& casacore::ImageInterface< T >::coordinates ( ) const
inline

Definition at line 195 of file ImageInterface.h.

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.

template<class T>
Bool casacore::ImageInterface< T >::fromRecord ( String error,
const RecordInterface inRec 
)
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.

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.

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.

template<class T>
RegionHandler* casacore::ImageInterface< T >::getRegionHandler ( )
inlineprotected

Get access to the region handler.

Definition at line 379 of file ImageInterface.h.

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?

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 240 of file ImageInterface.h.

template<class T>
virtual String casacore::ImageInterface< T >::imageType ( ) const
pure virtual
template<class T>
virtual LELCoordinates casacore::ImageInterface< T >::lelCoordinates ( ) const
virtual

Function to get a LELCoordinate object containing the coordinates.

Reimplemented from casacore::LatticeBase.

template<class T>
LoggerHolder& casacore::ImageInterface< T >::logger ( )
inline
template<class T>
const LoggerHolder& casacore::ImageInterface< T >::logger ( ) const
inline

Definition at line 206 of file ImageInterface.h.

template<class T>
LogIO& casacore::ImageInterface< T >::logSink ( )
inline

Allow messages to be logged to this ImageInterface.

Definition at line 212 of file ImageInterface.h.

Referenced by casacore::ImageInterface< casacore::Complex >::logSink().

template<class T>
const LogIO& casacore::ImageInterface< T >::logSink ( ) const
inline

Definition at line 214 of file ImageInterface.h.

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.

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.

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 228 of file ImageInterface.h.

template<class T>
virtual String casacore::ImageInterface< T >::name ( Bool  stripPath = False) const
pure virtual
template<class T>
virtual Bool casacore::ImageInterface< T >::ok ( ) const
pure virtual
template<class T>
ImageInterface& casacore::ImageInterface< T >::operator= ( const ImageInterface< T > &  other)
protected

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

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

Get the names of all regions/masks.

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::PagedImage< T >, casacore::PagedImage< casacore::Float >, casacore::HDF5Image< T >, casa::ComponentListImage, casacore::TempImage< T >, casacore::TempImage< casacore::DComplex >, casacore::TempImage< casacore::Float >, and casacore::TempImage< casacore::Complex >.

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.

template<class T>
virtual void casacore::ImageInterface< T >::resize ( const TiledShape newShape)
pure virtual
template<class T>
Bool casacore::ImageInterface< T >::restoreImageInfo ( const RecordInterface rec)
protected

Restore the image info from the record.

template<class T>
ImageAttrHandler& casacore::ImageInterface< T >::roAttrHandler ( ) const
inline

Definition at line 252 of file ImageInterface.h.

template<class T>
ImageInfo& casacore::ImageInterface< T >::rwImageInfo ( )
inline

Get non-const access to the ImageInfo.

Definition at line 243 of file ImageInterface.h.

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::PagedImage< T >, casacore::PagedImage< casacore::Float >, casa::ComponentListImage, and casacore::HDF5Image< T >.

template<class T>
void casacore::ImageInterface< T >::setCoordsMember ( const CoordinateSystem coords)
inlineprotected

Set the coordinate system variable.

Definition at line 367 of file ImageInterface.h.

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 casa::ComponentListImage, casacore::PagedImage< T >, casacore::PagedImage< casacore::Float >, casacore::HDF5Image< T >, casacore::TempImage< T >, casacore::TempImage< casacore::DComplex >, casacore::TempImage< casacore::Float >, and casacore::TempImage< casacore::Complex >.

template<class T>
virtual Bool casacore::ImageInterface< T >::setImageInfo ( const ImageInfo info)
virtual
template<class T>
void casacore::ImageInterface< T >::setImageInfoMember ( const ImageInfo imageInfo)
protected

Set the image info variable.

template<class T>
void casacore::ImageInterface< T >::setLogMember ( const LoggerHolder logger)
inlineprotected

Set the image logger variable.

Definition at line 360 of file ImageInterface.h.

template<class T>
virtual Bool casacore::ImageInterface< T >::setMiscInfo ( const RecordInterface newInfo)
virtual
template<class T>
void casacore::ImageInterface< T >::setMiscInfoMember ( const RecordInterface rec)
inlineprotected

Set the miscinfo variable.

Definition at line 375 of file ImageInterface.h.

template<class T>
void casacore::ImageInterface< T >::setUnitMember ( const Unit unit)
inlineprotected

Set the unit variable.

Definition at line 371 of file ImageInterface.h.

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::PagedImage< T >, casacore::PagedImage< casacore::Float >, casa::ComponentListImage, and casacore::HDF5Image< T >.

template<class T>
Bool casacore::ImageInterface< T >::toRecord ( String error,
RecordInterface outRec 
)

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

template<class T>
virtual const Unit& casacore::ImageInterface< T >::units ( ) const
inlinevirtual

Definition at line 182 of file ImageInterface.h.

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

Member Data Documentation

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 384 of file ImageInterface.h.

Referenced by casacore::ImageInterface< casacore::Complex >::coordinates(), and casacore::ImageInterface< casacore::Complex >::setCoordsMember().

template<class T>
ImageInfo casacore::ImageInterface< T >::imageInfo_p
private
template<class T>
ImageAttrHandler casacore::ImageInterface< T >::itsBaseAttrHandler
private

The attribute handling object.

Definition at line 394 of file ImageInterface.h.

template<class T>
LoggerHolder casacore::ImageInterface< T >::log_p
private
template<class T>
TableRecord casacore::ImageInterface< T >::miscInfo_p
private
template<class T>
RegionHandler* casacore::ImageInterface< T >::regHandPtr_p
private
template<class T>
Unit casacore::ImageInterface< T >::unit_p
private

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