casa
$Rev:20696$
|
#include <SpectralCollapser.h>
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 |
Definition at line 39 of file SpectralCollapser.h.
Definition at line 72 of file SpectralCollapser.h.
Class to collapse an image along the spectral axis.
Collapses an image along the spectral axis
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
Definition at line 64 of file SpectralCollapser.h.
casa::SpectralCollapser::SpectralCollapser | ( | ImageInterface< Float > * | image | ) |
Constructor.
casa::SpectralCollapser::SpectralCollapser | ( | ImageInterface< Float > * | image, |
const String | storePath | ||
) |
Constructor.
virtual casa::SpectralCollapser::~SpectralCollapser | ( | ) | [virtual] |
Destructor.
casa::SpectralCollapser::SpectralCollapser | ( | ) | [private] |
Disallow default constructor.
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.
void casa::SpectralCollapser::collapseTypeToVector | ( | const SpectralCollapser::CollapseType & | collType, |
Vector< Int > & | momentVec | ||
) |
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.
String casa::SpectralCollapser::summaryHeader | ( | ) | const |
String casa::SpectralCollapser::_all [private] |
Definition at line 121 of file SpectralCollapser.h.
Bool casa::SpectralCollapser::_hasQualAxis [private] |
Definition at line 123 of file SpectralCollapser.h.
ImageInterface<Float>* casa::SpectralCollapser::_image [private] |
Definition at line 117 of file SpectralCollapser.h.
LogIO* casa::SpectralCollapser::_log [private] |
Definition at line 118 of file SpectralCollapser.h.
IPosition casa::SpectralCollapser::_specAxis [private] |
Definition at line 122 of file SpectralCollapser.h.
String casa::SpectralCollapser::_storePath [private] |
Definition at line 120 of file SpectralCollapser.h.