Public Types |
enum | StokesControl {
USE_FIRST_STOKES,
USE_ALL_STOKES
} |
Public Member Functions |
| CasacRegionManager () |
| CasacRegionManager (const CoordinateSystem &csys) |
| ~CasacRegionManager () |
Record | fromBCS (String &diagnostics, uInt &nSelectedChannels, String &stokes, const Record *const ®ionPtr, const String ®ionName, const String &chans, const StokesControl stokesControl, const String &box, const IPosition &imShape, const String &imageName="", Bool verbose=True) |
| convert to a record a region specified by a rectangular directional box , chans , and stokes , or althernatively a pointer to a region record.
|
vector< uInt > | setSpectralRanges (uInt &nSelectedChannels, const Record *const regionRec, const IPosition &imShape=IPosition(0)) const |
| Return the range(s) of spectral channels selected by the specification or the region record (Note only one of specification or regionRec may be specified).
|
vector< uInt > | setSpectralRanges (String specification, uInt &nSelectedChannels, const IPosition &imShape=IPosition(0)) const |
Static Public Member Functions |
static vector< uInt > | consolidateAndOrderRanges (uInt &nSelected, const vector< uInt > &ranges) |
| ranges are pairs describing the pixel range over which to select.
|
static Record | regionFromString (const CoordinateSystem &csys, const String ®ionStr, const String &imageName, const IPosition &imShape) |
Static Public Attributes |
static const String | ALL |
Private Member Functions |
String | _pairsToString (const vector< uInt > &pairs) const |
vector< uInt > | _setPolarizationRanges (String &specification, const String &firstStokes, const uInt nStokes, const StokesControl stokesControl) const |
vector< Double > | _setBoxCorners (const String &box) const |
ImageRegion | _fromBCS (String &diagnostics, uInt &nSelectedChannels, String &stokes, const String &chans, const StokesControl stokesControl, const String &box, const IPosition &imShape) const |
ImageRegion | _fromBCS (String &diagnostics, const vector< Double > &boxCorners, const vector< uInt > &chanEndPts, const vector< uInt > &polEndPts, const IPosition imShape) const |
String | _stokesFromRecord (const Record ®ion, const StokesControl stokesControl, const IPosition &shape) const |
void | _setRegion (Record ®ionRecord, String &diagnostics, const String ®ionName, const IPosition &imShape, const String &imageName) |
vector< uInt > | _spectralRangesFromTraditionalFormat (uInt &nSelectedChannels, const String &specification, const uInt nChannels) const |
vector< uInt > | _spectralRangeFromRangeFormat (uInt &nSelectedChannels, const String &specification, const IPosition &imShape) const |
vector< uInt > | _spectralRangeFromRegionRecord (uInt &nSelectedChannels, const Record *const regionRec, const IPosition &imShape) const |
Bool | _supports2DBox (Bool except) const |
| does the image support the setting of a two dimensional box(es).
|
vector< uInt > | _initSpectralRanges (uInt &nSelectedChannels, const IPosition &imShape) const |
Static Private Member Functions |
static void | _setRegion (Record ®ionRecord, String &diagnostics, const Record *regionPtr) |
image component class
This is a casa based class to provide the funtionality to the RegionManager Tool
- Author:
- Version:
Definition at line 44 of file CasacRegionManager.h.
Record casa::CasacRegionManager::fromBCS |
( |
String & |
diagnostics, |
|
|
uInt & |
nSelectedChannels, |
|
|
String & |
stokes, |
|
|
const Record *const & |
regionPtr, |
|
|
const String & |
regionName, |
|
|
const String & |
chans, |
|
|
const StokesControl |
stokesControl, |
|
|
const String & |
box, |
|
|
const IPosition & |
imShape, |
|
|
const String & |
imageName = "" , |
|
|
Bool |
verbose = True |
|
) |
| |
convert to a record a region specified by a rectangular directional box
, chans
, and stokes
, or althernatively a pointer to a region record.
If box, chans, or stokes is not blank, regionPtr
should be null. Processing happens in the following order:
- if
box
is not empty it, along with chans
and stokes
if specified, are used to determine the returned record. In this case stokes
is not altered.
- else if
regionPtr
is not null, it is used to determine the returned Record. In this case, stokes may be modified to reflect the stokes parameters included in the corresponding region.
- else if
regionName
is not empty, the region file of the same is read and used to create the record, or if regionName
is of the form "imagename:regionname" the region record is read from the corresponding iamge. In this case, stokes may be modified to reflect the stokes parameters included in the corresponding region.
- else
chans
and stokes
are used to determine the region Record, or if not given, the whole imShape
is used. box
is specified in comma seperated quadruplets representing blc and trc pixel locations, eg "100, 110, 200, 205". stokes
is specified as the concatentation of stokes parameters, eg "IQUV". chans
is specified in ways supported by CASA, eg "1~10" for channels 1 through 10.