casa
5.7.0-16
|
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. More... | |
RegionTextList (const casacore::CoordinateSystem &csys, const casacore::IPosition shape) | |
create an empty list which can be appended to. More... | |
RegionTextList (const casacore::String &filename, const casacore::CoordinateSystem &csys, const casacore::IPosition shape, const casacore::String &prependRegion="", const casacore::String &globalOverrideChans="", const casacore::String &globalOverrrideStokes="", const casacore::Int requireAtLeastThisVersion=RegionTextParser::CURRENT_VERSION, casacore::Bool verbose=true, casacore::Bool requireImageRegion=true) | |
create a list by reading it from a file. More... | |
RegionTextList (const casacore::CoordinateSystem &csys, const casacore::String &text, const casacore::IPosition shape, const casacore::String &prependRegion="", const casacore::String &globalOverrideChans="", const casacore::String &globalOverrrideStokes="", casacore::Bool verbose=true, casacore::Bool requireImageRegion=true) | |
create a list by reading it from a text string. More... | |
~RegionTextList () | |
void | addLine (const AsciiAnnotationFileLine &line) |
add a line to the end of the list More... | |
casacore::uInt | nLines () const |
number of lines in the list More... | |
AsciiAnnotationFileLine | lineAt (const casacore::uInt i) const |
get the line at the specified index More... | |
const casacore::Vector < AsciiAnnotationFileLine > & | getLines () const |
get all lines in the list More... | |
std::ostream & | print (std::ostream &os) const |
casacore::CountedPtr< const casacore::WCRegion > | getRegion () const |
get the composite region. More... | |
casacore::Record | regionAsRecord () const |
get the composite region as a region record. More... | |
Private Attributes | |
casacore::Vector < AsciiAnnotationFileLine > | _lines |
std::vector< std::shared_ptr < const casacore::WCRegion > > | _regions |
casacore::CoordinateSystem | _csys |
casacore::IPosition | _shape |
casacore::Bool | _canGetRegion |
std::vector< casacore::Bool > | _union |
if false, then the corresponding region is complementary to the result of the previous region operations in the sequence More... | |
std::vector< std::shared_ptr < const casacore::WCDifference > > | _myDiff |
std::shared_ptr< const casacore::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 56 of file RegionTextList.h.
casa::RegionTextList::RegionTextList | ( | ) |
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. Do not use this constructor if you want to determine the final composite region.
casa::RegionTextList::RegionTextList | ( | const casacore::CoordinateSystem & | csys, |
const casacore::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 casacore::String & | filename, |
const casacore::CoordinateSystem & | csys, | ||
const casacore::IPosition | shape, | ||
const casacore::String & | prependRegion = "" , |
||
const casacore::String & | globalOverrideChans = "" , |
||
const casacore::String & | globalOverrrideStokes = "" , |
||
const casacore::Int | requireAtLeastThisVersion = RegionTextParser::CURRENT_VERSION , |
||
casacore::Bool | verbose = true , |
||
casacore::Bool | requireImageRegion = true |
||
) |
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. requireImageRegion
is passed to the parser so that file lines are added only for regions inside the image.
casa::RegionTextList::RegionTextList | ( | const casacore::CoordinateSystem & | csys, |
const casacore::String & | text, | ||
const casacore::IPosition | shape, | ||
const casacore::String & | prependRegion = "" , |
||
const casacore::String & | globalOverrideChans = "" , |
||
const casacore::String & | globalOverrrideStokes = "" , |
||
casacore::Bool | verbose = true , |
||
casacore::Bool | requireImageRegion = true |
||
) |
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. requireImageRegion
is passed to the parser so that file lines are added only for regions inside the image.
casa::RegionTextList::~RegionTextList | ( | ) |
void casa::RegionTextList::addLine | ( | const AsciiAnnotationFileLine & | line | ) |
add a line to the end of the list
|
inline |
casacore::CountedPtr<const casacore::WCRegion> casa::RegionTextList::getRegion | ( | ) | const |
get the composite region.
AsciiAnnotationFileLine casa::RegionTextList::lineAt | ( | const casacore::uInt | i | ) | const |
get the line at the specified index
casacore::uInt casa::RegionTextList::nLines | ( | ) | const |
number of lines in the list
std::ostream& casa::RegionTextList::print | ( | std::ostream & | os | ) | const |
Referenced by casa::operator<<().
casacore::Record casa::RegionTextList::regionAsRecord | ( | ) | const |
get the composite region as a region record.
|
private |
Definition at line 150 of file RegionTextList.h.
|
mutableprivate |
Definition at line 155 of file RegionTextList.h.
|
private |
Definition at line 148 of file RegionTextList.h.
|
private |
Definition at line 146 of file RegionTextList.h.
Referenced by getLines().
|
mutableprivate |
Definition at line 154 of file RegionTextList.h.
|
private |
Definition at line 147 of file RegionTextList.h.
|
private |
Definition at line 149 of file RegionTextList.h.
|
private |
if false, then the corresponding region is complementary to the result of the previous region operations in the sequence
Definition at line 153 of file RegionTextList.h.