MeVisLabToolboxReference
|
This class implements different convolution filters with changeable kernel sizes. More...
#include <mlExtConvolutionFilter.h>
Public Types | |
enum | KernelType { AVERAGE_KERNEL = 0, GAUSS_KERNEL, ID_KERNEL, NUM_KERNEL_TYPES } |
The mlKernelTypes decide which kernel is used to filter the input image. More... | |
Public Member Functions | |
ExtConvolutionFilter () | |
Constructor. | |
EnumField * | getKernelTypeFld () |
Access method to parameter field(s). See _kernelTypeFld for more infos. | |
Static Public Attributes | |
static const char *const | mlKernelTypeNames [] |
Strings for mlCustomKernelNames. | |
Protected Member Functions | |
virtual void | handleNotification (Field *field) |
Called when a parameter field is changed. | |
virtual void | _userKernelPostUpdate () |
We update the kernel to the new field state by hand, i.e. | |
virtual void | calculateOutputImageProperties (int outIndex) |
Computes the output image properties from the input image properties. | |
CALC_ROW_H () | |
The implementation of the calculateOutputSubImage() method overloaded from Module is done in this macro. | |
template<typename DATATYPE > | |
void | calcRow (MLsoffset *indexTab, size_t indexTabSize, MLsoffset srcVoxelOffset, size_t numVox, DATATYPE *inCursor, DATATYPE *outCursor, const ImageVector &) |
In this virtual template method the filtering of one row needs to be implemented. |
This class implements different convolution filters with changeable kernel sizes.
For related code and more information see mlKernelExample.h
, mlKernel.h
, mlKernelBaseModule.h
, mlKernelModule.h
, mlKernelEditor.h
, mlRankFilter.h
, mlExtConvolutionFilter.h
, mlKernelMacros
, mlKernelTools.h
and mlConvolutionFilter.h
.
Definition at line 37 of file mlExtConvolutionFilter.h.
The mlKernelTypes decide which kernel is used to filter the input image.
AVERAGE_KERNEL
GAUSS_KERNEL
ID_KERNEL
Definition at line 54 of file mlExtConvolutionFilter.h.
ml::ExtConvolutionFilter::ExtConvolutionFilter | ( | ) |
Constructor.
Initializes the fields, the members and the field connections with the field container.
Note that with the following method calls an additional field interface is created as described in KernelModule
and KernelBaseModule:
_createKernelExtentFields
(6, ImageVector(3,3,1,1,1,1));_createMakeSphericalField
(false);_createImageIntervalFields
(0, 1024, true, false);_createKernelIntervalFields
(1, 4095, true, false);_createKernelInfoField()
;_createNumKernelElementsField()
;_createKernelElementsSumField()
;Also available are the fields access methods from KernelBaseModule:
virtual void ml::ExtConvolutionFilter::_userKernelPostUpdate | ( | ) | [protected, virtual] |
We update the kernel to the new field state by hand, i.e.
we use the postUpdate method.
Reimplemented from ml::KernelModule.
ml::ExtConvolutionFilter::CALC_ROW_H | ( | ) | [protected] |
The implementation of the calculateOutputSubImage() method overloaded from Module
is done in this macro.
It implements page border handling and a dispatcher to call the correct template version of calcRow()
with the correct parameters. Note that CALC_ROW_CPP() also needs to be added in the .cpp file.
void ml::ExtConvolutionFilter::calcRow | ( | MLsoffset * | indexTab, |
size_t | indexTabSize, | ||
MLsoffset | srcVoxelOffset, | ||
size_t | numVox, | ||
DATATYPE * | inCursor, | ||
DATATYPE * | outCursor, | ||
const ImageVector & | |||
) | [protected] |
In this virtual template method the filtering of one row needs to be implemented.
It will be called by the CALC_ROW_H()
/ CALC_ROW_CPP()
macro.
virtual void ml::ExtConvolutionFilter::calculateOutputImageProperties | ( | int | outIndex | ) | [protected, virtual] |
Computes the output image properties from the input image properties.
Reimplemented from ml::KernelModule.
EnumField* ml::ExtConvolutionFilter::getKernelTypeFld | ( | ) | [inline] |
Access method to parameter field(s). See _kernelTypeFld
for more infos.
Definition at line 90 of file mlExtConvolutionFilter.h.
virtual void ml::ExtConvolutionFilter::handleNotification | ( | Field * | field | ) | [protected, virtual] |
Called when a parameter field is changed.
Reimplemented from ml::KernelModule.
const char* const ml::ExtConvolutionFilter::mlKernelTypeNames[] [static] |
Strings for mlCustomKernelNames.
Definition at line 65 of file mlExtConvolutionFilter.h.