MeVisLab Toolbox Reference
mlSobel3DFilter.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(__mlSobel3DFilter_H)
17#define __mlSobel3DFilter_H
18
19// ML-includes
20#include "mlInitSystemKernel.h"
21#include "mlKernel.h"
22#include "mlKernelModule.h"
23
24ML_START_NAMESPACE
25
26 //--------------------------------------------------------------------------------
34 //--------------------------------------------------------------------------------
36
37 public:
38
39 //-------------------------------------------------------------------
54 //-------------------------------------------------------------------
56
57 //-------------------------------------------------------------------
60 //-------------------------------------------------------------------
61 inline FloatField* getEdgeThresholdMinimumValueFld() const { return _edgeThresholdMinimumValueFld; }
62 inline FloatField* getEdgeThresholdMaximumValueFld() const { return _edgeThresholdMaximumValueFld; }
63 inline FloatField* getDetectedEdgeValueFld () const { return _detectedEdgeValueFld ; }
64 inline FloatField* getDetectedNonEdgeValueFld () const { return _detectedNonEdgeValueFld ; }
65 inline EnumField* getFilterModeFld () const { return _filterModeFld ; }
66 inline BoolField* getVoxelSizeFld () const { return _useVoxelSizeFld ; }
67
69
77
78 protected:
79
86
89 template <typename DATATYPE>
90 void calcRow(MLsoffset *indexTab,
91 size_t indexTabSize,
92 MLsoffset /*srcVoxelOffset*/,
93 size_t numVox,
96 const ImageVector &/*rowStart*/);
97
99 void handleNotification(Field* field) override;
100
102 void calculateOutputImageProperties(int outputIndex, PagedImage* outputImage) override;
103
104private:
105
107 FloatField* _edgeThresholdMinimumValueFld;
108
110 FloatField* _edgeThresholdMaximumValueFld;
111
113 FloatField* _detectedEdgeValueFld;
114
116 FloatField* _detectedNonEdgeValueFld;
117
119 TypedEnumField<Sobel3DModeType>* _filterModeFld;
120
122 BoolField* _useVoxelSizeFld;
123
125 Kernel _sobelKernX;
126
128 Kernel _sobelKernY;
129
131 Kernel _sobelKernZ;
132
134 static KernelDataType _sKernX[27];
135
137 static KernelDataType _sKernY[27];
138
140 static KernelDataType _sKernZ[27];
141
143 static KernelDataType _dKern[27];
144
147 MLdouble _scaleFac;
148
154 };
155
156ML_END_NAMESPACE
157
158#endif //of __mlSobel3DFilter_H
159
160
KernelModule(int inputNum=1, int outputNum=1)
FloatField * getDetectedNonEdgeValueFld() const
void calcRow(MLsoffset *indexTab, size_t indexTabSize, MLsoffset, size_t numVox, TSubImageWithCursor< DATATYPE > &inSubImg, TSubImageWithCursor< DATATYPE > &outSubImg, const ImageVector &)
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Computes the output image properties from the input image properties.
Sobel3DModeType
enum field for filterModes
void handleNotification(Field *field) override
Called when a parameter field is changed.
FloatField * getDetectedEdgeValueFld() const
FloatField * getEdgeThresholdMaximumValueFld() const
BoolField * getVoxelSizeFld() const
EnumField * getFilterModeFld() const
FloatField * getEdgeThresholdMinimumValueFld() const
#define ML_MODULE_CLASS_HEADER(className)
#define MLKERNELEXPORT
MLint MLsoffset
Signed ML offset type that is a 32-bit signed integer on 32-bit platforms and a 64-bit integer on 64-...
Definition mlTypeDefs.h:561
double MLdouble
Definition mlTypeDefs.h:216
MLdouble KernelDataType
Define the standard data type for kernel elements to be used in this library.
Definition mlKernel.h:2180
TKernel< KernelDataType > Kernel
Standard kernel type to be used in this kernel library.
Definition mlKernel.h:2183
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.