MeVisLabToolboxReference
|
The class to apply BitMorphology based kernel filters to images. More...
#include <mlBitMorphologyFilter.h>
Public Types | |
enum | BitMorphologyFilterTypes { ID = 0, BIT_DILATION, BIT_EROSION, NUM_BIT_MORPHOLOGY_FILTERS } |
The following BitMorphology based filters are available: More... | |
Public Member Functions | |
BitMorphologyFilter () | |
Constructor. | |
EnumField * | getBitMorphologyFilterFld () const |
Access method to the enum field managing the binary morphological filtering algorithm. | |
Static Public Attributes | |
static const char *const | BitMorphologyFilterNames [NUM_BIT_MORPHOLOGY_FILTERS] |
Strings names for BitMorphology based filters. | |
Protected Member Functions | |
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 BitMorphology based kernel filters to images.
This class implements some morphology filtering on binary image planes. It can operate only on integer images; if another image data type is connected then it will automatically be casted to an integer type if an integer type with sufficient min/max range can be found. If not then the output image will be invalidated.
For related code and more information see mlKernelExample.h
, mlKernel.h
, mlKernelBaseModule.h
, mlKernelModule.h
, mlKernelEditor.h
, mlRankFilter.h
, mlExtConvolutionFilter.h
and mlConvolutionFilter.h
.
Definition at line 38 of file mlBitMorphologyFilter.h.
The following BitMorphology based filters are available:
ID
BIT_DILATION
BIT_EROSION
Definition at line 57 of file mlBitMorphologyFilter.h.
ml::BitMorphologyFilter::BitMorphologyFilter | ( | ) |
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()
;_createExternalKernelFields
(true,false);_createKernelInfoField()
;_createNumKernelElementsField()
;Also available are the fields access methods from KernelBaseModule:
ml::BitMorphologyFilter::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::BitMorphologyFilter::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. For parameter documentation see class KernelModule
, mlKernelMacros.h
and especially the documentation of mlKernelExample.h
.
virtual void ml::BitMorphologyFilter::calculateOutputImageProperties | ( | int | outIndex | ) | [protected, virtual] |
Computes the output image properties (e.g.
the extents) for output outIndex
. The bit morphology operations are only sensible on integer images; if another image data type is connected then it will automatically be casted to an integer type if an integer type with sufficient min/max range can be found. If not then the output image will be invalidated.
Reimplemented from ml::KernelModule.
EnumField* ml::BitMorphologyFilter::getBitMorphologyFilterFld | ( | ) | const [inline] |
Access method to the enum field managing the binary morphological filtering algorithm.
Permitted field values are all enums from BitMorphologyFilterTypes
without NUM_BIT_MORPHOLOGY_FILTERS
. Default is BIT_DILATION
.
Definition at line 91 of file mlBitMorphologyFilter.h.
virtual void ml::BitMorphologyFilter::handleNotification | ( | Field * | field | ) | [protected, virtual] |
Called when a parameter field is changed.
Reimplemented from ml::KernelModule.
const char* const ml::BitMorphologyFilter::BitMorphologyFilterNames[NUM_BIT_MORPHOLOGY_FILTERS] [static] |
Strings names for BitMorphology based filters.
Definition at line 66 of file mlBitMorphologyFilter.h.