//# Copyright (C) 1998,1999,2000,2001,2003
//# Associated Universities, Inc. Washington DC, USA.
//# This program is free software; you can redistribute it and/or modify it
//# under the terms of the GNU General Public License as published by the Free
//# Software Foundation; either version 2 of the License, or (at your option)
//# This program is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
//# You should have received a copy of the GNU General Public License along
//# with this program; if not, write to the Free Software Foundation, Inc.,
//# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# Charlottesville, VA 22903-2475 USA
#include <imageanalysis/ImageAnalysis/ImageRegridderBase.h>
template <class T> ImageRegridderBase<T>::ImageRegridderBase(
const SPCIIT image, const casacore::Record *const regionRec,
const casacore::String& maskInp, const casacore::String& outname,
casacore::Bool overwrite, const casacore::CoordinateSystem& csys,
const casacore::IPosition& axes, const casacore::IPosition& shape
image, "", regionRec, "", "", "", maskInp, outname, overwrite
), _csysTo(csys), _axes(axes), _shape(shape),
_specAsVelocity(false), _doRefChange(false),
_replicate(false), _forceRegrid(false), _decimate(10),
_method(casacore::Interpolate2D::LINEAR), _outputStokes(),
"PV images are not supported. Please first regrid the image from which "
"the PV image was generated, and then create the PV image from that "
template <class T> ImageRegridderBase<T>::~ImageRegridderBase() {}
casacore::Bool ImageRegridderBase<T>::_regriddingDirectionAxes() const {
auto dirAxesNumbers = _csysTo.directionAxesNumbers();
if (! dirAxesNumbers.empty()) {
auto v = dirAxesNumbers.tovector();
for (casacore::Int i=0; i<(casacore::Int)_axes.size(); ++i) {
if (std::find(v.begin(), v.end(), _axes[i]) != v.end()) {