MeVisLabToolboxReference
|
The class to apply rank based kernel filters images. More...
#include <mlRankFilter.h>
Public Types | |
enum | RankFilterTypes { ID = 0, RANK_FILTER, MIN_FILTER, MEDIAN_FILTER, MAX_FILTER, RANK_INDEX, NUM_RANK_FILTER_TYPES } |
The following rank based filters are available to filter line in an image: More... | |
Public Member Functions | |
RankFilter () | |
Constructor. | |
Fields to specify the filter algorithm and the rank. | |
EnumField * | getRankFilterFld () |
Specifies the rank based filter algorithm. Default is mlMedian. | |
IntField * | getRankFld () |
Specifies the rank level for the 'Rank' algorithm. Default is 0. | |
Static Public Attributes | |
static const char *const | RankFilterNames [] |
Strings names for rank based filters. | |
Protected Member Functions | |
void | calculateOutputImageProperties (int outIndex) |
Computes the output image properties (e.g. the extents) for output outIndex . | |
virtual void | handleNotification (Field *field) |
Called when a parameter field is changed. | |
virtual void | activateAttachments () |
Called when loading has finished. | |
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. |
The class to apply rank based kernel filters images.
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 36 of file mlRankFilter.h.
The following rank based filters are available to filter line in an image:
ID
RANK_FILTER
rankFld
. If that one does not exist then the nearest one is used.MIN_FILTER
MEDIAN_FILTER
MAX_FILTER
RANK_INDEX
RANK_INDEX:
computes the index of value of the current point in the sorted list of points under the kernel. In case some points have equal value the parameter rank is treated as a percentage parameter and we return floor (0.5+ smallest index plus rank / 100 *(higest - smallest index)) intended to identify e.g. local minima or maxima Definition at line 93 of file mlRankFilter.h.
ml::RankFilter::RankFilter | ( | ) |
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()
;Also available are the fields access methods from KernelBaseModule:
virtual void ml::RankFilter::activateAttachments | ( | ) | [protected, virtual] |
Called when loading has finished.
It's necessary to update the current module state to the field state.
Reimplemented from ml::KernelModule.
ml::RankFilter::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::RankFilter::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.
void ml::RankFilter::calculateOutputImageProperties | ( | int | outIndex | ) | [protected, virtual] |
Computes the output image properties (e.g. the extents) for output outIndex
.
Reimplemented from ml::KernelModule.
EnumField* ml::RankFilter::getRankFilterFld | ( | ) | [inline] |
Specifies the rank based filter algorithm. Default is mlMedian.
Definition at line 135 of file mlRankFilter.h.
IntField* ml::RankFilter::getRankFld | ( | ) | [inline] |
Specifies the rank level for the 'Rank' algorithm. Default is 0.
Definition at line 138 of file mlRankFilter.h.
virtual void ml::RankFilter::handleNotification | ( | Field * | field | ) | [protected, virtual] |
Called when a parameter field is changed.
Reimplemented from ml::KernelModule.
const char* const ml::RankFilter::RankFilterNames[] [static] |
Strings names for rank based filters.
Definition at line 107 of file mlRankFilter.h.