MeVisLabToolboxReference
ml::SurroundFilter Class Reference

Class to cover an object specified by a threshold with a voxel thick surface of selected values. More...

#include <mlSurroundFilter.h>

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

List of all members.

Public Types

enum  DimensionSelect { USE2D = 0, USE3D, NUM_DIMENSION_SELECTS }
 Enum to select between 2D and 3D surround operation. More...
enum  Neighbourhood2DSelect { USE4 = 0, USE8, NUM_NEIGHBOURHOOD_2D_SELECTS }
 Enum to select 4 or 8-neighbourhood in 2D. More...
enum  Neighbourhood3DSelect { USE6 = 0, USE18, USE26, NUM_NEIGHBOURHOOD_3D_SELECTS }
 Enum to select 6, 18 or 8-neighbourhood in 3D. More...
enum  BorderLocation { SET_INNER_BORDER = 0, SET_OUTER_BORDER, SET_BOTH_BORDERS, NUM_BORDER_LOCATIONS }
 Enum to specifiy whether inner, outer or both borders shall be written into the output image. More...

Public Member Functions

 SurroundFilter ()
 Constructor.
Field access. Refer to field documentation for more infos.
EnumFieldgetDimensionSelectFld () const
EnumFieldgetNeighbourhood2DSelectFld () const
EnumFieldgetNeighbourhood3DSelectFld () const
EnumFieldgetBorderLocationFld () const
DoubleFieldgetOuterBorderValueFld () const
DoubleFieldgetInnerBorderValueFld () const
DoubleFieldgetLowerThresholdFld () const
DoubleFieldgetUpperThresholdFld () const
BoolFieldgetOnlyBorderFld () const
BoolFieldgetTakeMaxFld () const
BoolFieldgetTakeMiddleFld () const

Static Public Attributes

static const char *const DimensionSelectNames []
 Strings corresponding to the DimensionSelect enum.
static const char *const Neighbourhood2DSelectNames []
 Strings corresponding to the Neighbourhood2DSelect enum.
static const char *const Neighbourhood3DSelectNames []
 Strings corresponding to the Neighbourhood3DSelect enum.
static const char *const BorderLocationNames []
 Strings corresponding to the Neighbourhood3DSelect enum.

Protected Member Functions

 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, size_t numVox, DATATYPE *inCursor, DATATYPE *outCursor, const ImageVector &)
 In this virtual template method the filtering of one row needs to be implemented.
virtual void handleNotification (Field *field)
 Called when a parameter field is changed.
virtual void calculateOutputImageProperties (int outIndex)
 Computes the output image properties from the input image properties.
virtual void _userKernelPostUpdate ()
 Typical method to be overloaded by derived modules to apply kernel changes.

Detailed Description

Class to cover an object specified by a threshold with a voxel thick surface of selected values.

Module to cover an object specified by a threshold interval inside, outside or both with a one-voxel surface of selected values.

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 mlSurroundFilter.h.


Member Enumeration Documentation

Enum to specifiy whether inner, outer or both borders shall be written into the output image.

Enumerator:
SET_INNER_BORDER 
SET_OUTER_BORDER 
SET_BOTH_BORDERS 
NUM_BORDER_LOCATIONS 

Definition at line 85 of file mlSurroundFilter.h.

Enum to select between 2D and 3D surround operation.

Enumerator:
USE2D 
USE3D 
NUM_DIMENSION_SELECTS 

Definition at line 44 of file mlSurroundFilter.h.

Enum to select 4 or 8-neighbourhood in 2D.

Enumerator:
USE4 
USE8 
NUM_NEIGHBOURHOOD_2D_SELECTS 

Definition at line 57 of file mlSurroundFilter.h.

Enum to select 6, 18 or 8-neighbourhood in 3D.

Enumerator:
USE6 
USE18 
USE26 
NUM_NEIGHBOURHOOD_3D_SELECTS 

Definition at line 70 of file mlSurroundFilter.h.


Constructor & Destructor Documentation

ml::SurroundFilter::SurroundFilter ( )

Constructor.

Initializes the fields, the members and the field connections with the field container.

Also available are the fields access methods from KernelBaseModule:


Member Function Documentation

virtual void ml::SurroundFilter::_userKernelPostUpdate ( ) [protected, virtual]

Typical method to be overloaded by derived modules to apply kernel changes.

This method is called by _updateKernel(permitExtentChanges) to supply a method where the application can change the kernel AFTER all automatic changes and BEFORE the output kernel fields, the _kernelInfoFld, the _numKernelElementsFld and the _kernelElementSumFld are updated. See _updateKernel(permitExtentChanges) for more Infos.

Reimplemented from ml::KernelModule.

ml::SurroundFilter::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.

template<typename DATATYPE >
void ml::SurroundFilter::calcRow ( MLsoffset indexTab,
size_t  indexTabSize,
MLsoffset  ,
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::SurroundFilter::calculateOutputImageProperties ( int  outIndex) [protected, virtual]

Computes the output image properties from the input image properties.

Reimplemented from ml::KernelModule.

EnumField* ml::SurroundFilter::getBorderLocationFld ( ) const [inline]

Definition at line 116 of file mlSurroundFilter.h.

EnumField* ml::SurroundFilter::getDimensionSelectFld ( ) const [inline]

Definition at line 113 of file mlSurroundFilter.h.

DoubleField* ml::SurroundFilter::getInnerBorderValueFld ( ) const [inline]

Definition at line 118 of file mlSurroundFilter.h.

DoubleField* ml::SurroundFilter::getLowerThresholdFld ( ) const [inline]

Definition at line 119 of file mlSurroundFilter.h.

EnumField* ml::SurroundFilter::getNeighbourhood2DSelectFld ( ) const [inline]

Definition at line 114 of file mlSurroundFilter.h.

EnumField* ml::SurroundFilter::getNeighbourhood3DSelectFld ( ) const [inline]

Definition at line 115 of file mlSurroundFilter.h.

BoolField* ml::SurroundFilter::getOnlyBorderFld ( ) const [inline]

Definition at line 121 of file mlSurroundFilter.h.

DoubleField* ml::SurroundFilter::getOuterBorderValueFld ( ) const [inline]

Definition at line 117 of file mlSurroundFilter.h.

BoolField* ml::SurroundFilter::getTakeMaxFld ( ) const [inline]

Definition at line 122 of file mlSurroundFilter.h.

BoolField* ml::SurroundFilter::getTakeMiddleFld ( ) const [inline]

Definition at line 123 of file mlSurroundFilter.h.

DoubleField* ml::SurroundFilter::getUpperThresholdFld ( ) const [inline]

Definition at line 120 of file mlSurroundFilter.h.

virtual void ml::SurroundFilter::handleNotification ( Field field) [protected, virtual]

Called when a parameter field is changed.

Reimplemented from ml::KernelModule.


Member Data Documentation

const char* const ml::SurroundFilter::BorderLocationNames[] [static]

Strings corresponding to the Neighbourhood3DSelect enum.

Definition at line 94 of file mlSurroundFilter.h.

const char* const ml::SurroundFilter::DimensionSelectNames[] [static]

Strings corresponding to the DimensionSelect enum.

Definition at line 52 of file mlSurroundFilter.h.

const char* const ml::SurroundFilter::Neighbourhood2DSelectNames[] [static]

Strings corresponding to the Neighbourhood2DSelect enum.

Definition at line 65 of file mlSurroundFilter.h.

const char* const ml::SurroundFilter::Neighbourhood3DSelectNames[] [static]

Strings corresponding to the Neighbourhood3DSelect enum.

Definition at line 79 of file mlSurroundFilter.h.


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