Go to the documentation of this file.
29 #ifndef IMAGES_REGIONMANAGER_H
30 #define IMAGES_REGIONMANAGER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Quanta/Quantum.h>
34 #include <casacore/coordinates/Coordinates/CoordinateSystem.h>
35 #include <casacore/lattices/LRegions/RegionType.h>
36 #include <casacore/tables/Tables/Table.h>
53 template<
class T>
class Vector;
56 template<
class T>
class PtrBlock;
106 const String& absrel=
"abs" );
127 const uInt pixelAxis0,
128 const uInt pixelAxis1,
141 const uInt pixelAxis0,
142 const uInt pixelAxis1,
Interconvert pixel and world coordinates.
A drop-in replacement for Block<T*>.
std::unique_ptr< CoordinateSystem > itsCSys
const CoordinateSystem & getcoordsys() const
A hierarchical collection of named fields of various types.
ImageRegion * wpolygon(const Vector< Quantity > &x, const Vector< Quantity > &y, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
Wpolygon with coordsys and if pixelaxes[0] is -1 then its assumed to be 0,1,...
ImageRegion * doComplement(const WCRegion ®1)
Various versions of creating a complement region.
ImageRegion * doConcatenation(const WCRegion ®ion, const WCBox &box)
Various versions of concatenating a region onto another.
static Bool isWorldRegion(const ImageRegion ®)
Base class to define world coordinate regions of interest in an image.
static ImageRegion * wmask(const String &command)
ostream-like interface to creating log messages.
Bool removeRegionInTable(const String &tabName, const String ®Name)
Remove a region from table...refuse is regionname is "".
String imageRegionToTable(const String &tabName, const ImageRegion &imreg, const String ®Name, Bool asmask=False)
save region into a table (image, blank table or any other such)
Class to define a world coordinate box region of interest in an image.
Main interface class to a read/write table.
Record * box(const Vector< Double > &blc, const Vector< Double > &trc, const Vector< Double > &inc, const String &absrel, const Bool frac, const String &comment="")
LCSlicer box.
String absreltype(const Int absrelval=0)
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
static ImageRegion * wshell(const Vector< Quantity > ¢er, const Vector< Quantity > &innerRadii, const Vector< Quantity > &outerRadii, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
static Bool writeImageFile(const String &file, const String ®ionname, const Record ®ionRecord)
Writing a file of the AipsIO dump of the record representation of the region.
ImageRegion * doconcatenation(const PtrBlock< const WCRegion * > ®ions, const WCBox &box)
Record * wbox(const Vector< Quantity > &blc, const Vector< Quantity > &trc, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel, const String &comment)
String recordToTable(const String &tabName, const RecordInterface &rec, const String ®Name="", Bool asmask=False)
static Record * readImageFile(String filename, String regionname)
Reading of a file containing an ImageRegion in the AipsIO format dump.
this file contains all the compiler specific defines
RegionManager()
blank constructor
ImageRegion * doDifference(const WCRegion ®1, const WCRegion ®2)
Various versions of handling the difference of regions.
Record * tableToRecord(const String &tabName, const String ®name)
recover region from table
Vector< String > namesInTable(const String &tabName)
names of regions in table
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
Abstract base class for Record classes.
static ImageRegion * wellipse(const Quantity &xc, const Quantity &yc, const Quantity &a, const Quantity &b, const Quantity &pa, const uInt pixelAxis0, const uInt pixelAxis1, const CoordinateSystem &csys, const String &absrel)
ImageRegion * doUnion(const WCRegion ®1, const WCRegion ®2)
Different versions of unioning regions.
static Bool isPixelRegion(const ImageRegion ®)
Some little but useful tidbits.
String: the storage and methods of handling collections of characters.
static ImageRegion * wellipsoid(const Vector< Quantity > ¢er, const Vector< Quantity > &radii, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
static Table & getTable(void *ptr, Bool writable)
Function to return the internal Table object to the RegionHandler.
bool Bool
Define the standard types used by Casacore.
Class to hold a region of interest in an image.
A hierarchical collection of named fields of various types.
static ImageRegion * wsphere(const Vector< Quantity > ¢er, const Quantity &radius, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
void setcoordsys(const CoordinateSystem &csys)
void toQuantity(Quantity &out, const String &in)
Convert a string to Quantity.
ImageRegion * doIntersection(const WCRegion ®1, const WCRegion ®2)
Different versions of intersecting regions.