28 #ifndef IMAGES_IMAGEINTERFACE_H
29 #define IMAGES_IMAGEINTERFACE_H
48 template <
class T>
class LatticeIterInterface;
49 template <
class T>
class COWPtr;
146 template <
class T>
class ImageInterface:
public MaskedLattice<T>
165 virtual MaskedLattice<T>*
cloneML()
const;
166 virtual ImageInterface<T>*
cloneII()
const = 0;
174 virtual void resize (
const TiledShape& newShape) = 0;
343 uInt startNumber = 1)
const;
346 virtual Bool ok()
const = 0;
405 #ifndef CASACORE_NO_AUTO_TEMPLATES
406 #include <casacore/images/Images/ImageInterface.tcc>
407 #endif //# CASACORE_NO_AUTO_TEMPLATES
virtual Bool setUnits(const Unit &newUnits)
Function which get and set the units associated with the image pixels (i.e.
A 1-D Specialization of the Array class.
void append(const LoggerHolder &other)
Append the entries of the other logger to this one.
RegionHandler * getRegionHandler()
Get access to the region handler.
virtual const Unit & units() const
virtual ImageAttrHandler & attrHandler(Bool createHandler=False)
Get access to the attribute handler.
virtual ~ImageInterface()
Bool toRecord(String &error, RecordInterface &outRec)
Save and restore an ImageInterface object to or from a state Record.
ImageInterface & operator=(const ImageInterface &other)
Assignment (copy semantics) is only useful for derived classes.
Envelope class to handle Lattice Coordinates in LEL.
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...
void appendLog(const LoggerHolder &other)
Add the messages from the other image logger to this one.
LoggerHolder & logger()
Get access to the LoggerHolder.
Bool restoreImageInfo(const RecordInterface &rec)
Restore the image info from the record.
ImageAttrHandler itsBaseAttrHandler
The attribute handling object.
ostream-like interface to creating log messages.
virtual MaskedLattice< T > * cloneML() const
Make a copy of the derived object (reference semantics).
virtual Vector< String > regionNames(RegionHandler::GroupType=RegionHandler::Any) const
Get the names of all regions/masks.
Base class for handling regions in images.
Abstract base class for an image attributes handler.
Bool fromRecord(String &error, const RecordInterface &inRec)
void setUnitMember(const Unit &unit)
Set the unit variable.
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.
void setImageInfoMember(const ImageInfo &imageInfo)
Set the image info variable.
virtual Bool setMiscInfo(const RecordInterface &newInfo)
void setLogMember(const LoggerHolder &logger)
Set the image logger variable.
virtual String getDefaultMask() const
Get the name of the default pixelmask.
virtual void defineRegion(const String &name, const ImageRegion ®ion, RegionHandler::GroupType, Bool overwrite=False)
Define a region/mask belonging to the image.
A base class for astronomical images.
Class to specify which mask to use in an image.
virtual void setDefaultMask(const String ®ionName)
Set the default pixelmask to the mask with the given name (which has to exist in the "masks" group)...
ImageInfo & rwImageInfo()
Get non-const access to the ImageInfo.
virtual Bool ok() const =0
Check class invariants.
virtual Bool hasRegion(const String ®ionName, RegionHandler::GroupType=RegionHandler::Any) const
Does the image have a region with the given name?
const LoggerHolder & logger() const
virtual String name(Bool stripPath=False) const =0
Return the name of the current ImageInterface object.
virtual ImageInterface< T > * cloneII() const =0
virtual LELCoordinates lelCoordinates() const
Function to get a LELCoordinate object containing the coordinates.
bool Bool
Define the standard types used by Casacore.
virtual String imageType() const =0
Get the image type (returns name of derived class).
virtual Bool setCoordinateInfo(const CoordinateSystem &coords)
Functions to set or replace the coordinate information in the Image Returns False on failure...
virtual Bool canDefineRegion() const
Can the class indeed define and handle regions? The default implementation returns False...
virtual void renameRegion(const String &newName, const String &oldName, RegionHandler::GroupType=RegionHandler::Any, Bool overwrite=False)
Rename a region.
const ImageInfo & imageInfo() const
The ImageInfo object contains some miscellaneous information about the image which unlike that stored...
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
A hierarchical collection of named fields of various types.
const TableRecord & miscInfo() const
Often we have miscellaneous information we want to attach to an image.
Class to hold a region of interest in an image.
ImageAttrHandler & roAttrHandler() const
virtual void assign(const RecordInterface &that)
Assign that RecordInterface object to this one.
const CoordinateSystem & coordinates() const
LogIO & logSink()
Allow messages to be logged to this ImageInterface.
virtual void resize(const TiledShape &newShape)=0
Function which changes the shape of the image (N.B.
LogIO & logio()
Get access to the logger.
void setCoordsMember(const CoordinateSystem &coords)
Set the coordinate system variable.
const LatticeRegion & region() const
Get the region used.
const LogIO & logSink() const
String: the storage and methods of handling collections of characters.
CoordinateSystem coords_p
It is the job of the derived class to make these variables valid.
void setMiscInfoMember(const RecordInterface &rec)
Set the miscinfo variable.
Abstract base class for Record classes.
virtual void useMask(MaskSpecifier=MaskSpecifier())
Use the mask as specified.
Class holding a hierarchy of loggers.
Miscellaneous information related to an image.
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 Bool setImageInfo(const ImageInfo &info)
GroupType
Define the possible group types (regions or masks).
Interconvert pixel and world coordinates.
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). ...
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
ImageRegion getRegion(const String ®ionName, RegionHandler::GroupType=RegionHandler::Any) const
Get a region belonging to the image.
RegionHandler * regHandPtr_p
The region handling object.