MeVisLab Toolbox Reference
mlLoGFilter.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(__mlLoGFilter_H)
18 #define __mlLoGFilter_H
19 
20 // ML-includes
21 #include "mlInitSystemKernel.h"
22 #include "mlKernel.h"
23 #include "mlKernelModule.h"
24 
25 ML_START_NAMESPACE
26 
27  //-------------------------------------------------------------------
35  //-------------------------------------------------------------------
37 
38  public:
39 
40  //-------------------------------------------------------------------
54  //-------------------------------------------------------------------
56 
60 
62  IntField *getKernelExtFld() { return _kernelExtFld; }
63 
64  protected:
66  void handleNotification(Field* field) override;
67 
69  void calculateOutputImageProperties(int outputIndex, PagedImage* outputImage) override;
70 
72  void _updateKernel() override;
73 
74 
77 
80 
82  void _setKernel();
83 
84 
91 
94  template <typename DATATYPE>
95  void calcRow(MLsoffset *indexTab,
96  size_t indexTabSize,
97  MLsoffset srcVoxelOffset,
98  size_t numVox,
99  DATATYPE *inCursor,
100  DATATYPE *outCursor,
101  const ImageVector &/*rowStart*/);
102 
103  private:
106  static const KernelDataType _LoGI[9];
107  static const KernelDataType _LoGII[9];
108  static const KernelDataType _LoGIII[25];
110 
112  IntField *_kernelExtFld;
113 
119  };
120 
121 ML_END_NAMESPACE
122 
123 #endif //of __mlLoGFilter_H
124 
125 
Field to encapsulate a double value.
Definition: mlFields.h:806
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.
The LoGFilter permits filtering an image with a 2D Laplace of Gaussian filter kernel.
Definition: mlLoGFilter.h:36
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Computes the output image properties from the input image properties.
LoGFilter()
Constructor.
MLdouble _calculateLoGfirstPart(MLint axisIdx)
The following function calculates the values which describes the "small LoG".
DoubleField * sigmaFld
Sigma to define the deviation needed for calculation of the kernel elements.
Definition: mlLoGFilter.h:59
void handleNotification(Field *field) override
Called when a parameter field is changed.
MLdouble _calculateLoGsecondPart(MLint axisIdx)
The following function calculates the values which describes the Gauss function.
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.
IntField * getKernelExtFld()
Integer extent (radius) of kernel. Default is 2.
Definition: mlLoGFilter.h:62
CALC_ROW_H()
The implementation of the calculateOutputSubImage() method overloaded from Module is done in this mac...
void _setKernel()
The following function defines the kernel for the LoG. It uses the separability of the LoG.
void _updateKernel() override
Set correct kernel dependent on the current mode.
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...
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
double MLdouble
Definition: mlTypeDefs.h:223
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:578
MLdouble KernelDataType
Define the standard data type for kernel elements to be used in this library.
Definition: mlKernel.h:2208