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

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...
 
ImageConvolveroperator= (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...
 

Detailed Description

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

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

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This class handles convolution of images by an casacore::Array or Lattice

Synopsis

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.

Example

Motivation

Convolution is a standard image processing requirement.

To Do

Definition at line 95 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 99 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 ( casacore::LogIO os,
const casacore::CoordinateSystem cSysImage,
const casacore::CoordinateSystem cSysKernel,
casacore::Bool  warnOnly 
) const
private

Check Coordinates of kernel and image.

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

template<class T>
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 
)
template<class T>
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 
)
template<class T>
void casa::ImageConvolver< T >::makeMask ( casacore::ImageInterface< T > &  out,
casacore::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: