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

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

#include <WCResampleHandler.h>

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

List of all members.

Public Member Functions

 WCResampleHandler ()
 (Required) default constructor.
 WCResampleHandler (const WCResampleHandler &other)
 Copy Constructor (copy semantics)
WCResampleHandleroperator= (const WCResampleHandler &other)
 Assignment operator (copy semantics)
virtual ~WCResampleHandler ()
 Destructor.
virtual void operator() (Matrix< Bool > &out, const Matrix< Bool > &in)=0
 The output array is presized by the caller to the correct size.
virtual void operator() (Matrix< uChar > &out, const Matrix< uChar > &in)=0
virtual void operator() (Matrix< Char > &out, const Matrix< Char > &in)=0
virtual void operator() (Matrix< uShort > &out, const Matrix< uShort > &in)=0
virtual void operator() (Matrix< Short > &out, const Matrix< Short > &in)=0
virtual void operator() (Matrix< uInt > &out, const Matrix< uInt > &in)=0
virtual void operator() (Matrix< Int > &out, const Matrix< Int > &in)=0
virtual void operator() (Matrix< uLong > &out, const Matrix< uLong > &in)=0
virtual void operator() (Matrix< Long > &out, const Matrix< Long > &in)=0
virtual void operator() (Matrix< Float > &out, const Matrix< Float > &in)=0
virtual void operator() (Matrix< Double > &out, const Matrix< Double > &in)=0
virtual void operator() (Matrix< Complex > &out, const Matrix< Complex > &in)=0
virtual void operator() (Matrix< DComplex > &out, const Matrix< DComplex > &in)=0
virtual void operator() (Matrix< Float > &out, const Matrix< Float > &in, const Vector< Float > &inblc, const Vector< Float > &intrc, const Float blank=0.0)=0
 These functions resample the input matrix to the output.
virtual void operator() (Matrix< Float > &out, Matrix< Bool > &outMask, const Matrix< Float > &in, const Matrix< Bool > &inMask, const Vector< Float > &inblc, const Vector< Float > &intrc, const Float blank=0.0)=0
virtual void operator() (Matrix< Bool > &out, const Matrix< Bool > &in, const Vector< Float > &inblc, const Vector< Float > &intrc, const Bool blank=False)=0
void setSubregion (const Vector< Double > &blc, const Vector< 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.
void getSubregion (Vector< Double > &blc, Vector< Double > &trc) const

Protected Member Functions

const Vector< Double > & blc () const
 
    

const Vector< Double > & trc () const
 Get the top right corner (range <0-1,0-1>) of the subregion.

Private Attributes

Vector< DoubleitsBlc
 Current subregion.
Vector< DoubleitsTrc

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 73 of file WCResampleHandler.h.


Constructor & Destructor Documentation

(Required) default constructor.

Copy Constructor (copy semantics)

Destructor.


Member Function Documentation

const Vector<Double>& casa::WCResampleHandler::blc ( ) const [inline, protected]

    

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

Definition at line 151 of file WCResampleHandler.h.

References itsBlc.

Referenced by setSubregion().

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

Definition at line 142 of file WCResampleHandler.h.

References itsBlc, and itsTrc.

virtual void casa::WCResampleHandler::operator() ( Matrix< Bool > &  out,
const Matrix< 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() ( Matrix< uChar > &  out,
const Matrix< uChar > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< Char > &  out,
const Matrix< Char > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< uShort > &  out,
const Matrix< uShort > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< Short > &  out,
const Matrix< Short > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< uInt > &  out,
const Matrix< uInt > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< Int > &  out,
const Matrix< Int > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< uLong > &  out,
const Matrix< uLong > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< Long > &  out,
const Matrix< Long > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< Float > &  out,
const Matrix< Float > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< Double > &  out,
const Matrix< Double > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< Complex > &  out,
const Matrix< Complex > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< DComplex > &  out,
const Matrix< DComplex > &  in 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< Float > &  out,
const Matrix< Float > &  in,
const Vector< Float > &  inblc,
const Vector< Float > &  intrc,
const 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() ( Matrix< Float > &  out,
Matrix< Bool > &  outMask,
const Matrix< Float > &  in,
const Matrix< Bool > &  inMask,
const Vector< Float > &  inblc,
const Vector< Float > &  intrc,
const Float  blank = 0.0 
) [pure virtual]
virtual void casa::WCResampleHandler::operator() ( Matrix< Bool > &  out,
const Matrix< Bool > &  in,
const Vector< Float > &  inblc,
const Vector< Float > &  intrc,
const Bool  blank = False 
) [pure virtual]
WCResampleHandler& casa::WCResampleHandler::operator= ( const WCResampleHandler other)

Assignment operator (copy semantics)

void casa::WCResampleHandler::setSubregion ( const Vector< Double > &  blc,
const Vector< 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 139 of file WCResampleHandler.h.

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

const Vector<Double>& casa::WCResampleHandler::trc ( ) const [inline, protected]

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

Definition at line 155 of file WCResampleHandler.h.

References itsTrc.

Referenced by setSubregion().


Member Data Documentation

Current subregion.

Definition at line 161 of file WCResampleHandler.h.

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

Definition at line 162 of file WCResampleHandler.h.

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


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