MeVisLab Toolbox Reference
mlCloseGapFilter.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 
16 
17 #if !defined (__mlCloseGapFilter_H)
18 #define __mlCloseGapFilter_H
19 
20 // ML-includes
21 #include "mlInitSystemKernel.h"
22 #include "mlKernelModule.h"
23 
24 ML_START_NAMESPACE
25 
26  //--------------------------------------------------------------------
35  //--------------------------------------------------------------------
37 
38  public:
39 
40  //--------------------------------------------------------------------------------------------------------
131  //--------------------------------------------------------------------------------------------------------
133  ID = 0,
140 
141  NUM_CLOSEGAP_FILTERS
142  };
143 
145  static const char* const CloseGapFilterNames[];
146 
147  //--------------------------------------------------------------------
163  //--------------------------------------------------------------------
165  CLOSEGAP_KERNEL = 0,
169 
170  NUM_CLOSEGAP_KERNELS
171  };
172 
174  static const char* const CloseGapKernelNames[];
175 
176 
177  //-------------------------------------------------------------------
196  //-------------------------------------------------------------------
198 
199  //-------------------------------------------------------------------
202  //-------------------------------------------------------------------
203  inline EnumField *getCloseGapFilterFld () const { return _closeGapFilterFld ; };
204  inline FloatField *getSensitivityFld () const { return _sensitivityFld ; };
205  inline EnumField *getSelectInternalKernelFld() const { return _selectInternalKernelFld; };
207 
208  protected:
210  void handleNotification(Field* field) override;
211 
214  void activateAttachments() override;
215 
222 
225  template <typename DATATYPE>
226  void calcRow(MLsoffset *indexTab,
227  size_t indexTabSize,
228  MLsoffset srcVoxelOffset,
229  size_t numVox,
230  DATATYPE *inCursor,
231  DATATYPE *outCursor,
232  const ImageVector &/*rowStart*/);
233 
234  // After checking all inherited GUI elements we use this kernel update method
235  // to overwrite kernel settings in that case that a special kernel has been
236  // selected by the \c _selectInternalKernelFld.
237  void _userKernelPostUpdate() override;
238 
239  private:
240 
241  //-------------------------------------------------------------------
244  //-------------------------------------------------------------------
246  EnumField *_closeGapFilterFld;
247 
249  FloatField *_sensitivityFld;
250 
252  EnumField *_selectInternalKernelFld;
254 
257  std::vector<MLint> _orderedIndices;
258 
264  };
265 
266 ML_END_NAMESPACE
267 
268 #endif //of __mlCloseGapFilter_H
269 
270 
271 
The class to apply CloseGap based kernel filters to images.
CALC_ROW_H()
Macro which needs to be added to the implementation of a class derived from KernelModule or KernelBas...
void _userKernelPostUpdate() override
Typical method to be overloaded by derived modules to apply kernel changes.
CloseGapFilter()
Constructor.
FloatField * getSensitivityFld() const
void handleNotification(Field *field) override
Called when a parameter field is changed.
EnumField * getSelectInternalKernelFld() const
void activateAttachments() override
Called when loading has finished.
CloseGapFilters
The following morphology based filters are available to filter a line in an image:
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.
CloseGapKernels
Selects the kernel that will be used for the current filter.
EnumField * getCloseGapFilterFld() const
Field to encapsulate an enumerated value.
Definition: mlFields.h:363
Base class for all fields used in the ML.
Definition: mlField.h:73
Field to encapsulate a float value.
Definition: mlFields.h:627
The typically used convenience class to apply a kernel to an image.
#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