casacore
Loading...
Searching...
No Matches
ConvolveGridder.h
Go to the documentation of this file.
1// # ConvolveGridder.h: Definition for Convolutional Gridder
2// # Copyright (C) 1996,1997,1999,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 received 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 SCIMATH_CONVOLVEGRIDDER_H
27#define SCIMATH_CONVOLVEGRIDDER_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/scimath/Mathematics/Gridder.h>
31#include <casacore/casa/BasicSL/String.h>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// <summary>
36// Does convolutional gridding
37// </summary>
38
39template <class Domain, class Range>
40class ConvolveGridder : public Gridder<Domain, Range> {
41 public:
43 const String& convType = "SF");
44
45 virtual void setConvolutionFunction(const String& type);
46
47 virtual ~ConvolveGridder() {}
48
49 virtual Bool grid(Array<Range>& gridded, const Vector<Domain>& position, const Range& value);
50
51 virtual Bool degrid(const Array<Range>& gridded, const Vector<Domain>& position, Range& value);
52
54
56
58
59 protected:
60 virtual Range correctionFactor1D(Int loc, Int len);
61
62 private:
69
70 public:
71 using Gridder<Domain, Range>::onGrid;
72
73 protected:
74 // # Make members of parent classes known.
75 using Gridder<Domain, Range>::ndim;
76 using Gridder<Domain, Range>::shape;
77 using Gridder<Domain, Range>::scale;
78 using Gridder<Domain, Range>::offset;
79 using Gridder<Domain, Range>::posVec;
80 using Gridder<Domain, Range>::locVec;
81 using Gridder<Domain, Range>::shapeVec;
82 using Gridder<Domain, Range>::zeroShapeVec;
83 using Gridder<Domain, Range>::offsetVec;
84 using Gridder<Domain, Range>::centerVec;
85 using Gridder<Domain, Range>::fillCorrectionVectors;
86};
87
88} // namespace casacore
89
90#ifndef CASACORE_NO_AUTO_TEMPLATES
91#include <casacore/scimath/Mathematics/ConvolveGridder.tcc>
92#endif // # CASACORE_NO_AUTO_TEMPLATES
93#endif
ConvolveGridder(const IPosition &shape, const Vector< Domain > &scale, const Vector< Domain > &offset, const String &convType="SF")
virtual Range correctionFactor1D(Int loc, Int len)
Correction factor for 1 dimension.
Vector< Int > & cSupport()
virtual Bool degrid(const Array< Range > &gridded, const Vector< Domain > &position, Range &value)
Vector< Double > & cFunction()
virtual Bool grid(Array< Range > &gridded, const Vector< Domain > &position, const Range &value)
virtual void setConvolutionFunction(const String &type)
Vector< Int > centerVec
Definition Gridder.h:95
Vector< Domain > scale
Definition Gridder.h:86
virtual Bool onGrid(const Vector< Int > &loc)
Vector< Domain > posVec
Definition Gridder.h:89
virtual void fillCorrectionVectors()
Vector< Int > locVec
Definition Gridder.h:91
IPosition shape
Definition Gridder.h:84
Vector< Int > zeroShapeVec
Definition Gridder.h:93
Vector< Domain > offset
Definition Gridder.h:87
Vector< Domain > & position(Vector< Domain > &gpos, const Vector< Domain > &pos)
Vector< Int > shapeVec
Definition Gridder.h:92
Vector< Int > offsetVec
Definition Gridder.h:94
String: the storage and methods of handling collections of characters.
Definition String.h:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
NewDelAllocator< T > NewDelAllocator< T >::value
Definition Allocator.h:360