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

This class does convolution of an image by an Array or Lattice. More...

#include <ImageConvolver.h>

List of all members.

Public Types

enum  ScaleTypes {
  NONE,
  AUTOSCALE,
  SCALE,
  NTypes
}

Public Member Functions

 ImageConvolver ()
 Constructor.
 ImageConvolver (const ImageConvolver< T > &other)
 Copy constructor.
 ~ImageConvolver ()
 Destructor.
ImageConvolveroperator= (const ImageConvolver< T > &other)
 Assignment operator.
void convolve (LogIO &os, ImageInterface< T > &imageOut, const ImageInterface< T > &imageIn, const ImageInterface< T > &kernel, const ScaleTypes scaleType, const Double scale, const Bool copyMiscellaneous, const Bool warnOnly)
 Convolve by an Image, Lattice or Array.
void convolve (LogIO &os, ImageInterface< T > &imageOut, const ImageInterface< T > &imageIn, const Lattice< T > &kernel, const ScaleTypes scaleType, const Double scale, const Bool copyMiscellaneous)
void convolve (LogIO &os, ImageInterface< T > &imageOut, const ImageInterface< T > &imageIn, const Array< T > &kernel, const ScaleTypes scaleType, const Double scale, const Bool copyMiscellaneous)

Private Member Functions

void makeMask (ImageInterface< T > &out, LogIO &os) const
 
 

void checkCoordinates (LogIO &os, const CoordinateSystem &cSysImage, const CoordinateSystem &cSysKernel, Bool warnOnly) const
 Check Coordinates of kernel and image.

Detailed Description

template<class T>
class casa::ImageConvolver< T >

This class does convolution of an image by an Array or Lattice.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This class handles convolution of images by an Array or Lattice

Synopsis

This class convolves an image by a specified kernel (Array or Lattice). If the kernel does not have enough dimensions, degenerate ones are added.The class object has no state. The functions could be static. The convolution is done via FFT. Thus input pixels which are masked are set to 0 before the convolution. The mask is transferred to the output image. No additional scaling of the output image values is done.

Example

Motivation

Convolution is a standard image processing requirement.

To Do

Definition at line 91 of file ImageConvolver.h.


Member Enumeration Documentation

template<class T>
enum casa::ImageConvolver::ScaleTypes
Enumerator:
NONE 

None; neither autoscaling nor direct scaling.

AUTOSCALE 

Autoscale (normalize kernel to unit sum)

SCALE 

SCALE (apply given scale factor)

NTypes 

Number.

Definition at line 95 of file ImageConvolver.h.


Constructor & Destructor Documentation

template<class T>
casa::ImageConvolver< T >::ImageConvolver ( )

Constructor.

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

Copy constructor.

Uses reference semantics.

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

Destructor.


Member Function Documentation

template<class T>
void casa::ImageConvolver< T >::checkCoordinates ( LogIO os,
const CoordinateSystem cSysImage,
const CoordinateSystem cSysKernel,
Bool  warnOnly 
) const [private]

Check Coordinates of kernel and image.

template<class T>
void casa::ImageConvolver< T >::convolve ( LogIO os,
ImageInterface< T > &  imageOut,
const ImageInterface< T > &  imageIn,
const ImageInterface< T > &  kernel,
const ScaleTypes  scaleType,
const Double  scale,
const Bool  copyMiscellaneous,
const Bool  warnOnly 
)

Convolve by an Image, Lattice or Array.

If convolving by an image some rudimentary coordinate checks are made and warnings optionally issued (warnOnly) if things are not commensurate. If the output image needs a mask and doesn't have one, it will be given one if possible. The input mask is transferred to the output. The miscInfo, imageInfo, units and logger will be copied from the input to the output unless you indicate not to (copyMiscellaneous). Any restoring beam is deleted from the output image ImageInfo object. The input CoordinateSystem is transferred to the output image. Degenerate axes are added to the kernel if it does not have enough dimensions. If autoScale is true, the kernel is normalized to have unit sum. Otherwise, the kernel is scaled (multiplied) by the value scale

template<class T>
void casa::ImageConvolver< T >::convolve ( LogIO os,
ImageInterface< T > &  imageOut,
const ImageInterface< T > &  imageIn,
const Lattice< T > &  kernel,
const ScaleTypes  scaleType,
const Double  scale,
const Bool  copyMiscellaneous 
)
template<class T>
void casa::ImageConvolver< T >::convolve ( LogIO os,
ImageInterface< T > &  imageOut,
const ImageInterface< T > &  imageIn,
const Array< T > &  kernel,
const ScaleTypes  scaleType,
const Double  scale,
const Bool  copyMiscellaneous 
)
template<class T>
void casa::ImageConvolver< T >::makeMask ( ImageInterface< T > &  out,
LogIO os 
) const [private]

 

Make mask for image

template<class T>
ImageConvolver& casa::ImageConvolver< T >::operator= ( const ImageConvolver< T > &  other)

Assignment operator.

Uses reference semantics.


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