28 #ifndef IMAGES_COMPONENTlISTIMAGE_H
29 #define IMAGES_COMPONENTlISTIMAGE_H
287 std::shared_ptr<casacore::LatticeRegion>
_mask =
nullptr;
300 std::pair<casacore::uInt, casacore::uInt>,
316 std::shared_ptr<casacore::TempImage<casacore::Float>>
_valueCache =
nullptr;
349 std::vector<casacore::uInt>& foundPtSourceIdx,
casacore::uInt& nInside,
350 casacore::uInt& nOutside,
const std::set<casacore::uInt>& pointSourceIdx
casacore::MVAngle _pixelLongSize
A Vector of integers, for indexing into Array<T> objects.
casacore::IPosition shape() const
return the shape of the image.
casacore::MFrequency _defaultFreq
A 1-D Specialization of the Array class.
Map a domain object into a range object via operator().
casacore::Vector< casacore::Int > _pixelToIQUV
void _getFreqValsDoCache(casacore::Vector< casacore::MVFrequency > &freqVals, const casacore::IPosition &secStart, casacore::uInt nFreqs, const casacore::SpectralCoordinate &specCoord)
casacore::Bool isMasked() const
Has the object really a mask? The default implementation returns True if the MaskedLattice has a regi...
Main interface class to a read/write table.
casacore::Int _stokesAxis
static void registerOpenFunction()
In general, clients shouldn't need to call this.
PtFound _findPixel(casacore::Cube< casacore::Double > &values, const casacore::IPosition &pixelPosition, const casacore::DirectionCoordinate &dirCoord, const SkyComponent &point, const casacore::Vector< casacore::MVFrequency > &freqValues) const
void _fillBuffer(casacore::Array< casacore::Float > &buffer, const casacore::IPosition &chunkShape, const casacore::IPosition &secStart, casacore::uInt nFreqs, const casacore::Cube< casacore::Double > &pixelVals) const
void _restoreImageInfo(const casacore::TableRecord &rec)
casacore::Matrix< std::shared_ptr< casacore::MVDirection > > _dirVals
casacore::Bool setCoordinateInfo(const casacore::CoordinateSystem &coords)
Set the coordinate system.
void set(const casacore::Float &value)
Overrides Lattice method.
void _restoreUnits(const casacore::TableRecord &rec)
const ComponentList & componentList() const
get a const reference to the underlying ComponentList
std::map< std::pair< casacore::uInt, casacore::uInt >, casacore::Matrix< casacore::Float > > PtStoreType
yes it really does need to be initialized here (or in the constructor) because initializing to nullpt...
casacore::Bool isPersistent() const
returns True if there is a persistent table associated with this object.
A non-templated, abstract base class for array-like objects.
void _applyMaskSpecifier(const casacore::MaskSpecifier &spec)
Read, store, and manipulate an astronomical image based on a component list.
void _resize(const casacore::TiledShape &shape)
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 t...
casacore::Bool isPaged() const
returns True if there is a persistent table associated with this object.
A 2-D Specialization of the Array class.
casacore::Bool setUnits(const casacore::Unit &newUnits)
An exception is thrown if newUnits are anything but Jy/pixel.
ComponentListImage & operator=(const ComponentListImage &other)
Assignment operator using reference semantics.
casacore::Bool _hasStokes
bool doGetSlice(casacore::Array< casacore::Float > &buffer, const casacore::Slicer §ion)
The functions (in the derived classes) doing the actual work.
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 d...
void removeRegion(const casacore::String &name, casacore::RegionHandler::GroupType=casacore::RegionHandler::Any, casacore::Bool throwIfUnknown=casacore::True)
overrides ImageInterface method
A Measure: wave characteristics.
std::shared_ptr< casacore::LatticeRegion > _mask
Define the shape and tile shape.
void _restoreMiscInfo(const casacore::TableRecord &rec)
casacore::IPosition _shape
casacore::Bool ok() const
Check class invariants.
A base class for astronomical images.
casacore::Bool setMiscInfo(const casacore::RecordInterface &newInfo)
const casacore::Lattice< casacore::Bool > & pixelMask() const
Throws an exception is there is no pixel mask.
Interconvert pixel positions and directions (e.g. RA/DEC).
Class to specify which mask to use in an image.
void _restoreAll(const casacore::TableRecord &rec)
casacore::String name(bool stripPath=false) const
If there is no persistent table associated with this object, returns "Temporary ComponentListImage".
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.
ComponentList _modifiedCL
static casacore::LatticeBase * openCLImage(const casacore::String &name, const casacore::MaskSpecifier &)
Open an existing ComponentListImage.
casacore::MeasRef< casacore::MDirection > _dirRef
bool Bool
Define the standard types used by Casacore.
casacore::Bool doGetMaskSlice(casacore::Array< casacore::Bool > &buffer, const casacore::Slicer §ion)
The function (in the derived classes) doing the actual work.
void setCache(casacore::Bool doCache)
controls if pixel values, directions, and frequencies are cached.
casacore::Vector< std::shared_ptr< casacore::MVFrequency > > _freqVals
void _cacheCoordinateInfo(const casacore::CoordinateSystem &csys)
casacore::String imageType() const
Get the image type (returns name of derived class).
static casacore::Table & getTable(void *imagePtr, casacore::Bool writable)
Return the internal Table object to the RegionHandler.
std::shared_ptr< casacore::Bool > _computedPtSources
Yes this really has to be a shared_ptr so that _ptSourcePixelVals can be computed outside the constru...
void resize(const casacore::TiledShape &newShape)
Function which changes the shape of the image (N.B.
void _applyMask(const casacore::String &maskName)
static const casacore::String IMAGE_TYPE
A hierarchical collection of named fields of various types.
PtFound _findPixelIn3x3Box(casacore::IPosition &pixelPosition, casacore::Cube< casacore::Double > &values, const casacore::DirectionCoordinate &dirCoord, const SkyComponent &point, const casacore::Vector< casacore::MVFrequency > &freqValues) const
std::shared_ptr< PtStoreType > _ptSourcePixelVals
Specify which elements to extract from an n-dimensional array.
Interconvert pixel and frequency values.
casacore::Bool hasPixelMask() const
Does the lattice have a pixelmask? The default implementation returns False.
casacore::Bool setImageInfo(const casacore::ImageInfo &info)
void _getDirValsNoCache(casacore::Vector< casacore::MVDirection > &dirVals, const casacore::IPosition &secStart, casacore::uInt endLong, casacore::uInt endLat, const casacore::DirectionCoordinate &dirCoord) const
void _getDirValsDoCache(casacore::Vector< casacore::MVDirection > &dirVals, const casacore::IPosition &secStart, casacore::uInt endLong, casacore::uInt endLat, const casacore::DirectionCoordinate &dirCoord)
A class for manipulating groups of components.
void _findPointSoures(std::vector< casacore::uInt > &foundPtSourceIdx, casacore::uInt &nInside, casacore::uInt &nOutside, const std::set< casacore::uInt > &pointSourceIdx)
A component of a model of the sky.
void apply(casacore::Float(*function)(casacore::Float))
These override the methods in Lattice and always throw an exception because there is not a general wa...
std::shared_ptr< casacore::TempImage< casacore::Float > > _valueCache
String: the storage and methods of handling collections of characters.
casacore::MVAngle _pixelLatSize
An optionally strided region in a Lattice.
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)...
casacore::ImageInterface< casacore::Float > * cloneII() const
Create an ImageInterface clone using reference semantics.
void _computePointSourcePixelValues()
improve performance by caching point source pixel values.
casacore::Vector< casacore::MVFrequency > _getAllFreqValues(casacore::uInt nFreqs)
Abstract base class for Record classes.
void _getFreqValsNoCache(casacore::Vector< casacore::MVFrequency > &freqVals, const casacore::IPosition &secStart, casacore::uInt nFreqs, const casacore::SpectralCoordinate &specCoord) const
void useMask(casacore::MaskSpecifier=casacore::MaskSpecifier())
Overrides ImageInterface method.
casacore::Bool isWritable() const
Overrides the LatticeBase method.
Miscellaneous information related to an image.
Class to handle angle type conversions and I/O.
void handleMath(const casacore::Lattice< casacore::Float > &from, int oper)
Overrides Lattice.
GroupType
Define the possible group types (regions or masks).
Interconvert pixel and world coordinates.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
const casacore::LatticeRegion * getRegionPtr() const
Get a pointer the default pixelmask object used with this image.
casacore::MeasRef< casacore::MFrequency > _freqRef