casacore
Loading...
Searching...
No Matches
CLIPNearest2D.h
Go to the documentation of this file.
1// # CLIPNearest2D.h: Nearest neighbour interpolator for CurvedLattice2D
2// # Copyright (C) 2003
3// # Associated Universities, Inc. Washington DC, USA.
4// #
5// # This library is free software; you can redistribute it and/or modify it
6// # under the terms of the GNU Library General Public License as published by
7// # the Free Software Foundation; either version 2 of the License, or (at your
8// # option) any later version.
9// #
10// # This library is distributed in the hope that it will be useful, but WITHOUT
11// # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12// # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13// # License for more details.
14// #
15// # You should have receied a copy of the GNU Library General Public License
16// # along with this library; if not, write to the Free Software Foundation,
17// # Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18// #
19// # Correspondence concerning AIPS++ should be addressed as follows:
20// # Internet email: casa-feedback@nrao.edu.
21// # Postal address: AIPS++ Project Office
22// # National Radio Astronomy Observatory
23// # 520 Edgemont Road
24// # Charlottesville, VA 22903-2475 USA
25
26#ifndef LATTICES_CLIPNEAREST2D_H
27#define LATTICES_CLIPNEAREST2D_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/lattices/LatticeMath/CLInterpolator2D.h>
32#include <casacore/casa/Arrays/AxesMapping.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// # Forward Declarations
37template <class T>
38class Lattice;
39
40// <summary>
41// Arbitrarily shaped 1-dim lattice crosscut
42// </summary>
43
44// <use visibility=export>
45
46// <reviewed reviewer="" date="" tests="tPixelCurve.cc">
47// </reviewed>
48
49// <prerequisite>
50// # Classes you should understand before using this one.
51// <li> <linkto class=CLInterpolator2D>CLInterpolator2D</linkto>
52// </prerequisite>
53
54// <etymology>
55// CLIP means CLInterpolator (its base class).
56// The 2D means that interpolation in 2 dimensions needs to be done.
57// </etymology>
58
59// <synopsis>
60// CLIPNearest2D is a realisation of the abstract base class CLInterpolator2D.
61// This class interpolates in a very simple way by taking the nearest
62// neighbour.
63//
64// Note that the base class contains the lattice to be interpolated and
65// the axis to be used in the interpolation.
66// </synopsis>
67
68template <class T>
70 public:
71 // Only default constructor is needed.
72 // The set function in the base class defines the lattice and axes.
74
75 // Make a copy of the object.
76 virtual CLIPNearest2D<T>* clone() const;
77
78 // Get the data for the given pixel points (on axis1 and axis2) and
79 // the chunk in the other axes as given by the section.
80 virtual void getData(Array<T>& buffer, const Vector<Float>& x, const Vector<Float>& y,
81 const Slicer& section);
82
83 // Get the mask for the given pixel points (on axis1 and axis2) and
84 // the chunk in the other axes as given by the section.
85 virtual void getMask(Array<Bool>& buffer, const Vector<Float>& x, const Vector<Float>& y,
86 const Slicer& section);
87
88 // # Make members of parent class known.
89 protected:
96};
97
98} // namespace casacore
99
100#ifndef CASACORE_NO_AUTO_TEMPLATES
101#include <casacore/lattices/LatticeMath/CLIPNearest2D.tcc>
102#endif // # CASACORE_NO_AUTO_TEMPLATES
103#endif
virtual void getData(Array< T > &buffer, const Vector< Float > &x, const Vector< Float > &y, const Slicer &section)
Get the data for the given pixel points (on axis1 and axis2) and the chunk in the other axes as given...
CLIPNearest2D()
Only default constructor is needed.
virtual void getMask(Array< Bool > &buffer, const Vector< Float > &x, const Vector< Float > &y, const Slicer &section)
Get the mask for the given pixel points (on axis1 and axis2) and the chunk in the other axes as given...
virtual CLIPNearest2D< T > * clone() const
Make a copy of the object.
MaskedLattice< T > * itsLatticePtr
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28