casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::SepImageConvolver< T > Class Template Reference

This class does separable convolution of an image. More...

#include <SepImageConvolver.h>

List of all members.

Public Member Functions

 SepImageConvolver (ImageInterface< T > &image, LogIO &os, Bool showProgress)
 Constructor.
 SepImageConvolver (const SepImageConvolver< T > &other)
 Copy constructor.
 ~SepImageConvolver ()
 Destructor.
SepImageConvolveroperator= (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< uIntitsAxes
PtrBlock< Vector< T > * > itsVectorKernels
Bool itsShowProgress

Detailed Description

template<class T>
class casa::SepImageConvolver< T >

This class does separable convolution of an image.

Intended use:

Public interface

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

Definition at line 92 of file SepImageConvolver.h.


Constructor & Destructor Documentation

template<class T>
casa::SepImageConvolver< T >::SepImageConvolver ( ImageInterface< T > &  image,
LogIO os,
Bool  showProgress 
)

Constructor.

template<class T>
casa::SepImageConvolver< T >::SepImageConvolver ( const SepImageConvolver< T > &  other)

Copy constructor.

Uses reference semantics.

template<class T>
casa::SepImageConvolver< T >::~SepImageConvolver ( )

Destructor.


Member Function Documentation

template<class T>
void casa::SepImageConvolver< T >::checkAxis ( uInt  axis) [private]

 

template<class T>
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

template<class T>
void casa::SepImageConvolver< T >::convolve ( )
template<class T>
Vector<T> casa::SepImageConvolver< T >::getKernel ( uInt  axis)

Get the convolution kernel for the specified axis.

template<class T>
uInt casa::SepImageConvolver< T >::getKernelShape ( uInt  axis)

Get the convolution kernel shape for the specified axis.

template<class T>
Bool casa::SepImageConvolver< T >::isTempImage ( const ImageInterface< Float > *  pIm) const [private]
template<class T>
SepImageConvolver& casa::SepImageConvolver< T >::operator= ( const SepImageConvolver< T > &  other)

Assignment operator.

Uses reference semantics.

template<class T>
void casa::SepImageConvolver< T >::setKernel ( uInt  axis,
const Vector< T > &  kernel 
)

Set convolution kernel vector.

The specified axis is convolved by the given kernel.

template<class T>
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)

template<class T>
void casa::SepImageConvolver< T >::setKernel ( uInt  axis,
VectorKernel::KernelTypes  kernelType,
Double  width,
Bool  autoScale,
Bool  useImageShapeExactly = True,
Double  scale = 1.0 
)
template<class T>
void casa::SepImageConvolver< T >::smoothProfiles ( ImageInterface< T > &  in,
const Int axis,
const Vector< T > &  psf 
) [private]
template<class T>
void casa::SepImageConvolver< T >::zero ( ) [private]

Member Data Documentation

template<class T>
Vector<uInt> casa::SepImageConvolver< T >::itsAxes [private]

Definition at line 149 of file SepImageConvolver.h.

template<class T>
ImageInterface<T>* casa::SepImageConvolver< T >::itsImagePtr [private]

  

Definition at line 147 of file SepImageConvolver.h.

template<class T>
LogIO casa::SepImageConvolver< T >::itsOs [private]

Definition at line 148 of file SepImageConvolver.h.

template<class T>
Bool casa::SepImageConvolver< T >::itsShowProgress [private]

Definition at line 151 of file SepImageConvolver.h.

template<class T>
PtrBlock<Vector<T>* > casa::SepImageConvolver< T >::itsVectorKernels [private]

Definition at line 150 of file SepImageConvolver.h.


The documentation for this class was generated from the following file: