casa
$Rev:20696$
|
Class implementing simple data scaling for the WorldCanvas. More...
#include <WCDataScaleHandler.h>
Public Member Functions | |
WCDataScaleHandler () | |
Default Constructor Required. | |
virtual | ~WCDataScaleHandler () |
Destructor (does nothing) | |
WCDataScaleHandler (Double min, Double max) | |
Set min/max at construction time. | |
virtual Bool | operator() (Array< uInt > &out, const Array< Bool > &in) |
op() returns True if the Array in was converted to the Array out successfully. | |
virtual Bool | operator() (Array< uInt > &out, const Array< uChar > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< Char > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< uShort > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< Short > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< uInt > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< Int > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< uLong > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< Long > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< Float > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< Double > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< Complex > &in) |
virtual Bool | operator() (Array< uInt > &out, const Array< DComplex > &in) |
Double | domainMin () const |
set/get the min/max to use for the input Array | |
Double | domainMax () const |
void | setDomainMinMax (Double min, Double max) |
uInt | rangeMax () const |
set/get the maximum value to use for the output array Note: the minimum value is always zero | |
void | setRangeMax (uInt max) |
virtual void | setDefaultOptions () |
install the default options for this DisplayData | |
virtual Bool | setOptions (Record &rec, Record &recOut) |
apply options stored in val to the DisplayData; return value True means a refresh is needed... | |
virtual Record | getOptions () |
retrieve the current and default options and parameter types. | |
Private Attributes | |
Double | domainMin_ |
domain limits to use | |
Double | domainMax_ |
uInt | rangeMax_ |
range limits rangeMin is always zero |
Class implementing simple data scaling for the WorldCanvas.
WCDataScaleHandler : WorldCanvas Data Scale Handler
This class is responsible for scaling data into a range suitable for display.
WCDataScaleHandler defines a set of functions whose purpose is to transform real data values, such as those from raster images or contour lines, into an image whose value ranges from 0 to N-1 for some N, normally taken to be the color resolution available for display.
The Display library defines the following process of image display:
The function suite includes all the normal scalar types. Default implementations exist for
Each scalar implementation must scale the data according to the domain minimum and maximum values and the N-1 value called the rangeMax.
This class would idealy be implemented by a templated member function, but C++ does not yet support templated member functions in non-templated classes. Thus the manual expansion-by-type.
Wanted a way for users to customize the scaling process from real values to discrete values for color display.
Definition at line 109 of file WCDataScaleHandler.h.
Default Constructor Required.
virtual casa::WCDataScaleHandler::~WCDataScaleHandler | ( | ) | [virtual] |
Destructor (does nothing)
casa::WCDataScaleHandler::WCDataScaleHandler | ( | Double | min, |
Double | max | ||
) |
Set min/max at construction time.
Double casa::WCDataScaleHandler::domainMax | ( | ) | const [inline] |
Definition at line 151 of file WCDataScaleHandler.h.
References domainMax_.
Double casa::WCDataScaleHandler::domainMin | ( | ) | const [inline] |
set/get the min/max to use for the input Array
Definition at line 150 of file WCDataScaleHandler.h.
References domainMin_.
virtual Record casa::WCDataScaleHandler::getOptions | ( | ) | [virtual] |
retrieve the current and default options and parameter types.
Reimplemented in casa::WCPowerScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< Bool > & | in | ||
) | [virtual] |
op() returns True if the Array in was converted to the Array out successfully.
Default implentation for Bool maps False to 0 and True to rangeMax
Types uChar to Double not implemented (They return False). User should override the types needed (or perhaps all depending on your compiler.
Default Complex and DComplex extract amplitude and call the Float or Double version.
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< uChar > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< Char > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< uShort > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< Short > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< uInt > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< Int > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< uLong > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< Long > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< Float > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< Double > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< Complex > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
virtual Bool casa::WCDataScaleHandler::operator() | ( | Array< uInt > & | out, |
const Array< DComplex > & | in | ||
) | [virtual] |
Reimplemented in casa::WCPowerScaleHandler, and casa::WCLinearScaleHandler.
uInt casa::WCDataScaleHandler::rangeMax | ( | ) | const [inline] |
set/get the maximum value to use for the output array Note: the minimum value is always zero
Definition at line 158 of file WCDataScaleHandler.h.
References rangeMax_.
virtual void casa::WCDataScaleHandler::setDefaultOptions | ( | ) | [virtual] |
install the default options for this DisplayData
Reimplemented in casa::WCPowerScaleHandler.
void casa::WCDataScaleHandler::setDomainMinMax | ( | Double | min, |
Double | max | ||
) |
virtual Bool casa::WCDataScaleHandler::setOptions | ( | Record & | rec, |
Record & | recOut | ||
) | [virtual] |
apply options stored in val to the DisplayData; return value True means a refresh is needed...
Reimplemented in casa::WCPowerScaleHandler.
void casa::WCDataScaleHandler::setRangeMax | ( | uInt | max | ) | [inline] |
Definition at line 159 of file WCDataScaleHandler.h.
References casa::max(), and rangeMax_.
Double casa::WCDataScaleHandler::domainMax_ [private] |
Definition at line 176 of file WCDataScaleHandler.h.
Referenced by domainMax().
Double casa::WCDataScaleHandler::domainMin_ [private] |
domain limits to use
Definition at line 175 of file WCDataScaleHandler.h.
Referenced by domainMin().
uInt casa::WCDataScaleHandler::rangeMax_ [private] |
range limits rangeMin is always zero
Definition at line 180 of file WCDataScaleHandler.h.
Referenced by rangeMax(), and setRangeMax().