|
| ImageExpr () |
| The default constructor. More...
|
|
| ImageExpr (const LatticeExpr< T > &latticeExpr, const String &expr, const String &fileName=String()) |
| Construct an ImageExpr from a LatticeExpr. More...
|
|
| ImageExpr (const LatticeExpr< T > &latticeExpr, const String &expr, const String &fileName, const JsonKVMap &) |
|
| ImageExpr (const LatticeExpr< T > &latticeExpr, const String &expr, const String &fileName, const LELImageCoord &imCoord) |
| Same as previous constructor, but the coordinates are taken from the given LELImageCoord object. More...
|
|
| ImageExpr (const ImageExpr< T > &other) |
| Copy constructor (reference semantics) More...
|
|
| ~ImageExpr () |
| Destructor does nothing. More...
|
|
ImageExpr< T > & | operator= (const ImageExpr< T > &other) |
| Assignment (reference semantics) More...
|
|
virtual ImageInterface< T > * | cloneII () const |
| Make a copy of the object (reference semantics). More...
|
|
virtual void | save (const String &fileName) const |
| Save the image in an AipsIO file with the given name. More...
|
|
void | setFileName (const String &name) |
| Set the file name. More...
|
|
virtual Bool | setMiscInfo (const RecordInterface &newInfo) |
| Replace the miscinfo in the ImageExpr, which writes the image.expr file. More...
|
|
virtual String | imageType () const |
| Get the image type (returns name of derived class). More...
|
|
virtual Bool | isMasked () const |
| Has the object really a mask? More...
|
|
virtual const LatticeRegion * | getRegionPtr () const |
| Get the region used. More...
|
|
virtual IPosition | shape () const |
| return the shape of the ImageExpr More...
|
|
virtual void | resize (const TiledShape &newShape) |
| Function which changes the shape of the ImageExpr. More...
|
|
virtual Bool | doGetMaskSlice (Array< Bool > &buffer, const Slicer §ion) |
| Do the actual get of the mask data. More...
|
|
virtual Bool | doGetSlice (Array< T > &buffer, const Slicer &theSlice) |
| Do the actual get of the data. More...
|
|
virtual void | doPutSlice (const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride) |
| putSlice is not possible on an expression, so it throws an exception. More...
|
|
virtual String | name (Bool stripPath=False) const |
| If the object is persistent, the file name is given. More...
|
|
virtual Bool | ok () const |
| Check class invariants. More...
|
|
virtual LatticeIterInterface< T > * | makeIter (const LatticeNavigator &navigator, Bool useRef) const |
| These are the implementations of the LatticeIterator letters. More...
|
|
virtual Bool | isWritable () const |
| Returns False, as the ImageExpr is not writable. More...
|
|
virtual Bool | isPersistent () const |
| Is the lattice persistent and can it be loaded by other processes as well? More...
|
|
virtual IPosition | doNiceCursorShape (uInt maxPixels) const |
| Help the user pick a cursor for most efficient access if they only want pixel values and don't care about the order or dimension of the cursor. More...
|
|
virtual Bool | lock (FileLocker::LockType, uInt nattempts) |
| Handle the (un)locking and syncing. More...
|
|
virtual void | unlock () |
|
virtual Bool | hasLock (FileLocker::LockType) const |
|
virtual void | resync () |
|
virtual void | tempClose () |
|
virtual void | reopen () |
|
const LatticeExpr< T > & | expression () const |
| Get the lattice expression. More...
|
|
| ImageInterface () |
|
| ImageInterface (const RegionHandler ®ionHandler) |
| 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 Bool | setUnits (const Unit &newUnits) |
| Function which get and set the units associated with the image pixels (i.e. More...
|
|
virtual const Unit & | units () const |
|
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 CoordinateSystem & | coordinates () const |
|
virtual LELCoordinates | lelCoordinates () const |
| Function to get a LELCoordinate object containing the coordinates. More...
|
|
LoggerHolder & | logger () |
| Get access to the LoggerHolder. More...
|
|
const LoggerHolder & | logger () const |
|
LogIO & | logSink () |
| Allow messages to be logged to this ImageInterface. More...
|
|
const LogIO & | logSink () const |
|
void | appendLog (const LoggerHolder &other) |
| Add the messages from the other image logger to this one. More...
|
|
const TableRecord & | miscInfo () const |
| Often we have miscellaneous information we want to attach to an image. More...
|
|
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. More...
|
|
ImageInfo & | rwImageInfo () |
| Get non-const access to the ImageInfo. More...
|
|
virtual Bool | setImageInfo (const ImageInfo &info) |
|
virtual ImageAttrHandler & | attrHandler (Bool createHandler=False) |
| Get access to the attribute handler. More...
|
|
ImageAttrHandler & | roAttrHandler () 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 ®ion, RegionHandler::GroupType, Bool overwrite=False) |
| Define a region/mask belonging to the image. More...
|
|
virtual Bool | hasRegion (const String ®ionName, RegionHandler::GroupType=RegionHandler::Any) const |
| Does the image have a region with the given name? More...
|
|
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). 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< String > | regionNames (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 ®ionName) |
| 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 ®ionName, 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...
|
|
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) |
|
template<class T>
class casacore::ImageExpr< T >
Hold mathematical expressions involving ImageInterface objects.
Intended use:
Public interface
Review Status
- Test programs:
- tImageExpr
Prerequisite
Etymology
This class holds a LatticeExpr object but inherits from ImageInterface hence ImageExpr
Synopsis
An ImageExpr object holds a LatticeExpr object which can be used to evaluate mathematical expressions involving Lattices. ImageExpr exists so that direct manipulation of LatticeExpr objects by methods expecting an ImageInterface, rather than a Lattice can occur.
The ImageExpr object is constructed from a LatticeExpr object, but only if the latter has true Coordinates associated with it. The ImageExpr object is not writable, so the ImageExpr object functions like a read only ImageInterface.
Example
PagedImage<Float> a("imageB");
PagedImage<Float> b("imageB");
LatticeExprNode node(a+b);
LatticeExpr<Float> lExpr(node);
ImageExpr<Float> iExpr(lExpr);
LogOrigin or(
"imageImpl",
"main()",
WHERE);
ImageStatistics<Float> stats(iExpr,
logger);
The ImageExpr object is evaluated during the call to stats.dislay()
. Previously, the expression tree has been constructed, but not evaluated.
Motivation
This enables one to evaluate expressions but not to have to write them out to an output image.
Definition at line 111 of file ImageExpr.h.