MeVisLabToolboxReference
|
The class to apply morphology based kernel filters to images. More...
#include <mlMorphologyFilter.h>
Public Types | |
enum | MorphologyFilters { ID = 0, DILATION, EROSION, NUM_MORPHOLOGY_FILTERS } |
The following morphology based filters are available to filter an image: More... | |
Public Member Functions | |
MorphologyFilter () | |
Constructor. | |
EnumField * | getMorphologyFilterFld () const |
Access method to the enum field making the morphological filtering algorithm selectable. | |
Static Public Attributes | |
static const char *const | MorphologyFilterNames [] |
String names for morphology based filters. | |
Protected Member Functions | |
virtual void | _userKernelPostUpdate () |
Overload the _userKernelPostUpdate() as subfunctionality of the updateKernel method to guarantee that kernel is reset to 0 in default settings since the morphological operations uses kernel element values to modify grey values under non 0 kernel elements. | |
virtual void | handleNotification (Field *field) |
Called when a parameter field is changed. | |
virtual void | calculateOutputImageProperties (int outIndex) |
Computes the output image properties (e.g. | |
CALC_ROW_H () | |
Macro which needs to be added to the implementation of a class derived from KernelModule or KernelBaseModule . | |
template<typename DATATYPE > | |
void | calcRow (MLsoffset *indexTab, size_t indexTabSize, MLsoffset srcVoxelOffset, size_t numVox, DATATYPE *inCursor, DATATYPE *outCursor, const ImageVector &) |
In this template method the filtering of one row needs to be implemented. |
The class to apply morphology based kernel filters to images.
This class implements some morphology filters.
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 34 of file mlMorphologyFilter.h.
The following morphology based filters are available to filter an image:
If no externel kernel is specified and external kernel usage is enabled then a kernel with the given extend is used and all kernel element values are set to 0 by default. In this case the dilation and erosion filters are simply minimum and maximum operations.
Definition at line 59 of file mlMorphologyFilter.h.
ml::MorphologyFilter::MorphologyFilter | ( | ) |
Constructor.
Initializes the fields, the members and the field connections with the image output.
Note that with the following method calls an additional field interface is created as described in KernelModule
and KernelBaseModule:
_createKernelExtentFields(6)
;_createMakeSphericalField()
;_createImageIntervalFields(0,1024,true,false)
;_createKernelIntervalFields(0,1024,true,false)
;_createExternalKernelFields(true,false)
;_createKernelInfoField()
;_createNumKernelElementsField()
;_createKernelElementsSumField()
;Also available are the fields access methods from KernelBaseModule:
virtual void ml::MorphologyFilter::_userKernelPostUpdate | ( | ) | [protected, virtual] |
Overload the _userKernelPostUpdate() as subfunctionality of the updateKernel method to guarantee that kernel is reset to 0 in default settings since the morphological operations uses kernel element values to modify grey values under non 0 kernel elements.
Reimplemented from ml::KernelModule.
ml::MorphologyFilter::CALC_ROW_H | ( | ) | [protected] |
Macro which needs to be added to the implementation of a class derived from KernelModule
or KernelBaseModule
.
It guarantees that the correct template functions are called for images with any data type. It also overloads calculateOutputSubImage()
of the base class Module
. Note that CALC_ROW_CPP() also needs to be added to the .cpp file.
void ml::MorphologyFilter::calcRow | ( | MLsoffset * | indexTab, |
size_t | indexTabSize, | ||
MLsoffset | srcVoxelOffset, | ||
size_t | numVox, | ||
DATATYPE * | inCursor, | ||
DATATYPE * | outCursor, | ||
const ImageVector & | |||
) | [protected] |
In this 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::MorphologyFilter::calculateOutputImageProperties | ( | int | outIndex | ) | [protected, virtual] |
Computes the output image properties (e.g.
the extents) for output outIndex
. Many changes are already done in the KernelModule, some stuff we still have to do here.
Reimplemented from ml::KernelModule.
EnumField* ml::MorphologyFilter::getMorphologyFilterFld | ( | ) | const [inline] |
Access method to the enum field making the morphological filtering algorithm selectable.
Permitted field values are all MorphologyFilters
without NUM_MORPHOLOGY_FILTERS
. Default is DILATION
.
Definition at line 99 of file mlMorphologyFilter.h.
virtual void ml::MorphologyFilter::handleNotification | ( | Field * | field | ) | [protected, virtual] |
Called when a parameter field is changed.
Reimplemented from ml::KernelModule.
const char* const ml::MorphologyFilter::MorphologyFilterNames[] [static] |
String names for morphology based filters.
Definition at line 70 of file mlMorphologyFilter.h.