#include <imageanalysis/ImageAnalysis/ImageDecimator.h>
#include <imageanalysis/ImageAnalysis/ImageCollapser.h>
#include <imageanalysis/ImageAnalysis/ImageHistory.h>
template<class T> ImageDecimator<T>::ImageDecimator(
const casacore::Record *const region,
const casacore::String& maskInp,
const casacore::String& outname, casacore::Bool overwrite
image, "", region, "", "", "",
maskInp, outname, overwrite
_axis(0), _factor(1), _function(ImageDecimatorData::COPY) {
template<class T> void ImageDecimator<T>::setFactor(casacore::uInt n) {
ThrowIf(n == 0, "The decimation factor must be positive");
template<class T> void ImageDecimator<T>::setFunction(
ImageDecimatorData::Function f
f == ImageDecimatorData::NFUNCS,
"Setting decimation function to NFUNCS is not allowed"
template<class T> void ImageDecimator<T>::setAxis(casacore::uInt n) {
casacore::uInt ndim = this->_getImage()->ndim();
"The axis number along which the decimation "
"is to occur must be less than the number of "
"axes in the image which is " + casacore::String::toString(ndim)
template<class T> SPIIT ImageDecimator<T>::decimate() const {
_factor > this->_getImage()->shape()[_axis],
"The value of factor cannot be greater than the "
"number of pixels along the specified axis"
casacore::LogOrigin lor(getClass(), __func__);
auto subImage = SubImageFactory<T>::createSubImageRO(
*this->_getImage(), *this->_getRegion(), this->_getMask(), 0,
casacore::AxesSpecifier(), this->_getStretch()
*this->_getLog() << casacore::LogIO::WARN << "A decimation factor "
<< "of 1 has been specified which means no planes will "
<< "be removed. The resulting image will be a straight "
<< "copy of the selected image." << casacore::LogIO::POST;