MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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{
32
33public:
36
38 enum {
39 Box = 0,
44
45 NumFlatStructuringElements
46
47 } FlatStructureElementTypes;
48
50 static const char* const FlatStructuringElementTypeNames[NumFlatStructuringElements];
51
54 template <size_t DIM> const itk::FlatStructuringElement<DIM>& getFlatStructuringElement() const;
55
56protected:
58 void activateAttachments() override;
59
62
63private:
65 BaseField* _outputBaseFld;
66
68 EnumField* _selectElementFld;
69
71 ImageVectorField* _radiusFld;
72
74 IntField* _thicknessFld;
75
77 BoolField* _includeCenterFld;
78
80 IntField* _numLinesFld;
81
83
84 itk::FlatStructuringElement<1> _dim1FlatStructuringElement;
85 itk::FlatStructuringElement<2> _dim2FlatStructuringElement;
86 itk::FlatStructuringElement<3> _dim3FlatStructuringElement;
87 itk::FlatStructuringElement<4> _dim4FlatStructuringElement;
88 itk::FlatStructuringElement<5> _dim5FlatStructuringElement;
89 itk::FlatStructuringElement<6> _dim6FlatStructuringElement;
91
95};
96
97
100
101template <> inline const itk::FlatStructuringElement<1>& ITKFlatStructElement::getFlatStructuringElement<1>() const
102{
103 return _dim1FlatStructuringElement;
104};
105template <> inline const itk::FlatStructuringElement<2>& ITKFlatStructElement::getFlatStructuringElement<2>() const
106{
107 return _dim2FlatStructuringElement;
108};
109template <> inline const itk::FlatStructuringElement<3>& ITKFlatStructElement::getFlatStructuringElement<3>() const
110{
111 return _dim3FlatStructuringElement;
112};
113template <> inline const itk::FlatStructuringElement<4>& ITKFlatStructElement::getFlatStructuringElement<4>() const
114{
115 return _dim4FlatStructuringElement;
116};
117template <> inline const itk::FlatStructuringElement<5>& ITKFlatStructElement::getFlatStructuringElement<5>() const
118{
119 return _dim5FlatStructuringElement;
120};
121template <> inline const itk::FlatStructuringElement<6>& ITKFlatStructElement::getFlatStructuringElement<6>() const
122{
123 return _dim6FlatStructuringElement;
124};
126
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:813
Field to encapsulate a boolean value.
Definition mlFields.h:56
Field to encapsulate an enumerated value.
Definition mlFields.h:185
Base class for all fields used in the ML.
Definition mlField.h:73
ML class to wrap the itkFlatStructElement class in an ML module.
void handleNotification(Field *field) override
Called on each change of fields in the field container to notify the module about changes.
@ Polygon
Creates a Polygon FlatStruturingElement.
@ Annulus
Creates a Annulus FlatStruturingElement.
@ Ball
Creates a Ball FlatStruturingElement.
@ Cross
Creates a Cross FlatStruturingElement.
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 six integer components.
Definition mlFields.h:2017
Field to encapsulate an integer value.
Definition mlFields.h:123
Base class for an image processing module of the ML.
Definition mlModule.h:150
#define ML_MODULE_CLASS_HEADER(className)
Similar to 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.