An ordered list of annotations and comments representing an ascii region file. <author>Dave Mehringer</author>. More...
#include <RegionTextList.h>
Public Member Functions | |
RegionTextList () | |
create an empty list which can be appended to. | |
RegionTextList (const CoordinateSystem &csys, const IPosition shape) | |
create an empty list which can be appended to. | |
RegionTextList (const String &filename, const CoordinateSystem &csys, const IPosition shape, const String &prependRegion="", const String &globalOverrideChans="", const String &globalOverrrideStokes="", const Int requireAtLeastThisVersion=RegionTextParser::CURRENT_VERSION) | |
create a list by reading it from a file. | |
RegionTextList (const CoordinateSystem &csys, const String &text, const IPosition shape, const String &prependRegion="", const String &globalOverrideChans="", const String &globalOverrrideStokes="") | |
create a list by reading it from a text string. | |
~RegionTextList () | |
void | addLine (const AsciiAnnotationFileLine &line) |
add a line to the end of the list | |
uInt | nLines () const |
number of lines in the list | |
AsciiAnnotationFileLine | lineAt (const uInt i) const |
get the line at the specified index | |
const Vector < AsciiAnnotationFileLine > & | getLines () const |
get all lines in the list | |
ostream & | print (ostream &os) const |
CountedPtr< const WCRegion > | getRegion () const |
get the composite region. | |
Record | regionAsRecord () const |
get the composite region as a region record. | |
Private Attributes | |
Vector< AsciiAnnotationFileLine > | _lines |
vector< SHARED_PTR< const WCRegion > > | _regions |
CoordinateSystem | _csys |
IPosition | _shape |
Bool | _canGetRegion |
vector< Bool > | _union |
if false, then the corresponding region is complementary to the result of the previous region operations in the sequence | |
vector< SHARED_PTR< const WCDifference > > | _myDiff |
SHARED_PTR< const WCRegion > | _composite |
An ordered list of annotations and comments representing an ascii region file. <author>Dave Mehringer</author>.
Public interface
An order list of annotations and comments representing an ascii region file.
A list of regions and annotations and comments representing an ascii region file. See the region file format proposal attached to CAS-2285 (https://bugs.nrao.edu/browse/CAS-2285)
Definition at line 52 of file RegionTextList.h.
casa::RegionTextList::RegionTextList | ( | ) |
casa::RegionTextList::RegionTextList | ( | const CoordinateSystem & | csys, | |
const IPosition | shape | |||
) |
create an empty list which can be appended to.
This constructor is used for constructing an annotation list on the fly, possibly to be written to a file when complete. It can be used to determine the composite region as well but it is the caller's responsibility to ensure the regions added to this object are constructed in a consistent manner (eg using the same coordinate system). shape
is the image shape and is only used if the first region is a difference; in that case, the all pixels in entire shape are set to good initially. globalOverrideChans
override all spectral selections in the file or text by using this channel selection <src>globalOverrideStokes
override all correlation selections in the file or text by using this polarization selection
casa::RegionTextList::RegionTextList | ( | const String & | filename, | |
const CoordinateSystem & | csys, | |||
const IPosition | shape, | |||
const String & | prependRegion = "" , |
|||
const String & | globalOverrideChans = "" , |
|||
const String & | globalOverrrideStokes = "" , |
|||
const Int | requireAtLeastThisVersion = RegionTextParser::CURRENT_VERSION | |||
) |
create a list by reading it from a file.
An exception is thrown if the file is not in the correct format or does not exist. The coordinate system is used for setting defaults and reference frames to be used. <src>shape is the image shape and is only used if the first region is a difference; in that case, the all pixels in entire shape are set to good initially.
casa::RegionTextList::RegionTextList | ( | const CoordinateSystem & | csys, | |
const String & | text, | |||
const IPosition | shape, | |||
const String & | prependRegion = "" , |
|||
const String & | globalOverrideChans = "" , |
|||
const String & | globalOverrrideStokes = "" | |||
) |
create a list by reading it from a text string.
An exception is thrown if the text is not in the correct format. The coordinate system is used for setting defaults and reference frames to be used. shape
is the image shape and is only used if the first region is a difference; in that case, the all pixels in entire shape are set to good initially.
casa::RegionTextList::~RegionTextList | ( | ) |
void casa::RegionTextList::addLine | ( | const AsciiAnnotationFileLine & | line | ) |
add a line to the end of the list
const Vector<AsciiAnnotationFileLine>& casa::RegionTextList::getLines | ( | ) | const [inline] |
CountedPtr<const WCRegion> casa::RegionTextList::getRegion | ( | ) | const |
get the composite region.
AsciiAnnotationFileLine casa::RegionTextList::lineAt | ( | const uInt | i | ) | const |
get the line at the specified index
uInt casa::RegionTextList::nLines | ( | ) | const |
number of lines in the list
ostream& casa::RegionTextList::print | ( | ostream & | os | ) | const |
Referenced by casa::operator<<().
Record casa::RegionTextList::regionAsRecord | ( | ) | const |
get the composite region as a region record.
Bool casa::RegionTextList::_canGetRegion [private] |
Definition at line 139 of file RegionTextList.h.
SHARED_PTR<const WCRegion> casa::RegionTextList::_composite [mutable, private] |
Definition at line 144 of file RegionTextList.h.
CoordinateSystem casa::RegionTextList::_csys [private] |
Definition at line 137 of file RegionTextList.h.
Vector<AsciiAnnotationFileLine> casa::RegionTextList::_lines [private] |
Definition at line 135 of file RegionTextList.h.
Referenced by getLines().
vector<SHARED_PTR<const WCDifference> > casa::RegionTextList::_myDiff [mutable, private] |
Definition at line 143 of file RegionTextList.h.
vector<SHARED_PTR<const WCRegion> > casa::RegionTextList::_regions [private] |
Definition at line 136 of file RegionTextList.h.
IPosition casa::RegionTextList::_shape [private] |
Definition at line 138 of file RegionTextList.h.
vector<Bool> casa::RegionTextList::_union [private] |
if false, then the corresponding region is complementary to the result of the previous region operations in the sequence
Definition at line 142 of file RegionTextList.h.