MeVisLab Toolbox Reference
mlRankFilter.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(__mlRankFilter_H)
17#define __mlRankFilter_H
18
19
20// ML-includes
21#include "mlInitSystemKernel.h"
22#include "mlKernel.h"
23#include "mlKernelModule.h"
24
25ML_START_NAMESPACE
26
27 //--------------------------------------------------
34 //--------------------------------------------------
36
37 public:
38
39 //--------------------------------------------------------------------------------------------------------
95 //--------------------------------------------------------------------------------------------------------
107
108 //-------------------------------------------------------------------
110 //-------------------------------------------------------------------
111 static const char* const RankFilterNames[];
112
113 //-------------------------------------------------------------------
131 //-------------------------------------------------------------------
133
134 //-------------------------------------------------------------------
137 //-------------------------------------------------------------------
139 EnumField *getRankFilterFld() { return _rankFilterFld; };
140
142 IntField *getRankFld() { return _rankFld; }
144
145 protected:
146
147 //-------------------------------------------------------------------------------
149 //-------------------------------------------------------------------------------
150 void calculateOutputImageProperties(int outputIndex, PagedImage* outputImage) override;
151
153 void handleNotification(Field* field) override;
154
157 void activateAttachments() override;
158
159
166
169 template <typename DATATYPE>
170 void calcRow(MLsoffset *indexTab,
171 size_t indexTabSize,
172 MLsoffset srcVoxelOffset,
173 size_t numVox,
174 DATATYPE *inCursor,
175 DATATYPE *outCursor,
176 const ImageVector &/*rowStart*/);
177
178 private:
179
181 IntField *_rankFld;
182
184 EnumField *_rankFilterFld;
185
188 BoolField *_useRankFld;
189
195 };
196
197ML_END_NAMESPACE
198
199#endif //of __mlRankFilter_H
200
201
202
203
204
Field to encapsulate a boolean value.
Definition mlFields.h:56
Field to encapsulate an enumerated value.
Definition mlFields.h:173
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate an integer value.
Definition mlFields.h:117
The typically used convenience class to apply a kernel to an image.
The class PagedImage, representing a fragmented image that manages properties and data of an image lo...
The class to apply rank based kernel filters images.
void activateAttachments() override
Called when loading has finished.
RankFilter()
Constructor.
void calcRow(MLsoffset *indexTab, size_t indexTabSize, MLsoffset srcVoxelOffset, size_t numVox, DATATYPE *inCursor, DATATYPE *outCursor, const ImageVector &)
In this virtual template method the filtering of one row needs to be implemented.
RankFilterTypes
The following rank based filters are available to filter line in an image:
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Computes the output image properties (e.g. the extents) for output outIndex.
void handleNotification(Field *field) override
Called when a parameter field is changed.
IntField * getRankFld()
Specifies the rank level for the 'Rank' algorithm. Default is 0.
EnumField * getRankFilterFld()
Specifies the rank based filter algorithm. Default is mlMedian.
CALC_ROW_H()
The implementation of the calculateOutputSubImage() method overloaded from Module is done in this mac...
#define ML_MODULE_CLASS_HEADER(className)
Similar to 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 that is a 32-bit signed integer on 32-bit platforms and a 64-bit integer on 64-...
Definition mlTypeDefs.h:561