MeVisLab Toolbox Reference
mlExtConvolutionFilter.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 (__mlExtConvolutionFilter_H)
18#define __mlExtConvolutionFilter_H
19
20// ML-includes
21#include "mlInitSystemKernel.h"
22#include "mlKernel.h"
23#include "mlKernelModule.h"
24
25ML_START_NAMESPACE
26
27 //--------------------------------------------------
35 //--------------------------------------------------
37
38 public:
39
40 //--------------------------------------------------------------------------------------------------------
52 //--------------------------------------------------------------------------------------------------------
54 AVERAGE_KERNEL = 0,
57
58 NUM_KERNEL_TYPES
59 };
60
61 //-------------------------------------------------------------------
63 //-------------------------------------------------------------------
64 static const char* const mlKernelTypeNames[];
65
66 //-------------------------------------------------------------------
85 //-------------------------------------------------------------------
87
89 EnumField *getKernelTypeFld() { return _kernelTypeFld; }
90
91 protected:
93 void handleNotification(Field* field) override;
94
97 void _userKernelPostUpdate() override;
98
100 void calculateOutputImageProperties(int outputIndex, PagedImage* outputImage) override;
101
108
111 template <typename DATATYPE>
112 void calcRow(MLsoffset *indexTab,
113 size_t indexTabSize,
114 MLsoffset srcVoxelOffset,
115 size_t numVox,
116 DATATYPE *inCursor,
117 DATATYPE *outCursor,
118 const ImageVector &/*rowStart*/);
119
120 private:
124 EnumField *_kernelTypeFld;
125
131 };
132
133ML_END_NAMESPACE
134
135#endif //of __mlExtConvolutionFilter_H
136
137
138
139
Field to encapsulate an enumerated value.
Definition mlFields.h:173
This class implements different convolution filters with changeable kernel sizes.
ExtConvolutionFilter()
Constructor.
EnumField * getKernelTypeFld()
Access method to parameter field(s). See _kernelTypeFld for more infos.
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.
void handleNotification(Field *field) override
Called when a parameter field is changed.
void _userKernelPostUpdate() override
We update the kernel to the new field state by hand, i.e.
CALC_ROW_H()
The implementation of the calculateOutputSubImage() method overloaded from Module is done in this mac...
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Computes the output image properties from the input image properties.
KernelType
The mlKernelTypes decide which kernel is used to filter the input image.
Base class for all fields used in the ML.
Definition mlField.h:73
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...
#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