MeVisLab Toolbox Reference
mlITKFlatStructElement.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#pragma once
14
17
19#include "mlModuleIncludes.h"
20#include "itkFlatStructuringElement.h"
21
22
23// Be sure that all your modules are part of the ml. So collisions
24// with names in system files or other libraries are minimized.
26
27//----------------------------------------------------------------------------------
29//----------------------------------------------------------------------------------
31
32public:
33
36
38 enum {
39 Box = 0,
44
45 NumFlatStructuringElements
46
47 } FlatStructureElementTypes;
48
50 static const char * const FlatStructuringElementTypeNames[NumFlatStructuringElements];
51
53 template <size_t DIM> const itk::FlatStructuringElement<DIM> &getFlatStructuringElement() const;
54
55protected:
56
58 void activateAttachments() override;
59
61 void handleNotification(Field * field) override;
62
63private:
64
66 BaseField *_outputBaseFld;
67
69 EnumField *_selectElementFld;
70
72 ImageVectorField *_radiusFld;
73
75 IntField *_thicknessFld;
76
78 BoolField *_includeCenterFld;
79
81 IntField *_numLinesFld;
82
84
85 itk::FlatStructuringElement<1> _dim1FlatStructuringElement;
86 itk::FlatStructuringElement<2> _dim2FlatStructuringElement;
87 itk::FlatStructuringElement<3> _dim3FlatStructuringElement;
88 itk::FlatStructuringElement<4> _dim4FlatStructuringElement;
89 itk::FlatStructuringElement<5> _dim5FlatStructuringElement;
90 itk::FlatStructuringElement<6> _dim6FlatStructuringElement;
92
96};
97
98
100
101template<> inline const itk::FlatStructuringElement<1> &ITKFlatStructElement::getFlatStructuringElement<1>() const { return _dim1FlatStructuringElement; };
102template<> inline const itk::FlatStructuringElement<2> &ITKFlatStructElement::getFlatStructuringElement<2>() const { return _dim2FlatStructuringElement; };
103template<> inline const itk::FlatStructuringElement<3> &ITKFlatStructElement::getFlatStructuringElement<3>() const { return _dim3FlatStructuringElement; };
104template<> inline const itk::FlatStructuringElement<4> &ITKFlatStructElement::getFlatStructuringElement<4>() const { return _dim4FlatStructuringElement; };
105template<> inline const itk::FlatStructuringElement<5> &ITKFlatStructElement::getFlatStructuringElement<5>() const { return _dim5FlatStructuringElement; };
106template<> inline const itk::FlatStructuringElement<6> &ITKFlatStructElement::getFlatStructuringElement<6>() const { return _dim6FlatStructuringElement; };
108
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:797
Field to encapsulate a boolean value.
Definition mlFields.h:58
Field to encapsulate an enumerated value.
Definition mlFields.h:195
Base class for all fields used in the ML.
Definition mlField.h:73
ML class to wrap the itkFlatStructElement class in an ML module.
@ Polygon
Creates a Polygon FlatStruturingElement.
@ Annulus
Creates a Annulus FlatStruturingElement.
@ Ball
Creates a Ball FlatStruturingElement.
@ Cross
Creates a Cross FlatStruturingElement.
void handleNotification(Field *field) override
Called on each change of fields in the field container to notify the module about changes.
const itk::FlatStructuringElement< DIM > & getFlatStructuringElement() const
Returns the structuring elements for the corresponding dimension, the implementation is outside the c...
void activateAttachments() override
Called after reload or clones of field values without field notifications.
ITKFlatStructElement()
Constructor.
Field to encapsulate an ML vector ImageVector with 6 integer components.
Definition mlFields.h:1872
Field to encapsulate an integer value.
Definition mlFields.h:126
Base class for an image processing module of the ML.
Definition mlModule.h:151
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
#define MLITK_SUPPORT_EXPORT
When included by other libraries MLITK_SUPPORT_EXPORT is compiled as import symbol.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.