casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes
casa::ImageTask Class Reference

#include <ImageTask.h>

Inheritance diagram for casa::ImageTask:
casa::ImageCollapser casa::ImageFitter casa::ImagePadder casa::ImagePrimaryBeamCorrector casa::ImageProfileFitter casa::ImageStatsCalculator casa::ImageTransposer casa::PeakIntensityFluxDensityConverter casa::PVGenerator

List of all members.

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 &region)
void setMask (const String &mask)
void setVerbosity (Verbosity verbosity)

Protected Member Functions

 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)
 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

Detailed Description

Definition at line 41 of file ImageTask.h.


Member Enumeration Documentation

Virtual base class for image tasking.

Etymology

Image tasking

Synopsis

Virtual base class for image tasking. verbosity levels

Enumerator:
QUIET 
WHISPER 
LOW 
NORMAL 
HIGH 
NOISY 
DEAFENING 

Definition at line 63 of file ImageTask.h.


Constructor & Destructor Documentation

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


Member Function Documentation

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]
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.

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::_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::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.


Member Data Documentation

Definition at line 177 of file ImageTask.h.

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().

Definition at line 179 of file ImageTask.h.

Definition at line 177 of file ImageTask.h.

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.

Definition at line 178 of file ImageTask.h.

Referenced by _hasLogfileSupport(), and _setSupportsLogfile().

Definition at line 177 of file ImageTask.h.

Referenced by _getMask(), and setMask().

Definition at line 177 of file ImageTask.h.

Referenced by _getOutname().

Definition at line 178 of file ImageTask.h.

Definition at line 177 of file ImageTask.h.

const Record* const casa::ImageTask::_regionPtr [private]

Definition at line 175 of file ImageTask.h.

Definition at line 176 of file ImageTask.h.

Referenced by _getRegion().

Definition at line 177 of file ImageTask.h.

Referenced by _getStokes(), and _setStokes().

Definition at line 178 of file ImageTask.h.

Referenced by _getStretch(), and setStretch().

Definition at line 181 of file ImageTask.h.

Referenced by _getVerbosity(), and setVerbosity().


The documentation for this class was generated from the following file: