|
| ComponentListImage (const ComponentList &compList, const casacore::CoordinateSystem &csys, const casacore::IPosition &shape, const casacore::String &tableName, const casacore::Bool doCache=casacore::True) |
| Create a new ComponentListImage from a component list, coordinate system, and shape. More...
|
|
| ComponentListImage (const ComponentList &compList, const casacore::CoordinateSystem &csys, const casacore::IPosition &shape, const casacore::Bool doCache=casacore::True) |
| This constructor creates a temporary ComponentListImage. More...
|
|
| ComponentListImage (const casacore::String &filename, const casacore::Bool doCache=casacore::True, casacore::MaskSpecifier maskSpec=casacore::MaskSpecifier()) |
| Construct an object by reading a persistent ComponentListImage from disk. More...
|
|
| ComponentListImage (const ComponentListImage &image) |
| Copy constructor uses reference semantics. More...
|
|
| ~ComponentListImage () |
|
ComponentListImage & | operator= (const ComponentListImage &other) |
| Assignment operator using reference semantics. More...
|
|
void | apply (casacore::Float(*function)(casacore::Float)) |
| These override the methods in Lattice and always throw an exception because there is not a general way to do this for a component list. More...
|
|
void | apply (casacore::Float(*function)(const casacore::Float &)) |
|
void | apply (const casacore::Functional< casacore::Float, casacore::Float > &function) |
|
casacore::ImageInterface
< casacore::Float > * | cloneII () const |
| Create an ImageInterface clone using reference semantics. More...
|
|
const ComponentList & | componentList () const |
| get a const reference to the underlying ComponentList More...
|
|
casacore::Bool | doGetMaskSlice (casacore::Array< casacore::Bool > &buffer, const casacore::Slicer §ion) |
| The function (in the derived classes) doing the actual work. More...
|
|
void | copyData (const casacore::Lattice< casacore::Float > &) |
| This method overrides that in Lattice and always throw exceptions as there is not general way to do this for component lists. More...
|
|
bool | doGetSlice (casacore::Array< casacore::Float > &buffer, const casacore::Slicer §ion) |
| The functions (in the derived classes) doing the actual work. More...
|
|
void | doPutSlice (const casacore::Array< casacore::Float > &buffer, const casacore::IPosition &where, const casacore::IPosition &stride) |
| This method overrides that in Lattice and always throws an exception as there is not general way to do this for component lists. More...
|
|
const casacore::LatticeRegion * | getRegionPtr () const |
| Get a pointer the default pixelmask object used with this image. More...
|
|
casacore::Bool | hasPixelMask () const |
| Does the lattice have a pixelmask? The default implementation returns False. More...
|
|
casacore::String | imageType () const |
| Get the image type (returns name of derived class). More...
|
|
casacore::Bool | isMasked () const |
| Has the object really a mask? The default implementation returns True if the MaskedLattice has a region with a mask. More...
|
|
casacore::Bool | isPaged () const |
| returns True if there is a persistent table associated with this object. More...
|
|
casacore::Bool | isPersistent () const |
| returns True if there is a persistent table associated with this object. More...
|
|
casacore::Bool | isWritable () const |
| Overrides the LatticeBase method. More...
|
|
casacore::String | name (bool stripPath=false) const |
| If there is no persistent table associated with this object, returns "Temporary ComponentListImage". More...
|
|
casacore::Bool | ok () const |
| Check class invariants. More...
|
|
const casacore::Lattice
< casacore::Bool > & | pixelMask () const |
| Throws an exception is there is no pixel mask. More...
|
|
void | removeRegion (const casacore::String &name, casacore::RegionHandler::GroupType=casacore::RegionHandler::Any, casacore::Bool throwIfUnknown=casacore::True) |
| overrides ImageInterface method More...
|
|
void | resize (const casacore::TiledShape &newShape) |
| Function which changes the shape of the image (N.B. More...
|
|
void | set (const casacore::Float &value) |
| Overrides Lattice method. More...
|
|
void | setCache (casacore::Bool doCache) |
| controls if pixel values, directions, and frequencies are cached. More...
|
|
casacore::Bool | setCoordinateInfo (const casacore::CoordinateSystem &coords) |
| Set the coordinate system. More...
|
|
void | setDefaultMask (const casacore::String ®ionName) |
| Set the default pixelmask to the mask with the given name (which has to exist in the "masks" group). More...
|
|
casacore::Bool | setImageInfo (const casacore::ImageInfo &info) |
|
casacore::Bool | setMiscInfo (const casacore::RecordInterface &newInfo) |
|
casacore::Bool | setUnits (const casacore::Unit &newUnits) |
| An exception is thrown if newUnits are anything but Jy/pixel. More...
|
|
casacore::IPosition | shape () const |
| return the shape of the image. More...
|
|
void | useMask (casacore::MaskSpecifier=casacore::MaskSpecifier()) |
| Overrides ImageInterface method. 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
< casacore::Float > * | cloneML () const |
| Make a copy of the derived object (reference semantics). More...
|
|
virtual const Unit & | units () const |
|
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 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 Vector< String > | regionNames (RegionHandler::GroupType=RegionHandler::Any) const |
| Get the names of all regions/masks. 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) |
|
| MaskedLattice () |
| Default constructor. More...
|
|
| MaskedLattice (const MaskedLattice< casacore::Float > &) |
| 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
< casacore::Float > * | clone () const |
| Make a copy of the derived object (reference semantics). More...
|
|
virtual Lattice< Bool > & | pixelMask () |
|
const LatticeRegion & | region () 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 | getMask (Array< Bool > &buffer, Bool removeDegenerateAxes=False) |
|
Array< Bool > | getMask (Bool removeDegenerateAxes=False) const |
|
Bool | getMaskSlice (COWPtr< Array< Bool > > &buffer, const Slicer §ion, 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 | getMaskSlice (Array< Bool > &buffer, const Slicer §ion, 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 > | getMaskSlice (const Slicer §ion, 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 | ~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...
|
|
casacore::Float | operator() (const IPosition &where) const |
| Return the value of the single element located at the argument IPosition. More...
|
|
virtual casacore::Float | getAt (const IPosition &where) const |
|
virtual void | putAt (const casacore::Float &value, const IPosition &where) |
| Put the value of a single element. More...
|
|
Bool | get (COWPtr< Array< casacore::Float > > &buffer, Bool removeDegenerateAxes=False) const |
| Functions which extract an Array of values from a Lattice. More...
|
|
Bool | get (Array< casacore::Float > &buffer, Bool removeDegenerateAxes=False) |
|
Array< casacore::Float > | get (Bool removeDegenerateAxes=False) const |
|
Bool | getSlice (COWPtr< Array< casacore::Float > > &buffer, const Slicer §ion, Bool removeDegenerateAxes=False) const |
|
Bool | getSlice (COWPtr< Array< casacore::Float > > &buffer, const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) const |
|
Bool | getSlice (COWPtr< Array< casacore::Float > > &buffer, const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False) const |
|
Bool | getSlice (Array< casacore::Float > &buffer, const Slicer §ion, Bool removeDegenerateAxes=False) |
|
Bool | getSlice (Array< casacore::Float > &buffer, const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) |
|
Bool | getSlice (Array< casacore::Float > &buffer, const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False) |
|
Array< casacore::Float > | getSlice (const Slicer §ion, Bool removeDegenerateAxes=False) const |
|
Array< casacore::Float > | getSlice (const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) const |
|
Array< casacore::Float > | getSlice (const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False) const |
|
void | putSlice (const Array< casacore::Float > &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< casacore::Float > &sourceBuffer, const IPosition &where) |
|
void | put (const Array< casacore::Float > &sourceBuffer) |
|
void | operator+= (const Lattice< casacore::Float > &other) |
| Add, subtract, multiple, or divide by another Lattice. More...
|
|
void | operator-= (const Lattice< casacore::Float > &other) |
|
void | operator*= (const Lattice< casacore::Float > &other) |
|
void | operator/= (const Lattice< casacore::Float > &other) |
|
virtual void | copyDataTo (Lattice< casacore::Float > &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
< casacore::Float > * | 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 | ~LatticeBase () |
| A virtual destructor is needed so that it will use the actual destructor in the derived class. 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 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 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...
|
|
Read, store, and manipulate an astronomical image based on a component list.
Prerequisite
Etymology
An Image comprised of a ComponentList.
Synopsis
A ComponentListImage is an image based on a ComponentList table. Upon construction, the pixel values are not known, and are computed on the fly when doGetSlice() is called.
AXES A ComponetListImage must have 2, 3, or 4 axes. At least two of these axes must be associated with a direction coordinate. Optionally, a ComponentListImage can also have a frequency and/or polarization axis. The maximum length of the polarization axis is four pixels, and the associated polarization values are constrained to be in the set of stokes parameters I, Q, U, and/or V.
UNITS A ComponentListImage must have units of Jy/pixel, and setUnit() will thrown an exception if directed to set the brightness unit to something other than this.
BEAMS ComponentListImages do not support beams, and setImageInfo() will throw an exception if beam information is included in the passed object. One can of course create another type of image using the pixel values of a ComponentListImage and modify metadata of the non-ComponentListImage to their heart's content.
CACHING PIXEL VALUES The pixel values can be cached for the life of the object for fast retrieval if they are needed again. In this case, a TemporaryImage is created to hold the pixel values, The associated mask of this TempImage indicates if the corresponding pixel values have been computed or not; pixel values are computed as needed. In addition, the world coordinate values of all the direction and frequency pixels in the image are cached if caching is requested, as these computations can be expensive.
CACHING OF POINT SOURCE PIXEL POSITIONS Computing samples for point source sky components on a pixel by pixel basis can be expensive (cf CAS-5688), and in comparison, caching their values for later use takes relatively little memory (I estimate 16 bytes * nchan * nstokes per point source). For this reason, if the associated component list contains point sources, the pixel coordinates of all the point sources are computed in a highly optimized way on the first call to doGetSlice() and are cached for later use; computing their values on a pixel by pixel basis is not done. Pixel coordinates for point sources which fall outside the image boundaries are not cached.
MODIFYING PIXEL VALUES Pixel values are computed from sky components; one cannot set pixel values explicitly. Any method that ultimately calls doPutSlice will throw an exception. Note however, that masks can be added, removed, and modified in the usual ways.
Example
Motivation
Kumar Golap is the motivation. See CAS-5837 and CAS-7309. The idea being that an image which can be represented by sky components takes a small fraction of the space to store compared to a PagedImage with identical pixel values.
Definition at line 118 of file ComponentListImage.h.