1 #ifndef IMAGEANALYSIS_IMAGETASK_H
2 #define IMAGEANALYSIS_IMAGETASK_H
84 void addHistory(
const std::vector<std::pair<casacore::String, casacore::String> >& msgs)
const;
94 const std::vector<casacore::String>& paramNames,
const std::vector<casac::variant>& paramValues
129 virtual std::vector<OutputDestinationChecker::OutputStruct>
_getOutputStruct();
167 inline const std::shared_ptr<casacore::LogIO>
_getLog()
const {
return _log;}
177 const std::shared_ptr<LogFile>
_getLogFile()
const;
263 mutable std::vector<std::pair<casacore::String, casacore::String> >
_newHistory;
270 #ifndef AIPS_NO_TEMPLATE_SRC
271 #include <imageanalysis/ImageAnalysis/ImageTask.tcc>
Verbosity
Virtual base class for image analysis tasks.
A Vector of integers, for indexing into Array<T> objects.
virtual CasacRegionManager::StokesControl _getStokesControl() const =0
virtual casacore::Bool _hasLogfileSupport() const
by default, derived classes are configured to have no log file support.
casacore::Bool _dropDegen
void _removeExistingFileIfNecessary(const casacore::String &filename, const casacore::Bool overwrite, casacore::Bool warnOnly=false) const
if warnOnly is true, log a warning message if file exists and overwrite is true, else throw an except...
std::unique_ptr< casacore::FiledesIO > _logFileIO
const casacore::String & _getChans() const
void _reportOldNewImageShapes(const ImageInterface< T > &out) const
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
std::vector< std::pair< casacore::String, casacore::String > > _newHistory
std::vector< std::pair< casacore::String, casacore::String > > getHistory()
get the history associated with the task.
void suppressHistoryWriting(casacore::Bool b)
suppress writing the history on _prepareOutputImage() call.
casacore::String _stokesString
const casacore::Record * _getRegion() const
virtual void _construct(casacore::Bool verbose=true)
does the lion's share of constructing the object, ie checks validity of inputs, etc.
casacore::Bool _logfileAppend
virtual casacore::String getClass() const =0
void _removeExistingOutfileIfNecessary() const
ostream-like interface to creating log messages.
void setLogfileAppend(const casacore::Bool a)
void setMask(const casacore::String &mask)
void _doHistory(std::shared_ptr< casacore::ImageInterface< U >> &image) const
virtual std::vector< OutputDestinationChecker::OutputStruct > _getOutputStruct()
casacore::Bool _overwrite
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
virtual casacore::Bool _mustHaveSquareDirectionPixels() const
const std::shared_ptr< LogFile > _getLogFile() const
casacore::Bool _isPVImage() const
Is the attached image a position-velocity (PV) image?
const casacore::String & _getOutname() const
const casacore::String & _getMask() const
void setStretch(const casacore::Bool stretch)
const casacore::String & _getStokes() const
A templated, abstract base class for array-like objects.
A base class for astronomical images.
casacore::Bool _suppressHistory
void _setStokes(const casacore::String &stokes)
virtual casacore::Bool _supportsMultipleRegions() const
void _closeLogfile() const
static void _copyMask(casacore::Lattice< casacore::Bool > &mask, const casacore::ImageInterface< T > &image)
virtual std::vector< casacore::Coordinate::Type > _getNecessaryCoordinates() const =0
Represents the minimum set of coordinates necessary for the task to function.
ImageTask(const SPCIIT image, const casacore::String ®ion, const casacore::Record *const ®ionPtr, const casacore::String &box, const casacore::String &chanInp, const casacore::String &stokes, const casacore::String &maskInp, const casacore::String &outname, casacore::Bool overwrite)
if outname is empty, no image will be written if overwrite is True, if image already exists it will b...
void setLogfile(const casacore::String &lf)
tacitly does nothing if lf is the empty string.
casacore::Bool _getStretch() const
casacore::Bool _getDropDegen() const
casacore::Bool _writeLogfile(const casacore::String &output, const casacore::Bool open=true, const casacore::Bool close=true)
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
virtual casacore::Bool _supportsMultipleBeams() const
does this task support images with multiple beams? false means it never does.
void setRegion(const casacore::Record ®ion)
Verbosity _getVerbosity() const
const casacore::Record *const _regionPtr
casacore::String _summaryHeader() const
casacore::Bool _openLogfile()
template <class T, class U> class vector;
void addHistory(const std::vector< std::pair< casacore::String, casacore::String > > &msgs) const
These messages will appear in the product image history upon the call to _prepareOutputImage().
virtual Origin origin() const =0
ABSTRACT METHODS //.
LogOrigin: The source code location of the originator of a LogMessage.
const SPCIIT _getImage() const
casacore::Record _regionRecord
String: the storage and methods of handling collections of characters.
void setDropDegen(casacore::Bool d)
void setVerbosity(Verbosity verbosity)
std::shared_ptr< casacore::LogIO > _log
std::shared_ptr< LogFile > _logfile
SPIIT _prepareOutputImage(const casacore::ImageInterface< T > &image, const casacore::Array< T > *const values, const casacore::ArrayLattice< casacore::Bool > *const mask=nullptr, const casacore::IPosition *const outShape=nullptr, const casacore::CoordinateSystem *const coordsys=nullptr, const casacore::String *const outname=nullptr, casacore::Bool overwrite=false, casacore::Bool dropDegen=false) const
If outname != NULL, use the value supplied.
A memory resident Lattice.
casacore::Bool _getOverwrite() const
static void _copyData(casacore::Lattice< T > &data, const casacore::Lattice< T > &image)
casacore::String _outname
const std::shared_ptr< casacore::LogIO > _getLog() const
Bool _getSuppressHistory() const
Interconvert pixel and world coordinates.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.