casa
$Rev:20696$
|
#include <ImageTask.h>
Public Types | |
enum | Verbosity { QUIET, WHISPER, LOW, NORMAL, HIGH, NOISY, DEAFENING } |
Virtual base class for image tasking. More... | |
Public Member Functions | |
virtual | ~ImageTask () |
virtual String | getClass () const =0 |
void | setStretch (const Bool stretch) |
void | setLogfile (const String &lf) |
void | setLogfileAppend (const Bool a) |
void | setRegion (const Record ®ion) |
void | setMask (const String &mask) |
void | setVerbosity (Verbosity verbosity) |
Protected Member Functions | |
ImageTask (const ImageInterface< Float > *const &image, const String ®ion, const Record *const ®ionPtr, const String &box, const String &chanInp, const String &stokes, const String &maskInp, const String &outname, const Bool overwrite) | |
if outname is empty, no image will be written if overwrite is True, if image already exists it will be removed if overwrite is False, if image already exists exception will be thrown | |
virtual CasacRegionManager::StokesControl | _getStokesControl () const =0 |
virtual vector < ImageInputProcessor::OutputStruct > | _getOutputStruct () |
virtual void | _construct (Bool verbose=True) |
does the lion's share of constructing the object, ie checks validity of inputs, etc. | |
const ImageInterface< Float > * | _getImage () const |
const String & | _getMask () const |
const Record * | _getRegion () const |
void | _setStokes (const String &stokes) |
const String & | _getStokes () const |
const String & | _getChans () const |
const String & | _getOutname () const |
virtual vector< Coordinate::Type > | _getNecessaryCoordinates () const =0 |
Represents the minimum set of coordinates necessary for the task to function. | |
void | _removeExistingOutfileIfNecessary () const |
String | _summaryHeader () const |
const std::auto_ptr< LogIO > & | _getLog () const |
void | _setSupportsLogfile (const Bool b) |
Bool | _hasLogfileSupport () const |
Bool | _getStretch () const |
const String & | _getLogfile () const |
Bool | _writeLogfile (const String &output, const Bool open=True, const Bool close=True) |
Bool | _openLogfile () |
void | _closeLogfile () const |
virtual Bool | _supportsMultipleRegions () |
std::auto_ptr< ImageInterface < Float > > | _prepareOutputImage (const ImageInterface< Float > *const subImage, const Array< Float > *const values=0, const ArrayLattice< Bool > *const mask=0, const IPosition *const outShape=0, const CoordinateSystem *const coordsys=0) const |
Create a TempImage or PagedImage depending if _outname is empty or not. | |
Verbosity | _getVerbosity () const |
Static Protected Member Functions | |
static void | _removeExistingFileIfNecessary (const String &filename, const Bool overwrite) |
Private Attributes | |
const ImageInterface< Float > *const | _image |
std::auto_ptr< LogIO > | _log |
const Record *const | _regionPtr |
Record | _regionRecord |
String | _region |
String | _box |
String | _chan |
String | _stokesString |
String | _mask |
String | _outname |
String | _logfile |
Bool | _overwrite |
Bool | _stretch |
Bool | _logfileSupport |
Bool | _logfileAppend |
Int | _logFD |
std::auto_ptr< FiledesIO > | _logFileIO |
Verbosity | _verbosity |
Definition at line 41 of file ImageTask.h.
Virtual base class for image tasking.
Image tasking
Virtual base class for image tasking. verbosity levels
Definition at line 63 of file ImageTask.h.
virtual casa::ImageTask::~ImageTask | ( | ) | [virtual] |
casa::ImageTask::ImageTask | ( | const ImageInterface< Float > *const & | image, |
const String & | region, | ||
const Record *const & | regionPtr, | ||
const String & | box, | ||
const String & | chanInp, | ||
const String & | stokes, | ||
const String & | maskInp, | ||
const String & | outname, | ||
const Bool | overwrite | ||
) | [protected] |
if outname
is empty, no image will be written if overwrite
is True, if image already exists it will be removed if overwrite
is False, if image already exists exception will be thrown
void casa::ImageTask::_closeLogfile | ( | ) | const [protected] |
virtual void casa::ImageTask::_construct | ( | Bool | verbose = True | ) | [protected, virtual] |
does the lion's share of constructing the object, ie checks validity of inputs, etc.
const String& casa::ImageTask::_getChans | ( | ) | const [inline, protected] |
Definition at line 122 of file ImageTask.h.
References _chan.
const ImageInterface<Float>* casa::ImageTask::_getImage | ( | ) | const [inline, protected] |
Definition at line 112 of file ImageTask.h.
References _image.
const std::auto_ptr<LogIO>& casa::ImageTask::_getLog | ( | ) | const [inline, protected] |
Definition at line 138 of file ImageTask.h.
References _log.
const String& casa::ImageTask::_getLogfile | ( | ) | const [protected] |
const String& casa::ImageTask::_getMask | ( | ) | const [inline, protected] |
Definition at line 114 of file ImageTask.h.
References _mask.
virtual vector<Coordinate::Type> casa::ImageTask::_getNecessaryCoordinates | ( | ) | const [protected, pure virtual] |
Represents the minimum set of coordinates necessary for the task to function.
Implemented in casa::ImageFitter, casa::ImageCollapser, casa::PVGenerator, casa::ImagePrimaryBeamCorrector, casa::ImageStatsCalculator, casa::ImageProfileFitter, casa::PeakIntensityFluxDensityConverter, casa::ImagePadder, and casa::ImageTransposer.
const String& casa::ImageTask::_getOutname | ( | ) | const [inline, protected] |
Definition at line 124 of file ImageTask.h.
References _outname.
virtual vector<ImageInputProcessor::OutputStruct> casa::ImageTask::_getOutputStruct | ( | ) | [protected, virtual] |
Reimplemented in casa::ImageStatsCalculator.
const Record* casa::ImageTask::_getRegion | ( | ) | const [inline, protected] |
Definition at line 116 of file ImageTask.h.
References _regionRecord.
const String& casa::ImageTask::_getStokes | ( | ) | const [inline, protected] |
Definition at line 120 of file ImageTask.h.
References _stokesString.
virtual CasacRegionManager::StokesControl casa::ImageTask::_getStokesControl | ( | ) | const [protected, pure virtual] |
Bool casa::ImageTask::_getStretch | ( | ) | const [inline, protected] |
Definition at line 144 of file ImageTask.h.
References _stretch.
Verbosity casa::ImageTask::_getVerbosity | ( | ) | const [inline, protected] |
Definition at line 170 of file ImageTask.h.
References _verbosity.
Bool casa::ImageTask::_hasLogfileSupport | ( | ) | const [inline, protected] |
Definition at line 142 of file ImageTask.h.
References _logfileSupport.
Bool casa::ImageTask::_openLogfile | ( | ) | [protected] |
std::auto_ptr<ImageInterface<Float> > casa::ImageTask::_prepareOutputImage | ( | const ImageInterface< Float > *const | subImage, |
const Array< Float > *const | values = 0 , |
||
const ArrayLattice< Bool > *const | mask = 0 , |
||
const IPosition *const | outShape = 0 , |
||
const CoordinateSystem *const | coordsys = 0 |
||
) | const [protected] |
Create a TempImage or PagedImage depending if _outname is empty or not.
Generally meant for the image to be returned to the UI or the final image product that the user will want. values=0 => the pixel values from the subimage will be used mask=0 => the mask attached to the subimage, if any will be used, outShape=0 => use subImage shape, coordsys=0 => use subImage coordinate system
static void casa::ImageTask::_removeExistingFileIfNecessary | ( | const String & | filename, |
const Bool | overwrite | ||
) | [static, protected] |
void casa::ImageTask::_removeExistingOutfileIfNecessary | ( | ) | const [protected] |
void casa::ImageTask::_setStokes | ( | const String & | stokes | ) | [inline, protected] |
Definition at line 118 of file ImageTask.h.
References _stokesString.
void casa::ImageTask::_setSupportsLogfile | ( | const Bool | b | ) | [inline, protected] |
Definition at line 140 of file ImageTask.h.
References _logfileSupport.
String casa::ImageTask::_summaryHeader | ( | ) | const [protected] |
virtual Bool casa::ImageTask::_supportsMultipleRegions | ( | ) | [inline, protected, virtual] |
Reimplemented in casa::ImageFitter, and casa::ImageStatsCalculator.
Definition at line 157 of file ImageTask.h.
References casa::False.
Bool casa::ImageTask::_writeLogfile | ( | const String & | output, |
const Bool | open = True , |
||
const Bool | close = True |
||
) | [protected] |
virtual String casa::ImageTask::getClass | ( | ) | const [pure virtual] |
void casa::ImageTask::setLogfile | ( | const String & | lf | ) |
void casa::ImageTask::setLogfileAppend | ( | const Bool | a | ) |
void casa::ImageTask::setMask | ( | const String & | mask | ) | [inline] |
Definition at line 85 of file ImageTask.h.
References _mask, and casa::mask().
void casa::ImageTask::setRegion | ( | const Record & | region | ) |
void casa::ImageTask::setStretch | ( | const Bool | stretch | ) | [inline] |
Definition at line 77 of file ImageTask.h.
References _stretch.
void casa::ImageTask::setVerbosity | ( | Verbosity | verbosity | ) | [inline] |
Definition at line 87 of file ImageTask.h.
References _verbosity.
String casa::ImageTask::_box [private] |
Definition at line 177 of file ImageTask.h.
String casa::ImageTask::_chan [private] |
Definition at line 177 of file ImageTask.h.
Referenced by _getChans().
const ImageInterface<Float>* const casa::ImageTask::_image [private] |
Definition at line 173 of file ImageTask.h.
Referenced by _getImage().
std::auto_ptr<LogIO> casa::ImageTask::_log [private] |
Definition at line 174 of file ImageTask.h.
Referenced by _getLog().
Int casa::ImageTask::_logFD [private] |
Definition at line 179 of file ImageTask.h.
String casa::ImageTask::_logfile [private] |
Definition at line 177 of file ImageTask.h.
Bool casa::ImageTask::_logfileAppend [private] |
Reimplemented in casa::ImageProfileFitter.
Definition at line 178 of file ImageTask.h.
std::auto_ptr<FiledesIO> casa::ImageTask::_logFileIO [private] |
Definition at line 180 of file ImageTask.h.
Bool casa::ImageTask::_logfileSupport [private] |
Definition at line 178 of file ImageTask.h.
Referenced by _hasLogfileSupport(), and _setSupportsLogfile().
String casa::ImageTask::_mask [private] |
Definition at line 177 of file ImageTask.h.
Referenced by _getMask(), and setMask().
String casa::ImageTask::_outname [private] |
Definition at line 177 of file ImageTask.h.
Referenced by _getOutname().
Bool casa::ImageTask::_overwrite [private] |
Definition at line 178 of file ImageTask.h.
String casa::ImageTask::_region [private] |
Definition at line 177 of file ImageTask.h.
const Record* const casa::ImageTask::_regionPtr [private] |
Definition at line 175 of file ImageTask.h.
Record casa::ImageTask::_regionRecord [private] |
Definition at line 176 of file ImageTask.h.
Referenced by _getRegion().
String casa::ImageTask::_stokesString [private] |
Definition at line 177 of file ImageTask.h.
Referenced by _getStokes(), and _setStokes().
Bool casa::ImageTask::_stretch [private] |
Definition at line 178 of file ImageTask.h.
Referenced by _getStretch(), and setStretch().
Verbosity casa::ImageTask::_verbosity [private] |
Definition at line 181 of file ImageTask.h.
Referenced by _getVerbosity(), and setVerbosity().