casa
$Rev:20696$
|
This class does separable convolution of an image. More...
#include <SepImageConvolver.h>
Public Member Functions | |
SepImageConvolver (ImageInterface< T > &image, LogIO &os, Bool showProgress) | |
Constructor. | |
SepImageConvolver (const SepImageConvolver< T > &other) | |
Copy constructor. | |
~SepImageConvolver () | |
Destructor. | |
SepImageConvolver & | operator= (const SepImageConvolver< T > &other) |
Assignment operator. | |
void | setKernel (uInt axis, const Vector< T > &kernel) |
Set convolution kernel vector. | |
void | setKernel (uInt axis, VectorKernel::KernelTypes kernelType, const Quantum< Double > &width, Bool autoScale, Bool useImageShapeExactly=True, Double scale=1.0) |
Set convolution kernel. | |
void | setKernel (uInt axis, VectorKernel::KernelTypes kernelType, Double width, Bool autoScale, Bool useImageShapeExactly=True, Double scale=1.0) |
Vector< T > | getKernel (uInt axis) |
Get the convolution kernel for the specified axis. | |
uInt | getKernelShape (uInt axis) |
Get the convolution kernel shape for the specified axis. | |
void | convolve (ImageInterface< T > &imageOut) |
Perform the convolution either outputting to a new image or in-situ. | |
void | convolve () |
Private Member Functions | |
void | checkAxis (uInt axis) |
Bool | isTempImage (const ImageInterface< Float > *pIm) const |
void | zero () |
void | smoothProfiles (ImageInterface< T > &in, const Int &axis, const Vector< T > &psf) |
Private Attributes | |
ImageInterface< T > * | itsImagePtr |
LogIO | itsOs |
Vector< uInt > | itsAxes |
PtrBlock< Vector< T > * > | itsVectorKernels |
Bool | itsShowProgress |
This class does separable convolution of an image.
Public interface
This class handles convolution of images by separable kernels.
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.
Separable and non-separable convolution are standard requirements.
Definition at line 92 of file SepImageConvolver.h.
casa::SepImageConvolver< T >::SepImageConvolver | ( | ImageInterface< T > & | image, |
LogIO & | os, | ||
Bool | showProgress | ||
) |
Constructor.
casa::SepImageConvolver< T >::SepImageConvolver | ( | const SepImageConvolver< T > & | other | ) |
Copy constructor.
Uses reference semantics.
casa::SepImageConvolver< T >::~SepImageConvolver | ( | ) |
Destructor.
void casa::SepImageConvolver< T >::checkAxis | ( | uInt | axis | ) | [private] |
void casa::SepImageConvolver< T >::convolve | ( | ImageInterface< T > & | imageOut | ) |
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
void casa::SepImageConvolver< T >::convolve | ( | ) |
Vector<T> casa::SepImageConvolver< T >::getKernel | ( | uInt | axis | ) |
Get the convolution kernel for the specified axis.
uInt casa::SepImageConvolver< T >::getKernelShape | ( | uInt | axis | ) |
Get the convolution kernel shape for the specified axis.
Bool casa::SepImageConvolver< T >::isTempImage | ( | const ImageInterface< Float > * | pIm | ) | const [private] |
SepImageConvolver& casa::SepImageConvolver< T >::operator= | ( | const SepImageConvolver< T > & | other | ) |
Assignment operator.
Uses reference semantics.
void casa::SepImageConvolver< T >::setKernel | ( | uInt | axis, |
const Vector< T > & | kernel | ||
) |
Set convolution kernel vector.
The specified axis is convolved by the given kernel.
void casa::SepImageConvolver< T >::setKernel | ( | uInt | axis, |
VectorKernel::KernelTypes | kernelType, | ||
const Quantum< 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)
void casa::SepImageConvolver< T >::setKernel | ( | uInt | axis, |
VectorKernel::KernelTypes | kernelType, | ||
Double | width, | ||
Bool | autoScale, | ||
Bool | useImageShapeExactly = True , |
||
Double | scale = 1.0 |
||
) |
void casa::SepImageConvolver< T >::smoothProfiles | ( | ImageInterface< T > & | in, |
const Int & | axis, | ||
const Vector< T > & | psf | ||
) | [private] |
void casa::SepImageConvolver< T >::zero | ( | ) | [private] |
Vector<uInt> casa::SepImageConvolver< T >::itsAxes [private] |
Definition at line 149 of file SepImageConvolver.h.
ImageInterface<T>* casa::SepImageConvolver< T >::itsImagePtr [private] |
Definition at line 147 of file SepImageConvolver.h.
LogIO casa::SepImageConvolver< T >::itsOs [private] |
Definition at line 148 of file SepImageConvolver.h.
Bool casa::SepImageConvolver< T >::itsShowProgress [private] |
Definition at line 151 of file SepImageConvolver.h.
PtrBlock<Vector<T>* > casa::SepImageConvolver< T >::itsVectorKernels [private] |
Definition at line 150 of file SepImageConvolver.h.