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

#include <SpectralCollapser.h>

List of all members.

Public Types

enum  CollapseType {
  PMEAN,
  PMEDIAN,
  PSUM,
  CUNKNOWN
}
 Class to collapse an image along the spectral axis. More...
enum  CollapseError {
  PNOERROR,
  PERMSE,
  PPROPAG,
  EUNKNOWN
}

Public Member Functions

 SpectralCollapser (ImageInterface< Float > *image)
 Constructor.
 SpectralCollapser (ImageInterface< Float > *image, const String storePath)
 Constructor.
virtual ~SpectralCollapser ()
 Destructor.
virtual Bool collapse (const Vector< Float > &specVals, const Float startVal, const Float endVal, const String &unit, const SpectralCollapser::CollapseType &collType, const SpectralCollapser::CollapseError &collError, String &outname, String &msg)
 Parameters: specVals - the vector of spectral values startVal - the spectral value to start the collapse endVal - the spectral value to end the collapse unit - the unit of the spectral values collType - the collapse type (e.g.
String summaryHeader () const
void collapseTypeToVector (const SpectralCollapser::CollapseType &collType, Vector< Int > &momentVec)

Static Public Member Functions

static void stringToCollapseType (const String &text, SpectralCollapser::CollapseType &collType)
 Convert from string to collapse type.
static void stringToCollapseError (const String &text, SpectralCollapser::CollapseError &collError)
 Convert from string to error type.
static void collapseTypeToString (const SpectralCollapser::CollapseType &collType, String &strCollType)
 Convert from collapse type to string.
static void collapseErrorToString (const SpectralCollapser::CollapseError &collError, String &strCollError)
 Convert from error type to string.

Private Member Functions

 SpectralCollapser ()
 Disallow default constructor.
void _setUp ()
Bool _cleanTmpData (const String &tmpFileName) const
Bool _cleanTmpData (const String &tmpData, const String &tmpError) const
Bool _getQualitySubImg (const ImageInterface< Float > *image, const Bool &data, SubImage< Float > &qualitySub)
Bool _getQualitySubImgs (ImageInterface< Float > *image, SubImage< Float > &subData, SubImage< Float > &subError) const
Bool _getOutputName (const String &wcsInp, String &outImg, String &outImgData, String &outImgError) const
Bool _collapse (const ImageInterface< Float > *image, const String &aggString, const String &chanInp, const String &outname) const
Bool _moments (const ImageInterface< Float > *image, const Vector< Int > &momentVec, const Int &startIndex, const Int &endIndex, const String &outname)
Bool _mergeDataError (const String &outImg, const String &dataImg, const String &errorImg, const Float &normError=1.0) const
void _addMiscInfo (const String &outName, const String &wcsInput, const String &chanInput, const SpectralCollapser::CollapseType &collType, const SpectralCollapser::CollapseError &collError) const
void _collTypeToImCollString (const SpectralCollapser::CollapseType &collType, String &colType) const
void _collErrorToImCollString (const SpectralCollapser::CollapseError &collError, String &colError) const

Private Attributes

ImageInterface< Float > * _image
LogIO_log
String _storePath
String _all
IPosition _specAxis
Bool _hasQualAxis

Detailed Description

Definition at line 39 of file SpectralCollapser.h.


Member Enumeration Documentation

Enumerator:
PNOERROR 
PERMSE 
PPROPAG 
EUNKNOWN 

Definition at line 72 of file SpectralCollapser.h.

Class to collapse an image along the spectral axis.

Prerequisite

Etymology

Collapses an image along the spectral axis

Synopsis

Helper class to collapse an image along the spectral axis. The spectral range to combine is provided interactively from the profiler. The class transforms the range to the channels to be combined. The actual image\ combination is then done with the class "ImageCollapser". The different collapse types

Enumerator:
PMEAN 
PMEDIAN 
PSUM 
CUNKNOWN 

PVRMSE,.

Definition at line 64 of file SpectralCollapser.h.


Constructor & Destructor Documentation

Constructor.

Constructor.

Destructor.

Disallow default constructor.


Member Function Documentation

void casa::SpectralCollapser::_addMiscInfo ( const String outName,
const String wcsInput,
const String chanInput,
const SpectralCollapser::CollapseType collType,
const SpectralCollapser::CollapseError collError 
) const [private]
Bool casa::SpectralCollapser::_cleanTmpData ( const String tmpFileName) const [private]
Bool casa::SpectralCollapser::_cleanTmpData ( const String tmpData,
const String tmpError 
) const [private]
Bool casa::SpectralCollapser::_collapse ( const ImageInterface< Float > *  image,
const String aggString,
const String chanInp,
const String outname 
) const [private]
void casa::SpectralCollapser::_collErrorToImCollString ( const SpectralCollapser::CollapseError collError,
String colError 
) const [private]
void casa::SpectralCollapser::_collTypeToImCollString ( const SpectralCollapser::CollapseType collType,
String colType 
) const [private]
Bool casa::SpectralCollapser::_getOutputName ( const String wcsInp,
String outImg,
String outImgData,
String outImgError 
) const [private]
Bool casa::SpectralCollapser::_getQualitySubImg ( const ImageInterface< Float > *  image,
const Bool data,
SubImage< Float > &  qualitySub 
) [private]
Bool casa::SpectralCollapser::_getQualitySubImgs ( ImageInterface< Float > *  image,
SubImage< Float > &  subData,
SubImage< Float > &  subError 
) const [private]
Bool casa::SpectralCollapser::_mergeDataError ( const String outImg,
const String dataImg,
const String errorImg,
const Float normError = 1.0 
) const [private]
Bool casa::SpectralCollapser::_moments ( const ImageInterface< Float > *  image,
const Vector< Int > &  momentVec,
const Int startIndex,
const Int endIndex,
const String outname 
) [private]
void casa::SpectralCollapser::_setUp ( ) [private]
virtual Bool casa::SpectralCollapser::collapse ( const Vector< Float > &  specVals,
const Float  startVal,
const Float  endVal,
const String unit,
const SpectralCollapser::CollapseType collType,
const SpectralCollapser::CollapseError collError,
String outname,
String msg 
) [virtual]

Parameters: specVals - the vector of spectral values startVal - the spectral value to start the collapse endVal - the spectral value to end the collapse unit - the unit of the spectral values collType - the collapse type (e.g.

"mean" or "median") collError - information on what the error outname - name of the collapsed image (output) msg - message string (output)

static void casa::SpectralCollapser::collapseErrorToString ( const SpectralCollapser::CollapseError collError,
String strCollError 
) [static]

Convert from error type to string.

static void casa::SpectralCollapser::collapseTypeToString ( const SpectralCollapser::CollapseType collType,
String strCollType 
) [static]

Convert from collapse type to string.

static void casa::SpectralCollapser::stringToCollapseError ( const String text,
SpectralCollapser::CollapseError collError 
) [static]

Convert from string to error type.

static void casa::SpectralCollapser::stringToCollapseType ( const String text,
SpectralCollapser::CollapseType collType 
) [static]

Convert from string to collapse type.


Member Data Documentation

Definition at line 121 of file SpectralCollapser.h.

Definition at line 123 of file SpectralCollapser.h.

Definition at line 117 of file SpectralCollapser.h.

Definition at line 118 of file SpectralCollapser.h.

Definition at line 122 of file SpectralCollapser.h.

Definition at line 120 of file SpectralCollapser.h.


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