MeVisLab Toolbox Reference
mlCompassFilter.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 (__mlCompassFilter_H)
17 #define __mlCompassFilter_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  //-------------------------------------------------------------------
41  //-------------------------------------------------------------------
42  enum CompassFilterSelect{PREWITT = 0,
46 
47  NUM_COMPASS_FILTER_SELECTS};
48 
49  //-------------------------------------------------------------------
52  //-------------------------------------------------------------------
53  static const char* const CompassFilterSelectNames[];
54 
55 
56 
57  //-------------------------------------------------------------------
59  //-------------------------------------------------------------------
60  enum DirectionSelect{EAST = 0,
64 
65  WEST ,
69 
71 
72  NUM_DIRECTION_SELECTS};
73 
74  //-------------------------------------------------------------------
77  //-------------------------------------------------------------------
78  static const char* const DirectionNames[];
79 
80 
81  //-------------------------------------------------------------------
89  //-------------------------------------------------------------------
91 
92  //-------------------------------------------------------------------
95  //-------------------------------------------------------------------
96  inline EnumField* getCompassFilterSelectFld() const { return _compassFilterSelectFld; }
97  inline EnumField* getDirectionFld () const { return _directionFld ; }
98  inline IntField * getDirectionIntFld () const { return _directionIntFld ; }
100 
101 
102  private:
103 
105  void handleNotification(Field* field) override;
106 
109  void activateAttachments() override;
110 
112  void calculateOutputImageProperties(int outputIndex, PagedImage* outputImage) override;
113 
119  CALC_ROW_H();
120 
123  template <typename DATATYPE>
124  void calcRow(MLsoffset *indexTab,
125  size_t indexTabSize,
126  MLsoffset /*srcVoxelOffset*/,
127  size_t numVox,
128  DATATYPE *inCursor,
129  DATATYPE *outCursor,
130  const ImageVector &/*rowStart*/);
131 
132 
133  //-----------------------------------members--------------------------------------
134  private:
135 
137  EnumField* _compassFilterSelectFld;
138 
140  EnumField* _directionFld;
141 
143  IntField* _directionIntFld;
144 
150  };
151 
152 ML_END_NAMESPACE
153 
154 #endif //of __mlCompassFilter_H
155 
A class implementing different compass filters.
EnumField * getCompassFilterSelectFld() const
CompassFilterSelect
Enum to describe the possible kernels available for compass filtering.
DirectionSelect
Directions in which the compass filtering can take place.
CompassFilter()
Constructor.
IntField * getDirectionIntFld() const
EnumField * getDirectionFld() 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 an integer value.
Definition: mlFields.h:161
The typically used convenience class to apply a kernel to an image.
void handleNotification(Field *field) override
Called when any parameter field is changed.
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Computes the output image properties for output outIndex.
void activateAttachments() override
Called when field loading or module cloning has finished.
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...
#define CALC_ROW_H()
This file contains macros CALC_ROW_H() and CALC_ROW_CPP() used in classes derived from KernelBaseOp a...
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