#include <SeparableConvolution.h>
Public Types | |
typedef GenericImage< TKernel > | KernelType |
Type of convolution kernel. | |
Public Types inherited from mirtk::ImageToImage< TVoxel > | |
typedef GenericImage< VoxelType > | ImageType |
Input/output image type. | |
typedef TVoxel | VoxelType |
Input/output image voxel type. | |
Public Member Functions | |
bool | CheckKernel (const KernelType *) const |
Check if given kernel is valid. | |
void | Kernel (const KernelType *) |
Set isotropic convolution kernel for all dimensions. | |
virtual void | Run () |
Convolve image. | |
virtual void | RunT () |
Convolve image along t only. | |
virtual void | RunX () |
Convolve image along x only. | |
virtual void | RunY () |
Convolve image along y only. | |
virtual void | RunZ () |
Convolve image along z only. | |
SeparableConvolution (const KernelType *k=nullptr) | |
SeparableConvolution (const KernelType *kx, const KernelType *ky, const KernelType *kz=nullptr, const KernelType *kt=nullptr) | |
~SeparableConvolution () | |
Destructor. | |
Public Member Functions inherited from mirtk::ImageToImage< TVoxel > | |
ImageToImage () | |
Constructor. | |
virtual bool | RequiresBuffering () const |
virtual double | Run (int, int, int, int=0) |
Run filter on single voxel. | |
virtual | ~ImageToImage () |
Destructor. | |
Public Member Functions inherited from mirtk::Object | |
virtual const char * | NameOfClass () const =0 |
Get name of class, which this object is an instance of. | |
virtual ParameterList | Parameter () const |
Get parameter name/value pairs. | |
bool | Parameter (const ParameterList &) |
Set parameters from name/value pairs. | |
virtual bool | Set (const char *name, const char *value) |
virtual | ~Object () |
Destructor. | |
Protected Member Functions | |
virtual void | Finalize () |
Finalize filter. | |
virtual void | Initialize () |
Initialize filter. | |
mirtkPublicAggregateMacro (const KernelType, KernelX) | |
Convolution kernel along x axis. | |
mirtkPublicAggregateMacro (const KernelType, KernelY) | |
Convolution kernel along y axis. | |
mirtkPublicAggregateMacro (const KernelType, KernelZ) | |
Convolution kernel along z axis. | |
mirtkPublicAggregateMacro (const KernelType, KernelT) | |
Convolution kernel along t axis. | |
mirtkPublicAttributeMacro (bool, Normalize) | |
Whether to normalize kernels. | |
mirtkPublicAttributeMacro (bool, UseBackgroundMask) | |
mirtkPublicAttributeMacro (bool, UseBackgroundValue) | |
mirtkPublicAttributeMacro (bool, UsePaddingValue) | |
mirtkPublicAttributeMacro (double, PaddingValue) | |
Padding value. | |
mirtkPublicAttributeMacro (int, Components) | |
Protected Member Functions inherited from mirtk::ImageToImage< TVoxel > | |
void | Initialize (bool) |
mirtkAggregateMacro (ImageType, Buffer) | |
Buffer. | |
mirtkPublicAggregateMacro (const ImageType, Input) | |
Input image for filter. | |
mirtkPublicAggregateMacro (ImageType, Output) | |
Output image for filter. | |
Protected Member Functions inherited from mirtk::Object | |
template<typename... Args> | |
void | Throw (ErrorType err, const char *func, Args... args) const |
Additional Inherited Members | |
Static Public Member Functions inherited from mirtk::Object | |
static const char * | NameOfType () |
Get name of this class type. | |
Static Protected Member Functions inherited from mirtk::Object | |
template<typename... Args> | |
static void | ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args) |
Generic filter for convolution of an image with a separable kernel
Definition at line 34 of file SeparableConvolution.h.
mirtk::SeparableConvolution< TVoxel, TKernel >::SeparableConvolution | ( | const KernelType * | k = nullptr | ) |
Constructor
[in] | k | Isotropic 1D convolution kernel. |
mirtk::SeparableConvolution< TVoxel, TKernel >::SeparableConvolution | ( | const KernelType * | kx, |
const KernelType * | ky, | ||
const KernelType * | kz = nullptr , |
||
const KernelType * | kt = nullptr |
||
) |
Constructor
[in] | kx | Convolution kernel along x axis. |
[in] | ky | Convolution kernel along y axis. |
[in] | kz | Convolution kernel along z axis. |
[in] | kt | Convolution kernel along t axis. |
|
protected |
Whether to truncate convolution at background specified by image mask
When this option is set and the image has a background mask, unmasked values of the convolution sum (i.e., background values) are ignored.
|
protected |
Whether to truncate convolution at input background value if set
This option is ignored when UseBackgroundMask is set and the image has a background mask image set.
|
protected |
Whether to use padding value
This option is ignored when UseBackgroundMask is set and the image has a background mask image set.
When also UseBackground is set, the padding value is used instead when the image has a background value set. Otherwise the padding value is used when this option is turned on.
|
protected |
Number of vector components of input image to convolve
By default, when the input image as temporal voxel size 0, each vector component stored in the temporal dimension is convolved separately. When this attribute is set to a positive value, only the first vector components up to the specified number of components are being convolved, and the output image may have less vector components stored in the temporal dimension than the input image.