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

#include <ImageCollapser.h>

Inheritance diagram for casa::ImageCollapser:
casa::ImageTask

List of all members.

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

Detailed Description

Definition at line 38 of file ImageCollapser.h.


Member Enumeration Documentation

Top level interface which allows collapsing of images along a single axis. An aggregate method (average, sum, etc) is applied to the collapsed pixels.

Etymology

Collapses image.

Synopsis

High level interface for collapsing an image along a single axis.

Example

            ImageCollapser collapser();
            collapser.collapse();
Enumerator:
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.


Constructor & Destructor Documentation

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

disallow default constructor


Member Function Documentation

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

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.

Implements casa::ImageTask.

Definition at line 123 of file ImageCollapser.h.

References casa::CasacRegionManager::USE_ALL_STOKES.

void casa::ImageCollapser::_invert ( ) [private]

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]

Implements casa::ImageTask.

Definition at line 120 of file ImageCollapser.h.

References _class.

static const map<uInt, String>* casa::ImageCollapser::minMatchMap ( ) [static]

Member Data Documentation

Definition at line 134 of file ImageCollapser.h.

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.

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.


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