ConvolveGridder.h

Go to the documentation of this file.
00001 //# ConvolveGridder.h: Definition for Convolutional Gridder
00002 //# Copyright (C) 1996,1997,1999,2003
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 //# $Id$
00028 
00029 #ifndef SCIMATH_CONVOLVEGRIDDER_H
00030 #define SCIMATH_CONVOLVEGRIDDER_H
00031 
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/scimath/Mathematics/Gridder.h>
00034 #include <casacore/casa/BasicSL/String.h>
00035 
00036 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00037 
00038 // <summary>
00039 // Does convolutional gridding
00040 // </summary>
00041 
00042 template <class Domain, class Range>
00043 class ConvolveGridder : public Gridder<Domain, Range>
00044 {
00045 public:
00046 
00047   ConvolveGridder(const IPosition& shape, const Vector<Domain>& scale,
00048                   const Vector<Domain>& offset, const String& convType="SF");
00049 
00050   virtual void setConvolutionFunction(const String& type);
00051 
00052   virtual ~ConvolveGridder() {}
00053 
00054   virtual Bool grid(Array<Range>& gridded,
00055                     const Vector<Domain>& position,
00056                     const Range& value);
00057 
00058   virtual Bool degrid(const Array<Range>& gridded,
00059                       const Vector<Domain>& position,
00060                       Range& value);
00061 
00062   Vector<Double>& cFunction();
00063 
00064   Vector<Int>& cSupport();
00065 
00066   Int& cSampling();
00067 
00068 protected:
00069   virtual Range correctionFactor1D(Int loc, Int len);
00070 
00071 private:
00072   Vector<Double> convFunc;
00073   Vector<Int> supportVec;
00074   Vector<Int> loc;
00075   Int sampling;
00076   Int support;
00077   String cType;
00078 
00079 public:
00080   using Gridder<Domain,Range>::onGrid;
00081 protected:
00082   //# Make members of parent classes known.
00083   using Gridder<Domain,Range>::ndim;
00084   using Gridder<Domain,Range>::shape;
00085   using Gridder<Domain,Range>::scale;
00086   using Gridder<Domain,Range>::offset;
00087   using Gridder<Domain,Range>::posVec;
00088   using Gridder<Domain,Range>::locVec;
00089   using Gridder<Domain,Range>::shapeVec;
00090   using Gridder<Domain,Range>::zeroShapeVec;
00091   using Gridder<Domain,Range>::offsetVec;
00092   using Gridder<Domain,Range>::centerVec;
00093   using Gridder<Domain,Range>::fillCorrectionVectors;
00094 };
00095 
00096 } //# NAMESPACE CASACORE - END
00097 
00098 #ifndef CASACORE_NO_AUTO_TEMPLATES
00099 #include <casacore/scimath/Mathematics/ConvolveGridder.tcc>
00100 #endif //# CASACORE_NO_AUTO_TEMPLATES
00101 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1