casa
5.7.0-16
|
This class does convolution of an image by an casacore::Array or Lattice. More...
#include <ImageConvolver.h>
Public Types | |
enum | ScaleTypes { NONE, AUTOSCALE, SCALE, NTypes } |
Public Member Functions | |
ImageConvolver () | |
Constructor. More... | |
ImageConvolver (const ImageConvolver< T > &other) | |
Copy constructor. More... | |
~ImageConvolver () | |
Destructor. More... | |
ImageConvolver & | operator= (const ImageConvolver< T > &other) |
Assignment operator. More... | |
void | convolve (casacore::LogIO &os, casacore::ImageInterface< T > &imageOut, const casacore::ImageInterface< T > &imageIn, const casacore::ImageInterface< T > &kernel, const ScaleTypes scaleType, const casacore::Double scale, const casacore::Bool copyMiscellaneous, const casacore::Bool warnOnly) |
Convolve by an Image, casacore::Lattice or Array. More... | |
void | convolve (casacore::LogIO &os, casacore::ImageInterface< T > &imageOut, const casacore::ImageInterface< T > &imageIn, const casacore::Lattice< T > &kernel, const ScaleTypes scaleType, const casacore::Double scale, const casacore::Bool copyMiscellaneous) |
void | convolve (casacore::LogIO &os, casacore::ImageInterface< T > &imageOut, const casacore::ImageInterface< T > &imageIn, const casacore::Array< T > &kernel, const ScaleTypes scaleType, const casacore::Double scale, const casacore::Bool copyMiscellaneous) |
Private Member Functions | |
void | makeMask (casacore::ImageInterface< T > &out, casacore::LogIO &os) const |
Make mask for image. More... | |
void | checkCoordinates (casacore::LogIO &os, const casacore::CoordinateSystem &cSysImage, const casacore::CoordinateSystem &cSysKernel, casacore::Bool warnOnly) const |
Check Coordinates of kernel and image. More... | |
This class does convolution of an image by an casacore::Array or Lattice.
Public interface
This class handles convolution of images by an casacore::Array or Lattice
This class convolves an image by a specified kernel (casacore::Array or casacore::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 95 of file ImageConvolver.h.
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 99 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.
|
private |
Check Coordinates of kernel and image.
void casa::ImageConvolver< T >::convolve | ( | casacore::LogIO & | os, |
casacore::ImageInterface< T > & | imageOut, | ||
const casacore::ImageInterface< T > & | imageIn, | ||
const casacore::ImageInterface< T > & | kernel, | ||
const ScaleTypes | scaleType, | ||
const casacore::Double | scale, | ||
const casacore::Bool | copyMiscellaneous, | ||
const casacore::Bool | warnOnly | ||
) |
Convolve by an Image, casacore::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 casacore::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 | ( | casacore::LogIO & | os, |
casacore::ImageInterface< T > & | imageOut, | ||
const casacore::ImageInterface< T > & | imageIn, | ||
const casacore::Lattice< T > & | kernel, | ||
const ScaleTypes | scaleType, | ||
const casacore::Double | scale, | ||
const casacore::Bool | copyMiscellaneous | ||
) |
void casa::ImageConvolver< T >::convolve | ( | casacore::LogIO & | os, |
casacore::ImageInterface< T > & | imageOut, | ||
const casacore::ImageInterface< T > & | imageIn, | ||
const casacore::Array< T > & | kernel, | ||
const ScaleTypes | scaleType, | ||
const casacore::Double | scale, | ||
const casacore::Bool | copyMiscellaneous | ||
) |
|
private |
Make mask for image.
ImageConvolver& casa::ImageConvolver< T >::operator= | ( | const ImageConvolver< T > & | other | ) |
Assignment operator.
Uses reference semantics.