Loading...
Searching...
No Matches
casacore::CLInterpolator2D< T > Class Template Referenceabstract
lattices package (libcasa_lattices) » LatticeMath_module » LatticeMath_module_internal_classes

More...

`#include <CLInterpolator2D.h>`

## 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.
CLInterpolator2D & | operator= (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 casacore::CLInterpolator2D< T >

Abstract base class for interpolator used by CurvedLattice2D.

### Intended use:

Internal

### Review Status

Test programs:
  tCurvedLattice2D

### Prerequisite

- CurvedLattice2D

### 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 86 of file CLInterpolator2D.h.

## Constructor & Destructor Documentation

## CLInterpolator2D() [1/2]

template<class T>

casacore::CLInterpolator2D< T >::CLInterpolator2D | ( |  | ) |

inline

Definition at line 90 of file CLInterpolator2D.h.

References itsLatticePtr.

Referenced by CLInterpolator2D(), clone(), casacore::CLIPNearest2D< T >::getMask(), and operator=().

## ~CLInterpolator2D()

template<class T>

virtual casacore::CLInterpolator2D< T >::~CLInterpolator2D | ( |  | ) |

virtual

## CLInterpolator2D() [2/2]

template<class T>

casacore::CLInterpolator2D< T >::CLInterpolator2D | ( | const CLInterpolator2D< T > & |  | ) |

protected

Copy constructor can only be used by derived classes.

References CLInterpolator2D().

## Member Function Documentation

## clone()

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 >.

References CLInterpolator2D().

## getData()

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 >.

## getMask()

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 >.

## operator=()

template<class T>

CLInterpolator2D & casacore::CLInterpolator2D< T >::operator= | ( | const CLInterpolator2D< T > & |  | ) |

protected

Assignment can only be used by derived classes.

References CLInterpolator2D().

## preset()

template<class T>

virtual void casacore::CLInterpolator2D< T >::preset | ( |  | ) |

protected virtual

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

The default implementation does nothing.

## set()

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

## itsAxesMap

template<class T>

AxesMapping casacore::CLInterpolator2D< T >::itsAxesMap

protected

Definition at line 135 of file CLInterpolator2D.h.

Referenced by casacore::CLIPNearest2D< T >::getMask().

## itsAxis1

template<class T>

uInt casacore::CLInterpolator2D< T >::itsAxis1

protected

Definition at line 136 of file CLInterpolator2D.h.

Referenced by casacore::CLIPNearest2D< T >::getMask().

## itsAxis2

template<class T>

uInt casacore::CLInterpolator2D< T >::itsAxis2

protected

Definition at line 137 of file CLInterpolator2D.h.

Referenced by casacore::CLIPNearest2D< T >::getMask().

## itsCurveAxis

template<class T>

uInt casacore::CLInterpolator2D< T >::itsCurveAxis

protected

Definition at line 138 of file CLInterpolator2D.h.

Referenced by casacore::CLIPNearest2D< T >::getMask().

## itsIsRef

template<class T>

Bool casacore::CLInterpolator2D< T >::itsIsRef

protected

Definition at line 139 of file CLInterpolator2D.h.

Referenced by casacore::CLIPNearest2D< T >::getMask().

## itsLatticePtr

template<class T>

MaskedLattice<T>* casacore::CLInterpolator2D< T >::itsLatticePtr

protected

Definition at line 134 of file CLInterpolator2D.h.

Referenced by CLInterpolator2D(), and casacore::CLIPNearest2D< T >::getMask().

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

- images/Images/CurvedImage2D.h
- lattices/LatticeMath/CLInterpolator2D.h