casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
casacore::CLInterpolator2D< T > Class Template Referenceabstract

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

#include <CLInterpolator2D.h>

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

Public Member Functions

 CLInterpolator2D ()
 
virtual ~CLInterpolator2D ()
 
virtual CLInterpolator2D< T > * clone () const =0
 Let a derived class make a copy of itself. More...
 
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. More...
 
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. More...
 
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. More...
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

template<class T>
class casacore::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 88 of file CLInterpolator2D.h.

Constructor & Destructor Documentation

template<class T >
casacore::CLInterpolator2D< T >::CLInterpolator2D ( )
inline

Definition at line 92 of file CLInterpolator2D.h.

template<class T >
virtual casacore::CLInterpolator2D< T >::~CLInterpolator2D ( )
virtual
template<class T >
casacore::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>* casacore::CLInterpolator2D< T >::clone ( ) const
pure virtual

Let a derived class make a copy of itself.

Implemented in casacore::CLIPNearest2D< T >.

template<class T >
virtual void casacore::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 casacore::CLIPNearest2D< T >.

template<class T >
virtual void casacore::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 casacore::CLIPNearest2D< T >.

template<class T >
CLInterpolator2D& casacore::CLInterpolator2D< T >::operator= ( const CLInterpolator2D< T > &  )
protected

Assignment can only be used by derived classes.

template<class T >
virtual void casacore::CLInterpolator2D< T >::preset ( )
protectedvirtual

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

The default implementation does nothing.

template<class T >
void casacore::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 casacore::CLInterpolator2D< T >::itsAxesMap
protected

Definition at line 137 of file CLInterpolator2D.h.

template<class T >
uInt casacore::CLInterpolator2D< T >::itsAxis1
protected

Definition at line 138 of file CLInterpolator2D.h.

template<class T >
uInt casacore::CLInterpolator2D< T >::itsAxis2
protected

Definition at line 139 of file CLInterpolator2D.h.

template<class T >
uInt casacore::CLInterpolator2D< T >::itsCurveAxis
protected

Definition at line 140 of file CLInterpolator2D.h.

template<class T >
Bool casacore::CLInterpolator2D< T >::itsIsRef
protected

Definition at line 141 of file CLInterpolator2D.h.

template<class T >
MaskedLattice<T>* casacore::CLInterpolator2D< T >::itsLatticePtr
protected

Definition at line 136 of file CLInterpolator2D.h.


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