MeVisLabToolboxReference
ml::ExtConvolutionFilter Class Reference

This class implements different convolution filters with changeable kernel sizes. More...

#include <mlExtConvolutionFilter.h>

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

List of all members.

Public Types

enum  KernelType { AVERAGE_KERNEL = 0, GAUSS_KERNEL, ID_KERNEL, NUM_KERNEL_TYPES }
 The mlKernelTypes decide which kernel is used to filter the input image. More...

Public Member Functions

 ExtConvolutionFilter ()
 Constructor.
EnumFieldgetKernelTypeFld ()
 Access method to parameter field(s). See _kernelTypeFld for more infos.

Static Public Attributes

static const char *const mlKernelTypeNames []
 Strings for mlCustomKernelNames.

Protected Member Functions

virtual void handleNotification (Field *field)
 Called when a parameter field is changed.
virtual void _userKernelPostUpdate ()
 We update the kernel to the new field state by hand, i.e.
virtual void calculateOutputImageProperties (int outIndex)
 Computes the output image properties from the input image properties.
 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.

Detailed Description

This class implements different convolution filters with changeable kernel sizes.

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


Member Enumeration Documentation

The mlKernelTypes decide which kernel is used to filter the input image.

  • AVERAGE_KERNEL
    All elements of this kernel have normalized and equal coefficents.
  • GAUSS_KERNEL
    All kernel elements are given by a gauss function.
  • ID_KERNEL
    Applies a zero kernel with a 1 as central voxel so that input and output image are identical.
Enumerator:
AVERAGE_KERNEL 
GAUSS_KERNEL 
ID_KERNEL 
NUM_KERNEL_TYPES 

Definition at line 54 of file mlExtConvolutionFilter.h.


Constructor & Destructor Documentation

ml::ExtConvolutionFilter::ExtConvolutionFilter ( )

Constructor.

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

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

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

We update the kernel to the new field state by hand, i.e.

we use the postUpdate method.

Reimplemented from ml::KernelModule.

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

virtual void ml::ExtConvolutionFilter::calculateOutputImageProperties ( int  outIndex) [protected, virtual]

Computes the output image properties from the input image properties.

Reimplemented from ml::KernelModule.

EnumField* ml::ExtConvolutionFilter::getKernelTypeFld ( ) [inline]

Access method to parameter field(s). See _kernelTypeFld for more infos.

Definition at line 90 of file mlExtConvolutionFilter.h.

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

Called when a parameter field is changed.

Reimplemented from ml::KernelModule.


Member Data Documentation

const char* const ml::ExtConvolutionFilter::mlKernelTypeNames[] [static]

Strings for mlCustomKernelNames.

Definition at line 65 of file mlExtConvolutionFilter.h.


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