MeVisLab Toolbox Reference
mlMorphologyFilter.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 
15 
16 #if !defined(__mlMorphologyFilter_H)
17 #define __mlMorphologyFilter_H
18 
19 // ML-includes
20 #include "mlInitSystemKernel.h"
21 #include "mlKernelModule.h"
22 
23 ML_START_NAMESPACE
24 
25  //-------------------------------------------------------------------------
34  //-------------------------------------------------------------------------
36 
37  public:
38 
39  //--------------------------------------------------------------------------------------------------------
59  //--------------------------------------------------------------------------------------------------------
61  ID = 0,
64 
65  NUM_MORPHOLOGY_FILTERS
66  };
67 
68  //-------------------------------------------------------------------
70  //-------------------------------------------------------------------
71  static const char* const MorphologyFilterNames[];
72 
73 
74  //-------------------------------------------------------------------
94  //-------------------------------------------------------------------
96 
100  inline EnumField *getMorphologyFilterFld() const { return _morphologyFilterFld; }
101 
102  protected:
107  void _userKernelPostUpdate() override;
108 
110  void handleNotification(Field* field) override;
111 
114  void calculateOutputImageProperties(int outputIndex, PagedImage* outputImage) override;
115 
122 
125  template <typename DATATYPE>
126  void calcRow(MLsoffset *indexTab,
127  size_t indexTabSize,
128  MLsoffset srcVoxelOffset,
129  size_t numVox,
130  DATATYPE *inCursor,
131  DATATYPE *outCursor,
132  const ImageVector &/*rowStart*/);
133 
134  private:
135 
136  //-------------------------------------------------------------------
139  //-------------------------------------------------------------------
141  EnumField *_morphologyFilterFld;
143 
149  };
150 
151 ML_END_NAMESPACE
152 
153 #endif //of __mlMorphologyFilter_H
154 
155 
Field to encapsulate an enumerated value.
Definition: mlFields.h:363
Base class for all fields used in the ML.
Definition: mlField.h:73
The typically used convenience class to apply a kernel to an image.
The class to apply morphology based kernel filters to images.
void _userKernelPostUpdate() override
Overload the _userKernelPostUpdate() as subfunctionality of the updateKernel method to guarantee that...
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.
MorphologyFilter()
Constructor.
CALC_ROW_H()
Macro which needs to be added to the implementation of a class derived from KernelModule or KernelBas...
EnumField * getMorphologyFilterFld() const
Access method to the enum field making the morphological filtering algorithm selectable.
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Computes the output image properties (e.g.
void handleNotification(Field *field) override
Called when a parameter field is changed.
MorphologyFilters
The following morphology based filters are available to filter an image:
Class which represents an image, which manages properties of an image and image data which is located...
Definition: mlPagedImage.h:70
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
#define MLKERNELEXPORT
Includes files used in many parts of the dll, defined dll-specific macros and controls any system dep...
MLint MLsoffset
Signed ML offset type which is a 32 bit signed integer on 32 bit platforms and a 64 bit integer on 64...
Definition: mlTypeDefs.h:650