casa
$Rev:20696$
|
#include <ImageCollapser.h>
Public Types | |
enum | AggregateType { MAX, MEAN, MEDIAN, MIN, RMS, STDDEV, SUM, VARIANCE, ZERO, UNKNOWN } |
Top level interface which allows collapsing of images along a single axis. An aggregate method (average, sum, etc) is applied to the collapsed pixels. More... | |
Public Member Functions | |
ImageCollapser (String aggString, const ImageInterface< Float > *const image, const String ®ion, const Record *const regionRec, const String &box, const String &chanInp, const String &stokes, const String &maskInp, const IPosition &axes, 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 | |
ImageCollapser (const ImageInterface< Float > *const image, const IPosition &axes, const Bool invertAxesSelection, const AggregateType aggregateType, const String &outname, const Bool overwrite) | |
~ImageCollapser () | |
destructor | |
ImageInterface< Float > * | collapse (const Bool wantReturn) const |
perform the collapse. | |
String | getClass () const |
Static Public Member Functions | |
static ImageCollapser::AggregateType | aggregateType (String &aggString) |
static const map< uInt, String > * | funcNameMap () |
static const map< uInt, String > * | minMatchMap () |
Static Public Attributes | |
static const map< uInt, Float(*)(const Array< Float > &)> * | funcMap () |
Protected Member Functions | |
CasacRegionManager::StokesControl | _getStokesControl () const |
vector< Coordinate::Type > | _getNecessaryCoordinates () const |
Represents the minimum set of coordinates necessary for the task to function. | |
Private Member Functions | |
ImageCollapser () | |
disallow default constructor | |
void | _invert () |
void | _finishConstruction () |
std::vector<ImageInputProcessor::OutputStruct> _getOutputStruct(); | |
void | _doMedian (const SubImage< Float > &subImage, const std::auto_ptr< ImageInterface< Float > > &outImage) const |
necessary to improve performance | |
void | _attachOutputMask (const std::auto_ptr< ImageInterface< Float > > &outImage, const Array< Bool > &outMask) const |
Private Attributes | |
Bool | _invertAxesSelection |
IPosition | _axes |
AggregateType | _aggType |
Static Private Attributes | |
static const String | _class |
static map< uInt, Float(*)(const Array< Float > &)> | _funcMap |
static map< uInt, String > * | _funcNameMap |
static map< uInt, String > * | _minMatchMap |
static const map< uInt, Float(*)(const Array< Float > &)> & | _getFuncMap () |
Definition at line 38 of file ImageCollapser.h.
Top level interface which allows collapsing of images along a single axis. An aggregate method (average, sum, etc) is applied to the collapsed pixels.
Collapses image.
High level interface for collapsing an image along a single axis.
ImageCollapser collapser(); collapser.collapse();
MAX |
AVDEV,. |
MEAN | |
MEDIAN | |
MIN | |
RMS | |
STDDEV | |
SUM | |
VARIANCE | |
ZERO |
set all pixels in output image to 0 |
UNKNOWN |
Definition at line 67 of file ImageCollapser.h.
casa::ImageCollapser::ImageCollapser | ( | String | aggString, |
const ImageInterface< Float > *const | image, | ||
const String & | region, | ||
const Record *const | regionRec, | ||
const String & | box, | ||
const String & | chanInp, | ||
const String & | stokes, | ||
const String & | maskInp, | ||
const IPosition & | axes, | ||
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
casa::ImageCollapser::ImageCollapser | ( | const ImageInterface< Float > *const | image, |
const IPosition & | axes, | ||
const Bool | invertAxesSelection, | ||
const AggregateType | aggregateType, | ||
const String & | outname, | ||
const Bool | overwrite | ||
) |
destructor
casa::ImageCollapser::ImageCollapser | ( | ) | [private] |
disallow default constructor
void casa::ImageCollapser::_attachOutputMask | ( | const std::auto_ptr< ImageInterface< Float > > & | outImage, |
const Array< Bool > & | outMask | ||
) | const [private] |
void casa::ImageCollapser::_doMedian | ( | const SubImage< Float > & | subImage, |
const std::auto_ptr< ImageInterface< Float > > & | outImage | ||
) | const [private] |
necessary to improve performance
void casa::ImageCollapser::_finishConstruction | ( | ) | [private] |
std::vector<ImageInputProcessor::OutputStruct> _getOutputStruct();
vector<Coordinate::Type> casa::ImageCollapser::_getNecessaryCoordinates | ( | ) | const [inline, protected, virtual] |
Represents the minimum set of coordinates necessary for the task to function.
Implements casa::ImageTask.
Definition at line 127 of file ImageCollapser.h.
CasacRegionManager::StokesControl casa::ImageCollapser::_getStokesControl | ( | ) | const [inline, protected, virtual] |
Implements casa::ImageTask.
Definition at line 123 of file ImageCollapser.h.
References casa::CasacRegionManager::USE_ALL_STOKES.
void casa::ImageCollapser::_invert | ( | ) | [private] |
static ImageCollapser::AggregateType casa::ImageCollapser::aggregateType | ( | String & | aggString | ) | [static] |
ImageInterface<Float>* casa::ImageCollapser::collapse | ( | const Bool | wantReturn | ) | const |
perform the collapse.
If wantReturn
is True, return a pointer to the collapsed image. The returned pointer is created via new(); it is the caller's responsibility to delete the returned pointer. If wantReturn
is False, a NULL pointer is returned and pointer deletion is performed internally.
static const map<uInt, String>* casa::ImageCollapser::funcNameMap | ( | ) | [static] |
String casa::ImageCollapser::getClass | ( | ) | const [inline, virtual] |
static const map<uInt, String>* casa::ImageCollapser::minMatchMap | ( | ) | [static] |
AggregateType casa::ImageCollapser::_aggType [private] |
Definition at line 134 of file ImageCollapser.h.
IPosition casa::ImageCollapser::_axes [private] |
Definition at line 133 of file ImageCollapser.h.
const String casa::ImageCollapser::_class [static, private] |
Definition at line 135 of file ImageCollapser.h.
Referenced by getClass().
map<uInt, Float (*)(const Array<Float>&)> casa::ImageCollapser::_funcMap [static, private] |
Definition at line 137 of file ImageCollapser.h.
map<uInt, String>* casa::ImageCollapser::_funcNameMap [static, private] |
Definition at line 138 of file ImageCollapser.h.
const map<uInt, Float (*)(const Array<Float>&)>& casa::ImageCollapser::_getFuncMap() [static, private] |
Definition at line 160 of file ImageCollapser.h.
Definition at line 132 of file ImageCollapser.h.
map<uInt, String> * casa::ImageCollapser::_minMatchMap [static, private] |
Definition at line 138 of file ImageCollapser.h.
const map<uInt, Float (*)(const Array<Float>&)>* casa::ImageCollapser::funcMap() [static] |
Definition at line 116 of file ImageCollapser.h.