casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
casa::WCPowerScaleHandler Class Reference

Linear, logarithmic and exponential scaling of data for the WorldCanvas. More...

#include <WCPowerScaleHandler.h>

Inheritance diagram for casa::WCPowerScaleHandler:
casa::WCDataScaleHandler casa::DisplayOptions

Public Member Functions

 WCPowerScaleHandler ()
 Default Constructor Required. More...
 
virtual ~WCPowerScaleHandler ()
 Destructor. More...
 
void setCycles (casacore::Float cyc)
 set/get the number of log cycles into which to compress the data More...
 
casacore::Float cycles ()
 
virtual void setDefaultOptions ()
 install the default options for this DisplayData More...
 
virtual casacore::Bool setOptions (casacore::Record &rec, casacore::Record &recOut)
 apply options stored in val to the DisplayData; return value true means a refresh is needed... More...
 
virtual casacore::Record getOptions (bool scrub=false) const
 retrieve the current and default options and parameter types. More...
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::Bool > &in)
 apply returns true if the array in was converted to the array out successfully the last parameter sets the output range More...
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::uChar > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::Char > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::uShort > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::Short > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::uInt > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::Int > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::uLong > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::Long > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::Float > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::Double > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::Complex > &in)
 
virtual casacore::Bool operator() (casacore::Array< casacore::uInt > &out, const casacore::Array< casacore::DComplex > &in)
 
casacore::Bool histoEqualise (casacore::Array< casacore::Float > &out, const casacore::Array< casacore::Float > &in)
 
- Public Member Functions inherited from casa::WCDataScaleHandler
 WCDataScaleHandler ()
 Default Constructor Required. More...
 
virtual ~WCDataScaleHandler ()
 Destructor (does nothing) More...
 
 WCDataScaleHandler (casacore::Double min, casacore::Double max)
 Set min/max at construction time. More...
 
casacore::Double domainMin () const
 set/get the min/max to use for the input Array More...
 
casacore::Double domainMax () const
 
void setDomainMinMax (casacore::Double min, casacore::Double max)
 
casacore::uInt rangeMax () const
 set/get the maximum value to use for the output array Note: the minimum value is always zero More...
 
void setRangeMax (casacore::uInt max)
 
- Public Member Functions inherited from casa::DisplayOptions
 DisplayOptions ()
 Constructor. More...
 
virtual ~DisplayOptions ()
 Destructor. More...
 
template<class T >
casacore::Bool readOptionRecord (casacore::Vector< T > &target, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const
 Find the field fieldname in casacore::Record rec, containing the requested type (casacore::Bool, casacore::String, casacore::Float, casacore::Int) in itself or its "value" sub-field, and return the value in target. More...
 
template<class T >
casacore::Bool readOptionRecord (T &target, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const
 
virtual casacore::Bool readOptionRecord (casacore::String &target, casacore::Bool &unsetTarget, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const
 Find the field fieldname in casacore::Record rec, containing the requested type (casacore::String) in itself or its "value" sub-field, and return the value in target. More...
 
casacore::Record unset () const
 Return a casacore::Record which is an "unset" casacore::Record, ie. More...
 
casacore::Bool isUnset (const casacore::Record &rec) const
 Return true or false indicating if the provided casacore::Record is equal to an "unset" Record. More...
 

Static Public Attributes

static const casacore::String POWER_CYCLES
 

Private Attributes

casacore::Float itsOptionsPowerCycles
 Scaling power cycles: < 0 => log scaling, > 0 => exp scaling, == 0 => linear scaling. More...
 
casacore::Bool itsOptionsHistoEqualisation
 Is histogram equalisation required? More...
 

Additional Inherited Members

- Protected Member Functions inherited from casa::DisplayOptions
 DisplayOptions (const DisplayOptions &other)
 (Required) copy constructor. More...
 
void operator= (const DisplayOptions &other)
 (Required) copy assignment. More...
 

Detailed Description

Linear, logarithmic and exponential scaling of data for the WorldCanvas.

Prerequisite

Etymology

WCPowerScaleHandler : WorldCanvas Power Scale Handler

Synopsis

The WCPowerScaleHandler is an implementation of the WCDataScaleHandler that uses linear, logarithmic or exponential scaling to transform (probably non-discrete) input data into discrete output values in the range 0 to a settable maximum. Typically, this maximum would be set to the available number of colorcells minus one, for indexed raster drawing, or to a large integer (say 1000000) for use in color cube raster drawing. In the latter case, the output is then divided by the chosen large number in order to provide values in the range 0 to 1.

Motivation

This class is motivated by the need to provide the most common data scaling requirements to the user.

Example

...

To Do

Definition at line 76 of file WCPowerScaleHandler.h.

Constructor & Destructor Documentation

casa::WCPowerScaleHandler::WCPowerScaleHandler ( )

Default Constructor Required.

virtual casa::WCPowerScaleHandler::~WCPowerScaleHandler ( )
virtual

Destructor.

Member Function Documentation

casacore::Float casa::WCPowerScaleHandler::cycles ( )
inline

Definition at line 91 of file WCPowerScaleHandler.h.

References itsOptionsPowerCycles.

virtual casacore::Record casa::WCPowerScaleHandler::getOptions ( bool  scrub = false) const
virtual

retrieve the current and default options and parameter types.

Reimplemented from casa::WCDataScaleHandler.

casacore::Bool casa::WCPowerScaleHandler::histoEqualise ( casacore::Array< casacore::Float > &  out,
const casacore::Array< casacore::Float > &  in 
)
virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::Bool > &  in 
)
virtual

apply returns true if the array in was converted to the array out successfully the last parameter sets the output range

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::uChar > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::Char > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::uShort > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::Short > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::uInt > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::Int > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::uLong > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::Long > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::Float > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::Double > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::Complex > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::operator() ( casacore::Array< casacore::uInt > &  out,
const casacore::Array< casacore::DComplex > &  in 
)
virtual

Reimplemented from casa::WCDataScaleHandler.

void casa::WCPowerScaleHandler::setCycles ( casacore::Float  cyc)
inline

set/get the number of log cycles into which to compress the data

Definition at line 88 of file WCPowerScaleHandler.h.

References itsOptionsPowerCycles.

virtual void casa::WCPowerScaleHandler::setDefaultOptions ( )
virtual

install the default options for this DisplayData

Reimplemented from casa::WCDataScaleHandler.

virtual casacore::Bool casa::WCPowerScaleHandler::setOptions ( casacore::Record rec,
casacore::Record recOut 
)
virtual

apply options stored in val to the DisplayData; return value true means a refresh is needed...

Reimplemented from casa::WCDataScaleHandler.

Member Data Documentation

casacore::Bool casa::WCPowerScaleHandler::itsOptionsHistoEqualisation
private

Is histogram equalisation required?

Definition at line 133 of file WCPowerScaleHandler.h.

casacore::Float casa::WCPowerScaleHandler::itsOptionsPowerCycles
private

Scaling power cycles: < 0 => log scaling, > 0 => exp scaling, == 0 => linear scaling.

Definition at line 130 of file WCPowerScaleHandler.h.

Referenced by cycles(), and setCycles().

const casacore::String casa::WCPowerScaleHandler::POWER_CYCLES
static

Definition at line 125 of file WCPowerScaleHandler.h.


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