casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Static Public Member Functions
casa::VectorKernel Class Reference

Make a Vector smoothing kernel from a kernel specification. More...

#include <VectorKernel.h>

List of all members.

Public Types

enum  KernelTypes {
  BOXCAR,
  GAUSSIAN,
  HANNING,
  NKERNELS
}

Static Public Member Functions

static Vector< Doublemake (KernelTypes kernelType, Double width, uInt shape, Bool useShapeExactly, Bool peakIsUnity=False)
 Create kernel vector for width in pixels.
static Vector< Floatmake (KernelTypes kernelType, Float width, uInt shape, Bool useShapeExactly, Bool peakIsUnity=False)
static Vector< InttoKernelTypes (const String &kernels, const Regex &delimiter)
 
Helper function to convert a string containing a list of desired smoothed kernel types

to the correct Vector<Int> required for the setSmooth function.

static Vector< InttoKernelTypes (const Vector< String > &kernels)
static VectorKernel::KernelTypes toKernelType (const String &kernel)
static String fromKernelType (KernelTypes kernelType)

Detailed Description

Make a Vector smoothing kernel from a kernel specification.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Returns a vector from a smoothing kernel specification.

Synopsis

This class takes a smoothing kernel type and a width, and generates a Vector holding that kernel. It can be used in conjunction with the separable image convolver, SepImageConvolver

The kernels can be normalized so that the peak of the kernel is 1, or 1/area under the kernel. The latter ensures conservation of integrated pixel value (the usual jargon is conservation of flux for images) and is the default.

Example

Motivation

To Do

Definition at line 85 of file VectorKernel.h.


Member Enumeration Documentation

Enumerator:
BOXCAR 

Box-car smoothing kernel.

GAUSSIAN 

Gaussian smoothing kernel.

HANNING 

Hanning smoothing kernel.

NKERNELS 

Definition at line 89 of file VectorKernel.h.


Member Function Documentation

static String casa::VectorKernel::fromKernelType ( KernelTypes  kernelType) [static]
static Vector<Double> casa::VectorKernel::make ( KernelTypes  kernelType,
Double  width,
uInt  shape,
Bool  useShapeExactly,
Bool  peakIsUnity = False 
) [static]

Create kernel vector for width in pixels.

For Gaussian, width is FWHM, for Boxcar, width is full width. For Hanning width is ignored (always 3) If useShapeExactly is True, the provided shape is used exactly. If useShapeExactly is False, the kernel length will be the max of the provided shape and an autoestimate (e.g. from +/- 5sigma limits for a Gaussian). The output shape is always 3 for Hanning.

static Vector<Float> casa::VectorKernel::make ( KernelTypes  kernelType,
Float  width,
uInt  shape,
Bool  useShapeExactly,
Bool  peakIsUnity = False 
) [static]
static Vector<Int> casa::VectorKernel::toKernelTypes ( const String kernels,
const Regex delimiter 
) [static]

Helper function to convert a string containing a list of desired smoothed kernel types

to the correct Vector<Int> required for the setSmooth function.

This may be usful if your user interface involves strings rather than integers. A new value is added to the output vector (which is resized appropriately) if any of the substrings "boxcar", "gaussian" or "hanning" (actually "box", "gauss", and "hann" will do) is present.

static Vector<Int> casa::VectorKernel::toKernelTypes ( const Vector< String > &  kernels) [static]

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