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
KernelModule(int inputNum=1, int outputNum=1)
void activateAttachments() override
static const char *const RankFilterNames[]
Strings names for rank based filters.
void calcRow(MLsoffset *indexTab, size_t indexTabSize, MLsoffset srcVoxelOffset, size_t numVox, DATATYPE *inCursor, DATATYPE *outCursor, const ImageVector &)
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.
#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
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.