casacore
|
#include <VectorKernel.h>
Public Types | |
enum | KernelTypes { BOXCAR , GAUSSIAN , HANNING , NKERNELS } |
Static Public Member Functions | |
static Vector< Double > | make (KernelTypes kernelType, Double width, uInt shape, Bool useShapeExactly, Bool peakIsUnity=False) |
Create kernel vector for width in pixels. More... | |
static Vector< Float > | make (KernelTypes kernelType, Float width, uInt shape, Bool useShapeExactly, Bool peakIsUnity=False) |
static Vector< Int > | toKernelTypes (const String &kernels, const std::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. More... | |
static Vector< Int > | toKernelTypes (const Vector< String > &kernels) |
static VectorKernel::KernelTypes | toKernelType (const String &kernel) |
static String | fromKernelType (KernelTypes kernelType) |
Make a Vector smoothing kernel from a kernel specification
Public interface
Returns a vector from a smoothing kernel specification.
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.
Definition at line 84 of file VectorKernel.h.
Enumerator | |
---|---|
BOXCAR | Box-car smoothing kernel. |
GAUSSIAN | Gaussian smoothing kernel. |
HANNING | Hanning smoothing kernel. |
NKERNELS |
Definition at line 88 of file VectorKernel.h.
|
static |
|
static |
Create kernel vector for width in pixels.
For Gaussian, width is FWHM, for Boxcar, width is full width. For Hanning width is ignored. 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).
|
static |
|
static |
|
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.