casa
$Rev:20696$
|
This class does convolution of an image by an Array or Lattice. More...
#include <ImageConvolver.h>
Public Types | |
enum | ScaleTypes { NONE, AUTOSCALE, SCALE, NTypes } |
Public Member Functions | |
ImageConvolver () | |
Constructor. | |
ImageConvolver (const ImageConvolver< T > &other) | |
Copy constructor. | |
~ImageConvolver () | |
Destructor. | |
ImageConvolver & | operator= (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. |
This class does convolution of an image by an Array or Lattice.
Public interface
This class handles convolution of images by an Array or Lattice
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.
Convolution is a standard image processing requirement.
Definition at line 91 of file ImageConvolver.h.
enum casa::ImageConvolver::ScaleTypes |
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.
casa::ImageConvolver< T >::ImageConvolver | ( | ) |
Constructor.
casa::ImageConvolver< T >::ImageConvolver | ( | const ImageConvolver< T > & | other | ) |
Copy constructor.
Uses reference semantics.
casa::ImageConvolver< T >::~ImageConvolver | ( | ) |
Destructor.
void casa::ImageConvolver< T >::checkCoordinates | ( | LogIO & | os, |
const CoordinateSystem & | cSysImage, | ||
const CoordinateSystem & | cSysKernel, | ||
Bool | warnOnly | ||
) | const [private] |
Check Coordinates of kernel and image.
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
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 | ||
) |
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 | ||
) |
void casa::ImageConvolver< T >::makeMask | ( | ImageInterface< T > & | out, |
LogIO & | os | ||
) | const [private] |
Make mask for image
ImageConvolver& casa::ImageConvolver< T >::operator= | ( | const ImageConvolver< T > & | other | ) |
Assignment operator.
Uses reference semantics.