casa
5.7.0-16
|
This class does separable convolution of an image. More...
#include <SepImageConvolver.h>
Public Member Functions | |
SepImageConvolver (const casacore::ImageInterface< T > &image, casacore::LogIO &os, casacore::Bool showProgress) | |
Constructor. More... | |
SepImageConvolver (const SepImageConvolver< T > &other) | |
Copy constructor. More... | |
~SepImageConvolver () | |
Destructor. More... | |
SepImageConvolver & | operator= (const SepImageConvolver< T > &other) |
Assignment operator. More... | |
void | setKernel (casacore::uInt axis, const casacore::Vector< T > &kernel) |
Set convolution kernel vector. More... | |
void | setKernel (casacore::uInt axis, casacore::VectorKernel::KernelTypes kernelType, const casacore::Quantum< casacore::Double > &width, casacore::Bool autoScale, casacore::Bool useImageShapeExactly=true, casacore::Double scale=1.0) |
Set convolution kernel. More... | |
void | setKernel (casacore::uInt axis, casacore::VectorKernel::KernelTypes kernelType, casacore::Double width, casacore::Bool autoScale, casacore::Bool useImageShapeExactly=true, casacore::Double scale=1.0) |
casacore::Vector< T > | getKernel (casacore::uInt axis) |
Get the convolution kernel for the specified axis. More... | |
casacore::uInt | getKernelShape (casacore::uInt axis) |
Get the convolution kernel shape for the specified axis. More... | |
void | convolve (casacore::ImageInterface< T > &imageOut) |
Perform the convolution either outputting to a new image or in-situ. More... | |
Private Member Functions | |
void | _checkAxis (casacore::uInt axis) |
void | _zero () |
void | _smoothProfiles (casacore::ImageInterface< T > &in, const casacore::Int &axis, const casacore::Vector< T > &psf) |
Private Attributes | |
casacore::ImageInterface< T > * | itsImagePtr |
casacore::LogIO | itsOs |
casacore::Vector< casacore::uInt > | itsAxes |
casacore::PtrBlock < casacore::Vector< T > * > | itsVectorKernels |
casacore::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 casacore::Float and casacore::Double types.
Separable and non-separable convolution are standard requirements.
Definition at line 96 of file SepImageConvolver.h.
casa::SepImageConvolver< T >::SepImageConvolver | ( | const casacore::ImageInterface< T > & | image, |
casacore::LogIO & | os, | ||
casacore::Bool | showProgress | ||
) |
Constructor.
casa::SepImageConvolver< T >::SepImageConvolver | ( | const SepImageConvolver< T > & | other | ) |
Copy constructor.
Uses reference semantics.
casa::SepImageConvolver< T >::~SepImageConvolver | ( | ) |
Destructor.
|
private |
|
private |
|
private |
void casa::SepImageConvolver< T >::convolve | ( | casacore::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
casacore::Vector<T> casa::SepImageConvolver< T >::getKernel | ( | casacore::uInt | axis | ) |
Get the convolution kernel for the specified axis.
casacore::uInt casa::SepImageConvolver< T >::getKernelShape | ( | casacore::uInt | axis | ) |
Get the convolution kernel shape for the specified axis.
SepImageConvolver& casa::SepImageConvolver< T >::operator= | ( | const SepImageConvolver< T > & | other | ) |
Assignment operator.
Uses reference semantics.
void casa::SepImageConvolver< T >::setKernel | ( | casacore::uInt | axis, |
const casacore::Vector< T > & | kernel | ||
) |
Set convolution kernel vector.
The specified axis is convolved by the given kernel.
void casa::SepImageConvolver< T >::setKernel | ( | casacore::uInt | axis, |
casacore::VectorKernel::KernelTypes | kernelType, | ||
const casacore::Quantum< casacore::Double > & | width, | ||
casacore::Bool | autoScale, | ||
casacore::Bool | useImageShapeExactly = true , |
||
casacore::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 | ( | casacore::uInt | axis, |
casacore::VectorKernel::KernelTypes | kernelType, | ||
casacore::Double | width, | ||
casacore::Bool | autoScale, | ||
casacore::Bool | useImageShapeExactly = true , |
||
casacore::Double | scale = 1.0 |
||
) |
|
private |
Definition at line 155 of file SepImageConvolver.h.
|
private |
Definition at line 153 of file SepImageConvolver.h.
|
private |
Definition at line 154 of file SepImageConvolver.h.
|
private |
Definition at line 157 of file SepImageConvolver.h.
|
private |
Definition at line 156 of file SepImageConvolver.h.