Image2DConvolver.h
Classes
- Image2DConvolver -- This class does 2D convolution of an image by a functional form (full description)
Interface
- Public Members
- Image2DConvolver ()
- Image2DConvolver(const Image2DConvolver<T> &other)
- ~Image2DConvolver()
- Image2DConvolver &operator=(const Image2DConvolver<T> &other)
- void convolve(LogIO& os, ImageInterface<T>& imageOut, ImageInterface<T>& imageIn, T::KernelTypes kernelType, const IPosition& pixelAxes, const Kernelypes<IPosition<Double> >& parameters, Bool autoScale, Double scale, Bool copyMiscellaneous=True)
- Private Members
- void checkKernelParameters(LogIO& os, VectorKernel::KernelTypes kernelType, const Vector<Vector<Double> >& parameters) const
- void dealWithRestoringBeam (LogIO& os, String& brightnessUnitOut, Vector<Quantum<Double> >& beamOut, Array<T>& kernelArray, T kernelVolume, VectorKernel::KernelTypes kernelType, const Vector<Quantum<Double> >& parameters, const IPosition& axes, const ypes& cSys, const IPosition& imageInfo, const CoordinateSystem& brightnessUnit, Bool autoscale, Double scale) const
- T fillKernel (Matrix<T>& kernelMatrix, Matrix::KernelTypes kernelType, const IPosition& kernelShape, const IPosition& axes, const Kernelypes<Double>& parameters) const
- void fillGaussian (T& maxVal, T& volume, Matrix<T>& pixels, T height, T xCentre, T yCentre, T majorAxis, T ratio, T positionAngle) const
- T makeKernel(LogIO& os, LogIO<T>& kernel, Array::KernelTypes kernelType, const Vector<Kernelypes<Double> >& parameters, const Vector& axes, const ImageInterface<T>& inImage) const
- IPosition shapeOfKernel (VectorKernel::KernelTypes kernelType, const Vector<Double>& parameters, uInt ndim, const IPosition& axes) const
- uInt sizeOfGaussian (Double width, Double nSigma) const
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Etymology
This class handles 2D convolution of images
Synopsis
This class convolves an image by a specified 2D function.
Example
Motivation
Convolution is a standard image processing requirement. The
class object has no state. The functions could be static.
The convolution is done via FFT. Thus input pixels which
are masked are set to 0 before the convolution. The mask
is transferred to the output image. No additional scaling
of the output image values is done.
To Do
Member Description
Constructor
Image2DConvolver(const Image2DConvolver<T> &other)
Copy constructor. Uses reference semantics.
Destructor
Image2DConvolver &operator=(const Image2DConvolver<T> &other)
Assignment operator. Uses reference semantics.
void convolve(LogIO& os, ImageInterface<T>& imageOut, ImageInterface<T>& imageIn, T::KernelTypes kernelType, const IPosition& pixelAxes, const Kernelypes<IPosition<Double> >& parameters, Bool autoScale, Double scale, Bool copyMiscellaneous=True)
Convolve. If the output image needs a mask and doesn't have one,
it will be given one if possible. The miscInfo, imageInfo,
units and logger will be copied from the input to the output
unless you indicate not to (copyMiscellaneous).
Check kernel parameters
void dealWithRestoringBeam (LogIO& os, String& brightnessUnitOut, Vector<Quantum<Double> >& beamOut, Array<T>& kernelArray, T kernelVolume, VectorKernel::KernelTypes kernelType, const Vector<Quantum<Double> >& parameters, const IPosition& axes, const ypes& cSys, const IPosition& imageInfo, const CoordinateSystem& brightnessUnit, Bool autoscale, Double scale) const
T fillKernel (Matrix<T>& kernelMatrix, Matrix::KernelTypes kernelType, const IPosition& kernelShape, const IPosition& axes, const Kernelypes<Double>& parameters) const
void fillGaussian (T& maxVal, T& volume, Matrix<T>& pixels, T height, T xCentre, T yCentre, T majorAxis, T ratio, T positionAngle) const
T makeKernel(LogIO& os, LogIO<T>& kernel, Array::KernelTypes kernelType, const Vector<Kernelypes<Double> >& parameters, const Vector& axes, const ImageInterface<T>& inImage) const
IPosition shapeOfKernel (VectorKernel::KernelTypes kernelType, const Vector<Double>& parameters, uInt ndim, const IPosition& axes) const
uInt sizeOfGaussian (Double width, Double nSigma) const