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
30//# Includes
31#include <casacore/casa/aips.h>
32#include <casacore/lattices/LatticeMath/CLInterpolator2D.h>
33#include <casacore/casa/Arrays/AxesMapping.h>
34
35namespace casacore { //# NAMESPACE CASACORE - BEGIN
36
37//# Forward Declarations
38template<class T> class Lattice;
39
40
41// <summary>
42// Arbitrarily shaped 1-dim lattice crosscut
43// </summary>
44
45// <use visibility=export>
46
47// <reviewed reviewer="" date="" tests="tPixelCurve.cc">
48// </reviewed>
49
50// <prerequisite>
51//# Classes you should understand before using this one.
52// <li> <linkto class=CLInterpolator2D>CLInterpolator2D</linkto>
53// </prerequisite>
54
55// <etymology>
56// CLIP means CLInterpolator (its base class).
57// The 2D means that interpolation in 2 dimensions needs to be done.
58// </etymology>
59
60// <synopsis>
61// CLIPNearest2D is a realisation of the abstract base class CLInterpolator2D.
62// This class interpolates in a very simple way by taking the nearest
63// neighbour.
64//
65// Note that the base class contains the lattice to be interpolated and
66// the axis to be used in the interpolation.
67// </synopsis>
68
69
70template<class T>
72{
73public:
74 // Only default constructor is needed.
75 // The set function in the base class defines the lattice and axes.
77
78 // Make a copy of the object.
79 virtual CLIPNearest2D<T>* clone() const;
80
81 // Get the data for the given pixel points (on axis1 and axis2) and
82 // the chunk in the other axes as given by the section.
83 virtual void getData (Array<T>& buffer,
84 const Vector<Float>& x,
85 const Vector<Float>& y,
86 const Slicer& section);
87
88 // Get the mask for the given pixel points (on axis1 and axis2) and
89 // the chunk in the other axes as given by the section.
90 virtual void getMask (Array<Bool>& buffer,
91 const Vector<Float>& x,
92 const Vector<Float>& y,
93 const Slicer& section);
94
95 //# Make members of parent class known.
96protected:
103};
104
105
106
107} //# NAMESPACE CASACORE - END
108
109#ifndef CASACORE_NO_AUTO_TEMPLATES
110#include <casacore/lattices/LatticeMath/CLIPNearest2D.tcc>
111#endif //# CASACORE_NO_AUTO_TEMPLATES
112#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
this file contains all the compiler specific defines
Definition mainpage.dox:28