casa
$Rev:20696$
|
Base class for resampling data pixels to World/PixelCanvas pixels. More...
#include <WCResampleHandler.h>
Public Member Functions | |
WCResampleHandler () | |
(Required) default constructor. | |
WCResampleHandler (const WCResampleHandler &other) | |
Copy Constructor (copy semantics) | |
WCResampleHandler & | operator= (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< Double > | itsBlc |
Current subregion. | |
Vector< Double > | itsTrc |
Base class for resampling data pixels to World/PixelCanvas pixels.
The name of WCResampleHandler comes from WorldCanvas + Resample + Handler
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.
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.
(Required) default constructor.
casa::WCResampleHandler::WCResampleHandler | ( | const WCResampleHandler & | other | ) |
Copy Constructor (copy semantics)
virtual casa::WCResampleHandler::~WCResampleHandler | ( | ) | [virtual] |
Destructor.
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.
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] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< Char > & | out, |
const Matrix< Char > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< uShort > & | out, |
const Matrix< uShort > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< Short > & | out, |
const Matrix< Short > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< uInt > & | out, |
const Matrix< uInt > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< Int > & | out, |
const Matrix< Int > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< uLong > & | out, |
const Matrix< uLong > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< Long > & | out, |
const Matrix< Long > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< Float > & | out, |
const Matrix< Float > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< Double > & | out, |
const Matrix< Double > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< Complex > & | out, |
const Matrix< Complex > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
virtual void casa::WCResampleHandler::operator() | ( | Matrix< DComplex > & | out, |
const Matrix< DComplex > & | in | ||
) | [pure virtual] |
Implemented in casa::WCSimpleResampleHandler.
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] |
Implemented in casa::WCSimpleResampleHandler.
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] |
Implemented in casa::WCSimpleResampleHandler.
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.
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().
Vector<Double> casa::WCResampleHandler::itsBlc [private] |
Current subregion.
Definition at line 161 of file WCResampleHandler.h.
Referenced by blc(), getSubregion(), and setSubregion().
Vector<Double> casa::WCResampleHandler::itsTrc [private] |
Definition at line 162 of file WCResampleHandler.h.
Referenced by getSubregion(), setSubregion(), and trc().