casa::CasacRegionManager Class Reference

image component class More...

#include <CasacRegionManager.h>

List of all members.

Public Types

enum  StokesControl {
  USE_FIRST_STOKES,
  USE_ALL_STOKES
}

Public Member Functions

 CasacRegionManager ()
 CasacRegionManager (const CoordinateSystem &csys)
 CasacRegionManager (const CasacRegionManager &)
 ~CasacRegionManager ()
CasacRegionManageroperator= (const CasacRegionManager &)
Record 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.
ImageRegion fromBCS (String &diagnostics, uInt &nSelectedChannels, String &stokes, const String &chans, const StokesControl stokesControl, const String &box, const IPosition &imShape) const
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 Record regionFromString (const CoordinateSystem &csys, const String &regionStr, const String &imageName, const IPosition &imShape)

Static Public Attributes

static const String ALL

Private Member Functions

String _pairsToString (const vector< uInt > &pairs) const
 disallow copy constructor and = operator
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, const vector< Double > &boxCorners, const vector< uInt > &chanEndPts, const vector< uInt > &polEndPts, const IPosition imShape) const
String _stokesFromRecord (const Record &region, const StokesControl stokesControl, const IPosition &shape) const
void _setRegion (Record &regionRecord, String &diagnostics, const String &regionName, const IPosition &imShape, const String &imageName, const String &prependBox, const String &globalOverrideChans, const String &globalStokesOverride)
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 &regionRecord, String &diagnostics, const Record *regionPtr)

Detailed Description

image component class

This is a casa based class to provide the funtionality to the RegionManager Tool

Author:
Version:

Definition at line 46 of file CasacRegionManager.h.


Member Enumeration Documentation

Enumerator:
USE_FIRST_STOKES 
USE_ALL_STOKES 

Definition at line 51 of file CasacRegionManager.h.


Constructor & Destructor Documentation

casa::CasacRegionManager::CasacRegionManager (  ) 
casa::CasacRegionManager::CasacRegionManager ( const CoordinateSystem &  csys  ) 
casa::CasacRegionManager::CasacRegionManager ( const CasacRegionManager  ) 
casa::CasacRegionManager::~CasacRegionManager (  ) 

Member Function Documentation

ImageRegion casa::CasacRegionManager::_fromBCS ( String &  diagnostics,
const vector< Double > &  boxCorners,
const vector< uInt > &  chanEndPts,
const vector< uInt > &  polEndPts,
const IPosition  imShape 
) const [private]
vector<uInt> casa::CasacRegionManager::_initSpectralRanges ( uInt &  nSelectedChannels,
const IPosition &  imShape 
) const [private]
String casa::CasacRegionManager::_pairsToString ( const vector< uInt > &  pairs  )  const [private]

disallow copy constructor and = operator

CasacRegionManager(const CasacRegionManager&) : RegionManager() {}

vector<Double> casa::CasacRegionManager::_setBoxCorners ( const String &  box  )  const [private]
vector<uInt> casa::CasacRegionManager::_setPolarizationRanges ( String &  specification,
const String &  firstStokes,
const uInt  nStokes,
const StokesControl  stokesControl 
) const [private]
void casa::CasacRegionManager::_setRegion ( Record &  regionRecord,
String &  diagnostics,
const String &  regionName,
const IPosition &  imShape,
const String &  imageName,
const String &  prependBox,
const String &  globalOverrideChans,
const String &  globalStokesOverride 
) [private]
static void casa::CasacRegionManager::_setRegion ( Record &  regionRecord,
String &  diagnostics,
const Record *  regionPtr 
) [static, private]
vector<uInt> casa::CasacRegionManager::_spectralRangeFromRangeFormat ( uInt &  nSelectedChannels,
const String &  specification,
const IPosition &  imShape 
) const [private]
vector<uInt> casa::CasacRegionManager::_spectralRangeFromRegionRecord ( uInt &  nSelectedChannels,
const Record *const   regionRec,
const IPosition &  imShape 
) const [private]
String casa::CasacRegionManager::_stokesFromRecord ( const Record &  region,
const StokesControl  stokesControl,
const IPosition &  shape 
) const [private]
Bool casa::CasacRegionManager::_supports2DBox ( Bool  except  )  const [private]

does the image support the setting of a two dimensional box(es).

If except is True, an exception will be thrown if this image does not support it. If not, False is returned in that case.

ImageRegion casa::CasacRegionManager::fromBCS ( String &  diagnostics,
uInt &  nSelectedChannels,
String &  stokes,
const String &  chans,
const StokesControl  stokesControl,
const String &  box,
const IPosition &  imShape 
) const
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: 1. 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. 2. 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. 3. 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. 4. 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.

CasacRegionManager& casa::CasacRegionManager::operator= ( const CasacRegionManager  ) 
static Record casa::CasacRegionManager::regionFromString ( const CoordinateSystem &  csys,
const String &  regionStr,
const String &  imageName,
const IPosition &  imShape 
) [static]
vector<uInt> casa::CasacRegionManager::setSpectralRanges ( String  specification,
uInt &  nSelectedChannels,
const IPosition &  imShape = IPosition(0) 
) const
vector<uInt> casa::CasacRegionManager::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).

imShape is not used if specification is in the "new" format (ie contains "range").


Member Data Documentation

const String casa::CasacRegionManager::ALL [static]

Definition at line 49 of file CasacRegionManager.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1