casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
casa::CLInterpolator2D< T > Class Template Reference

Abstract base class for interpolator used by CurvedLattice2D. More...

#include <CLInterpolator2D.h>

Inheritance diagram for casa::CLInterpolator2D< T >:
casa::CLIPNearest2D< T >

List of all members.

Public Member Functions

 CLInterpolator2D ()
virtual ~CLInterpolator2D ()
virtual CLInterpolator2D< T > * clone () const =0
 Let a derived class make a copy of itself.
void set (MaskedLattice< T > *lattice, const AxesMapping &axesMap, uInt axis1, uInt axis2, uInt curveAxis)
 Set the internals to the values of the CurvedLattice using it.
virtual void getData (Array< T > &buffer, const Vector< Float > &x, const Vector< Float > &y, const Slicer &section)=0
 Get the data for the given pixel points (on axis1 and axis2) and the chunk in the other axes as given by the section.
virtual void getMask (Array< Bool > &buffer, const Vector< Float > &x, const Vector< Float > &y, const Slicer &section)=0
 Get the mask for the given pixel points (on axis1 and axis2) and the chunk in the other axes as given by the section.

Protected Member Functions

 CLInterpolator2D (const CLInterpolator2D< T > &)
 Copy constructor can only be used by derived classes.
CLInterpolator2Doperator= (const CLInterpolator2D< T > &)
 Assignment can only be used by derived classes.
virtual void preset ()
 Let a derived class do some initial work after set is called.

Protected Attributes

MaskedLattice< T > * itsLatticePtr
AxesMapping itsAxesMap
uInt itsAxis1
uInt itsAxis2
uInt itsCurveAxis
Bool itsIsRef

Detailed Description

template<class T>
class casa::CLInterpolator2D< T >

Abstract base class for interpolator used by CurvedLattice2D.

Intended use:

Internal

Review Status

Test programs:
tCurvedLattice2D

Prerequisite

Etymology

The CL in CLInterpolator2D means CurvedLattice. The 2D means that interpolation in 2 dimensions needs to be done.

Synopsis

CurvedLattice2D needs lattice data which are not on exact grid points. Therefore some interpolation scheme is needed. The abstract base class CLInterpolation2D makes it possible for CurvedLattice2D to use any interpolation scheme. Currently the only derived class is CLIPNearest2D
Apart from interpolating and returning data, a derived class also has to return a mask. For instance, in a possible derived class using 4-point interpolation, the interpolation scheme has to take the image mask into account, and make a mask for its output data (say that the output point is masked off if its 4 input points are masked off).

This base class has some data members defining the lattice and the lattice axes to be interpolated. When these data members are set, the virtual function preset is called. A derived class can implement this function to do some precalculations, etc..

Motivation

This class makes it possible to hide the interpolation to be used from the CurvedLattice2D class.

Definition at line 87 of file CLInterpolator2D.h.


Constructor & Destructor Documentation

template<class T >
casa::CLInterpolator2D< T >::CLInterpolator2D ( ) [inline]

Definition at line 91 of file CLInterpolator2D.h.

template<class T >
virtual casa::CLInterpolator2D< T >::~CLInterpolator2D ( ) [virtual]
template<class T >
casa::CLInterpolator2D< T >::CLInterpolator2D ( const CLInterpolator2D< T > &  ) [protected]

Copy constructor can only be used by derived classes.


Member Function Documentation

template<class T >
virtual CLInterpolator2D<T>* casa::CLInterpolator2D< T >::clone ( ) const [pure virtual]

Let a derived class make a copy of itself.

Implemented in casa::CLIPNearest2D< T >.

template<class T >
virtual void casa::CLInterpolator2D< T >::getData ( Array< T > &  buffer,
const Vector< Float > &  x,
const Vector< Float > &  y,
const Slicer section 
) [pure virtual]

Get the data for the given pixel points (on axis1 and axis2) and the chunk in the other axes as given by the section.

The Slicer is fixed and the buffer has the correct shape.

Implemented in casa::CLIPNearest2D< T >.

template<class T >
virtual void casa::CLInterpolator2D< T >::getMask ( Array< Bool > &  buffer,
const Vector< Float > &  x,
const Vector< Float > &  y,
const Slicer section 
) [pure virtual]

Get the mask for the given pixel points (on axis1 and axis2) and the chunk in the other axes as given by the section.

The Slicer is fixed and the buffer has the correct shape.

Implemented in casa::CLIPNearest2D< T >.

template<class T >
CLInterpolator2D& casa::CLInterpolator2D< T >::operator= ( const CLInterpolator2D< T > &  ) [protected]

Assignment can only be used by derived classes.

template<class T >
virtual void casa::CLInterpolator2D< T >::preset ( ) [protected, virtual]

Let a derived class do some initial work after set is called.

The default implementation does nothing.

template<class T >
void casa::CLInterpolator2D< T >::set ( MaskedLattice< T > *  lattice,
const AxesMapping axesMap,
uInt  axis1,
uInt  axis2,
uInt  curveAxis 
)

Set the internals to the values of the CurvedLattice using it.

Note that only a copy of the lattice pointer is made. Thereafter the virtual function preset() is called to give a derived class the opportunity to do some initial work.


Member Data Documentation

template<class T >
AxesMapping casa::CLInterpolator2D< T >::itsAxesMap [protected]

Definition at line 136 of file CLInterpolator2D.h.

template<class T >
uInt casa::CLInterpolator2D< T >::itsAxis1 [protected]

Definition at line 137 of file CLInterpolator2D.h.

template<class T >
uInt casa::CLInterpolator2D< T >::itsAxis2 [protected]

Definition at line 138 of file CLInterpolator2D.h.

template<class T >
uInt casa::CLInterpolator2D< T >::itsCurveAxis [protected]

Definition at line 139 of file CLInterpolator2D.h.

template<class T >
Bool casa::CLInterpolator2D< T >::itsIsRef [protected]

Definition at line 140 of file CLInterpolator2D.h.

template<class T >
MaskedLattice<T>* casa::CLInterpolator2D< T >::itsLatticePtr [protected]

Definition at line 135 of file CLInterpolator2D.h.


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