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

Base class for resampling data pixels to World/PixelCanvas pixels. More...

#include <WCResampleHandler.h>

Inheritance diagram for casa::WCResampleHandler:
casa::WCSimpleResampleHandler

Public Member Functions

 WCResampleHandler ()
 (Required) default constructor. More...
 
 WCResampleHandler (const WCResampleHandler &other)
 Copy Constructor (copy semantics) More...
 
WCResampleHandleroperator= (const WCResampleHandler &other)
 Assignment operator (copy semantics) More...
 
virtual ~WCResampleHandler ()
 Destructor. More...
 
virtual void operator() (casacore::Matrix< casacore::Bool > &out, const casacore::Matrix< casacore::Bool > &in)=0
 The output array is presized by the caller to the correct size. More...
 
virtual void operator() (casacore::Matrix< casacore::uChar > &out, const casacore::Matrix< casacore::uChar > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::Char > &out, const casacore::Matrix< casacore::Char > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::uShort > &out, const casacore::Matrix< casacore::uShort > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::Short > &out, const casacore::Matrix< casacore::Short > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::uInt > &out, const casacore::Matrix< casacore::uInt > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::Int > &out, const casacore::Matrix< casacore::Int > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::uLong > &out, const casacore::Matrix< casacore::uLong > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::Long > &out, const casacore::Matrix< casacore::Long > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::Float > &out, const casacore::Matrix< casacore::Float > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::Double > &out, const casacore::Matrix< casacore::Double > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::Complex > &out, const casacore::Matrix< casacore::Complex > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::DComplex > &out, const casacore::Matrix< casacore::DComplex > &in)=0
 
virtual void operator() (casacore::Matrix< casacore::Float > &out, const casacore::Matrix< casacore::Float > &in, const casacore::Vector< casacore::Float > &inblc, const casacore::Vector< casacore::Float > &intrc, const casacore::Float blank=0.0)=0
 These functions resample the input matrix to the output. More...
 
virtual void operator() (casacore::Matrix< casacore::Float > &out, casacore::Matrix< casacore::Bool > &outMask, const casacore::Matrix< casacore::Float > &in, const casacore::Matrix< casacore::Bool > &inMask, const casacore::Vector< casacore::Float > &inblc, const casacore::Vector< casacore::Float > &intrc, const casacore::Float blank=0.0)=0
 
virtual void operator() (casacore::Matrix< casacore::Bool > &out, const casacore::Matrix< casacore::Bool > &in, const casacore::Vector< casacore::Float > &inblc, const casacore::Vector< casacore::Float > &intrc, const casacore::Bool blank=false)=0
 
void setSubregion (const casacore::Vector< casacore::Double > &blc, const casacore::Vector< casacore::Double > &trc)
 These functions manipulate which subregion in "in" gets expanded to "out" Coordinates are the fraction of the image to use, with <0.0, 0.0> representing the bottom-left corner of the first pixel and <1.0, 1.0> representing the top-right corner of the last pixel. More...
 
void getSubregion (casacore::Vector< casacore::Double > &blc, casacore::Vector< casacore::Double > &trc) const
 

Protected Member Functions

const casacore::Vector
< casacore::Double > & 
blc () const
 Get the bottom left corner (range <0-1,0-1>) of the subregion. More...
 
const casacore::Vector
< casacore::Double > & 
trc () const
 Get the top right corner (range <0-1,0-1>) of the subregion. More...
 

Private Attributes

casacore::Vector
< casacore::Double
itsBlc
 Current subregion. More...
 
casacore::Vector
< casacore::Double
itsTrc
 

Detailed Description

Base class for resampling data pixels to World/PixelCanvas pixels.

Prerequisite

Etymology

The name of WCResampleHandler comes from WorldCanvas + Resample + Handler

Synopsis

WCResampleHandler is the tool used to extract a rectangular subregion of an image for purposes of display. This class is abstract and defines the interface the WorldCanvas sees.

When the resample handler fires, it extracts a rectangular subregion of its input matrix and stores it in its output matrix. If the default subregion is the whole image and the output image is the same size as the input image, then the output image is a copy of the input image.

If not, the subregion of the image is resampled to fit the output matrix size.

Motivation

Objectify the concept of resampling to allow programmers to write their own, more complicated versions and register them with the WorldCanvas.

Definition at line 77 of file WCResampleHandler.h.

Constructor & Destructor Documentation

casa::WCResampleHandler::WCResampleHandler ( )

(Required) default constructor.

casa::WCResampleHandler::WCResampleHandler ( const WCResampleHandler other)

Copy Constructor (copy semantics)

virtual casa::WCResampleHandler::~WCResampleHandler ( )
virtual

Destructor.

Member Function Documentation

const casacore::Vector<casacore::Double>& casa::WCResampleHandler::blc ( ) const
inlineprotected

Get the bottom left corner (range <0-1,0-1>) of the subregion.

Definition at line 159 of file WCResampleHandler.h.

References itsBlc.

Referenced by setSubregion().

void casa::WCResampleHandler::getSubregion ( casacore::Vector< casacore::Double > &  blc,
casacore::Vector< casacore::Double > &  trc 
) const
inline

Definition at line 148 of file WCResampleHandler.h.

References itsBlc, and itsTrc.

virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Bool > &  out,
const casacore::Matrix< casacore::Bool > &  in 
)
pure virtual

The output array is presized by the caller to the correct size.

It will be filled using information in the input array combined with other resample-specific information. Here again the interface is type expanded rather than templated because C++ doesn't yet handle templated member functions in a non-templated class.

Implemented in casa::WCSimpleResampleHandler.

virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::uChar > &  out,
const casacore::Matrix< casacore::uChar > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Char > &  out,
const casacore::Matrix< casacore::Char > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::uShort > &  out,
const casacore::Matrix< casacore::uShort > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Short > &  out,
const casacore::Matrix< casacore::Short > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::uInt > &  out,
const casacore::Matrix< casacore::uInt > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Int > &  out,
const casacore::Matrix< casacore::Int > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::uLong > &  out,
const casacore::Matrix< casacore::uLong > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Long > &  out,
const casacore::Matrix< casacore::Long > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Float > &  out,
const casacore::Matrix< casacore::Float > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Double > &  out,
const casacore::Matrix< casacore::Double > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Complex > &  out,
const casacore::Matrix< casacore::Complex > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::DComplex > &  out,
const casacore::Matrix< casacore::DComplex > &  in 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Float > &  out,
const casacore::Matrix< casacore::Float > &  in,
const casacore::Vector< casacore::Float > &  inblc,
const casacore::Vector< casacore::Float > &  intrc,
const casacore::Float  blank = 0.0 
)
pure virtual

These functions resample the input matrix to the output.

inblc is the location 'within' the input matrix for the bottom-left pixel of the output (sim. for intrc); blank is the output value where none of the input data is useful. The output matrix must be presized to the required size.

Implemented in casa::WCSimpleResampleHandler.

virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Float > &  out,
casacore::Matrix< casacore::Bool > &  outMask,
const casacore::Matrix< casacore::Float > &  in,
const casacore::Matrix< casacore::Bool > &  inMask,
const casacore::Vector< casacore::Float > &  inblc,
const casacore::Vector< casacore::Float > &  intrc,
const casacore::Float  blank = 0.0 
)
pure virtual
virtual void casa::WCResampleHandler::operator() ( casacore::Matrix< casacore::Bool > &  out,
const casacore::Matrix< casacore::Bool > &  in,
const casacore::Vector< casacore::Float > &  inblc,
const casacore::Vector< casacore::Float > &  intrc,
const casacore::Bool  blank = false 
)
pure virtual
WCResampleHandler& casa::WCResampleHandler::operator= ( const WCResampleHandler other)

Assignment operator (copy semantics)

void casa::WCResampleHandler::setSubregion ( const casacore::Vector< casacore::Double > &  blc,
const casacore::Vector< casacore::Double > &  trc 
)
inline

These functions manipulate which subregion in "in" gets expanded to "out" Coordinates are the fraction of the image to use, with <0.0, 0.0> representing the bottom-left corner of the first pixel and <1.0, 1.0> representing the top-right corner of the last pixel.

These parameters are interpreted according to the derived class.

Definition at line 143 of file WCResampleHandler.h.

References blc(), itsBlc, itsTrc, and trc().

const casacore::Vector<casacore::Double>& casa::WCResampleHandler::trc ( ) const
inlineprotected

Get the top right corner (range <0-1,0-1>) of the subregion.

Definition at line 164 of file WCResampleHandler.h.

References itsTrc.

Referenced by setSubregion().

Member Data Documentation

casacore::Vector<casacore::Double> casa::WCResampleHandler::itsBlc
private

Current subregion.

Definition at line 171 of file WCResampleHandler.h.

Referenced by blc(), getSubregion(), and setSubregion().

casacore::Vector<casacore::Double> casa::WCResampleHandler::itsTrc
private

Definition at line 172 of file WCResampleHandler.h.

Referenced by getSubregion(), setSubregion(), and trc().


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