SepImageConvolver.h
Classes
- SepImageConvolver -- This class does separable convolution of an image (full description)
Interface
- Public Members
- SepImageConvolver (ImageInterface<T>& image, T &os, Bool showProgress)
- SepImageConvolver(const SepImageConvolver<T> &other)
- ~SepImageConvolver()
- SepImageConvolver &operator=(const SepImageConvolver<T> &other)
- void setKernel(uInt axis, const Vector<T>& kernel)
- void setKernel(uInt axis, VectorKernel::KernelTypes kernelType, const Quantum<Double>& width, Bool autoScale, Bool useImageShapeExactly=True, Double scale=1.0)
- void setKernel(uInt axis, VectorKernel::KernelTypes kernelType, Double width, Bool autoScale, Bool useImageShapeExactly=True, Double scale=1.0)
- Vector<T> getKernel(uInt axis)
- uInt getKernelShape(uInt axis)
- void convolve(ImageInterface<T>& imageOut)
- void convolve()
- Private Members
- void checkAxis(uInt axis)
- Bool isTempImage (const ImageInterface<Float>* pIm) const
- void zero()
- void smoothProfiles (ImageInterface<T>& in, const Int& axis, const T<T>& psf)
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Etymology
This class handles convolution of images by separable kernels.
Synopsis
Convolution kernels can be separable or not. For example,
convolution of an image by a 2-D gaussian when the position angle
of the Gaussian is along one of the axes is separable. If the
position angle is otherwise, it is not separable. When the
kernel is separable, an N-dimensional specification of the
convolution kernel is straightforward.
Although this class is templated, it will only work
for Float and Double types.
Example
Motivation
Separable and non-separable convolution are standard requirements.
To Do
Member Description
SepImageConvolver (ImageInterface<T>& image, T &os, Bool showProgress)
Constructor
SepImageConvolver(const SepImageConvolver<T> &other)
Copy constructor. Uses reference semantics.
Destructor
SepImageConvolver &operator=(const SepImageConvolver<T> &other)
Assignment operator. Uses reference semantics.
void setKernel(uInt axis, const Vector<T>& kernel)
Set convolution kernel vector. The specified axis is convolved
by the given kernel.
void setKernel(uInt axis, VectorKernel::KernelTypes kernelType, const Quantum<Double>& width, Bool autoScale, Bool useImageShapeExactly=True, Double scale=1.0)
void setKernel(uInt axis, VectorKernel::KernelTypes kernelType, Double width, Bool autoScale, Bool useImageShapeExactly=True, Double scale=1.0)
Set convolution kernel. The specified axis is convolved
by the given kernel. If autoScale is True then kernel volume is unity,
else kernel peak is 1 * scale. If useImageShapeExactly is True, the kernel
will be the shape of the axis, else it will be big enough
to accomodate the kernel width (e.g. +/- 5sigma for Gaussian)
Get the convolution kernel for the specified axis
Get the convolution kernel shape for the specified axis
void convolve(ImageInterface<T>& imageOut)
void convolve()
Perform the convolution either outputting to a new image
or in-situ. The error checking for the
convolution parameters is done when you call this
function. If outputting a new image, and it needs a mask and doesn't have one,
the it will be given one if possible and the input
mask will be transferred to the output. Masked pixels
are zeroed before convolving
Bool isTempImage (const ImageInterface<Float>* pIm) const
void smoothProfiles (ImageInterface<T>& in, const Int& axis, const T<T>& psf)