29 #ifndef IMAGES_REGIONMANAGER_H
30 #define IMAGES_REGIONMANAGER_H
55 template<
class T>
class PtrBlock;
105 const String& absrel=
"abs" );
126 const uInt pixelAxis0,
127 const uInt pixelAxis1,
140 const uInt pixelAxis0,
141 const uInt pixelAxis1,
static ImageRegion * wmask(const String &command)
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)
static Record * readImageFile(String filename, String regionname)
Reading of a file containing an ImageRegion in the AipsIO format dump.
Main interface class to a read/write table.
ImageRegion * doDifference(const WCRegion ®1, const WCRegion ®2)
Various versions of handling the difference of regions.
String absreltype(const Int absrelval=0)
ImageRegion * doUnion(const WCRegion ®1, const WCRegion ®2)
Different versions of unioning regions.
Bool removeRegionInTable(const String &tabName, const String ®Name)
Remove a region from table...refuse is regionname is "".
ostream-like interface to creating log messages.
std::unique_ptr< CoordinateSystem > itsCSys
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,...
static Bool isPixelRegion(const ImageRegion ®)
Some little but useful tidbits.
void toQuantity(Quantity &out, const String &in)
Convert a string to Quantity.
Record * wbox(const Vector< Quantity > &blc, const Vector< Quantity > &trc, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel, const String &comment)
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
static ImageRegion * wsphere(const Vector< Quantity > ¢er, const Quantity &radius, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
Vector< String > namesInTable(const String &tabName)
names of regions in table
static Bool isWorldRegion(const ImageRegion ®)
ImageRegion * doIntersection(const WCRegion ®1, const WCRegion ®2)
Different versions of intersecting regions.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
const CoordinateSystem & getcoordsys() const
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 ImageRegion * wellipsoid(const Vector< Quantity > ¢er, const Vector< Quantity > &radii, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
A drop-in replacement for Block<T*>.
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.
ImageRegion * doconcatenation(const PtrBlock< const WCRegion * > ®ions, const WCBox &box)
Class to hold a region of interest in an image.
Record * tableToRecord(const String &tabName, const String ®name)
recover region from table
ImageRegion * doConcatenation(const WCRegion ®ion, const WCBox &box)
Various versions of concatenating a region onto another.
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 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)
Base class to define world coordinate regions of interest in an image.
String: the storage and methods of handling collections of characters.
Abstract base class for Record classes.
String recordToTable(const String &tabName, const RecordInterface &rec, const String ®Name="", Bool asmask=False)
ImageRegion * doComplement(const WCRegion ®1)
Various versions of creating a complement region.
RegionManager()
blank constructor
Class to define a world coordinate box region of interest in an image.
static Table & getTable(void *ptr, Bool writable)
Function to return the internal Table object to the RegionHandler.
void setcoordsys(const CoordinateSystem &csys)
Interconvert pixel and world coordinates.
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.