MeVisLabToolboxReference
ml::BitMorphologyFilter Class Reference

The class to apply BitMorphology based kernel filters to images. More...

#include <mlBitMorphologyFilter.h>

Inheritance diagram for ml::BitMorphologyFilter:
ml::KernelModule ml::KernelBaseModule ml::Module ml::FieldContainer ml::Base

List of all members.

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.
EnumFieldgetBitMorphologyFilterFld () 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.

Detailed Description

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.


Member Enumeration Documentation

The following BitMorphology based filters are available:

  • ID
    Applies border handling with selected border handling modes but simply copies image to output in defined ares. Useful to compare filter results with input original data where only the filtered area changes.
  • BIT_DILATION
    A binary dilation is applied parallelly to all bit planes.
  • BIT_EROSION
    A binary erosion is applied parallelly to all bit planes.
Enumerator:
ID 
BIT_DILATION 
BIT_EROSION 
NUM_BIT_MORPHOLOGY_FILTERS 

Definition at line 57 of file mlBitMorphologyFilter.h.


Constructor & Destructor Documentation

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:

Also available are the fields access methods from KernelBaseModule:


Member Function Documentation

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.

template<typename DATATYPE >
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.


Member Data Documentation

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.


The documentation for this class was generated from the following file: