casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casa::SepImageConvolver< T > Class Template Reference

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...
 
SepImageConvolveroperator= (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::uIntitsAxes
 
casacore::PtrBlock
< casacore::Vector< T > * > 
itsVectorKernels
 
casacore::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 casacore::Float and casacore::Double types.

Example

Motivation

Separable and non-separable convolution are standard requirements.

To Do

Definition at line 96 of file SepImageConvolver.h.

Constructor & Destructor Documentation

template<class T>
casa::SepImageConvolver< T >::SepImageConvolver ( const casacore::ImageInterface< T > &  image,
casacore::LogIO os,
casacore::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 ( casacore::uInt  axis)
private
template<class T>
void casa::SepImageConvolver< T >::_smoothProfiles ( casacore::ImageInterface< T > &  in,
const casacore::Int axis,
const casacore::Vector< T > &  psf 
)
private
template<class T>
void casa::SepImageConvolver< T >::_zero ( )
private
template<class T>
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

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

Get the convolution kernel for the specified axis.

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

Get the convolution kernel shape for the specified axis.

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 ( casacore::uInt  axis,
const casacore::Vector< T > &  kernel 
)

Set convolution kernel vector.

The specified axis is convolved by the given kernel.

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

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

Member Data Documentation

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

Definition at line 155 of file SepImageConvolver.h.

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

Definition at line 153 of file SepImageConvolver.h.

template<class T>
casacore::LogIO casa::SepImageConvolver< T >::itsOs
private

Definition at line 154 of file SepImageConvolver.h.

template<class T>
casacore::Bool casa::SepImageConvolver< T >::itsShowProgress
private

Definition at line 157 of file SepImageConvolver.h.

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

Definition at line 156 of file SepImageConvolver.h.


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