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
//--------------------------------------------------
35
class
MLKERNELEXPORT
CompassFilter
:
public
KernelModule
{
36
37
public
:
38
//-------------------------------------------------------------------
41
//-------------------------------------------------------------------
42
enum
CompassFilterSelect
{PREWITT = 0,
43
KIRSCH
,
44
ROBINSON_3_LEVEL
,
45
ROBINSON_5_LEVEL
,
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,
61
NORTH_EAST
,
62
NORTH
,
63
NORTH_WEST
,
64
65
WEST
,
66
SOUTH_WEST
,
67
SOUTH
,
68
SOUTH_EAST
,
69
70
ALL_DIRECTIONS
,
71
72
NUM_DIRECTION_SELECTS};
73
74
//-------------------------------------------------------------------
77
//-------------------------------------------------------------------
78
static
const
char
*
const
DirectionNames[];
79
80
81
//-------------------------------------------------------------------
89
//-------------------------------------------------------------------
90
CompassFilter
();
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
149
ML_MODULE_CLASS_HEADER
(
CompassFilter
);
150
};
151
152
ML_END_NAMESPACE
153
154
#endif
//of __mlCompassFilter_H
155
ml::CompassFilter
A class implementing different compass filters.
Definition:
mlCompassFilter.h:35
ml::CompassFilter::getCompassFilterSelectFld
EnumField * getCompassFilterSelectFld() const
Definition:
mlCompassFilter.h:96
ml::CompassFilter::CompassFilterSelect
CompassFilterSelect
Enum to describe the possible kernels available for compass filtering.
Definition:
mlCompassFilter.h:42
ml::CompassFilter::ROBINSON_3_LEVEL
@ ROBINSON_3_LEVEL
Definition:
mlCompassFilter.h:44
ml::CompassFilter::ROBINSON_5_LEVEL
@ ROBINSON_5_LEVEL
Definition:
mlCompassFilter.h:45
ml::CompassFilter::KIRSCH
@ KIRSCH
Definition:
mlCompassFilter.h:43
ml::CompassFilter::DirectionSelect
DirectionSelect
Directions in which the compass filtering can take place.
Definition:
mlCompassFilter.h:60
ml::CompassFilter::ALL_DIRECTIONS
@ ALL_DIRECTIONS
Definition:
mlCompassFilter.h:70
ml::CompassFilter::NORTH_EAST
@ NORTH_EAST
Definition:
mlCompassFilter.h:61
ml::CompassFilter::SOUTH_EAST
@ SOUTH_EAST
Definition:
mlCompassFilter.h:68
ml::CompassFilter::WEST
@ WEST
Definition:
mlCompassFilter.h:65
ml::CompassFilter::NORTH_WEST
@ NORTH_WEST
Definition:
mlCompassFilter.h:63
ml::CompassFilter::SOUTH
@ SOUTH
Definition:
mlCompassFilter.h:67
ml::CompassFilter::NORTH
@ NORTH
Definition:
mlCompassFilter.h:62
ml::CompassFilter::SOUTH_WEST
@ SOUTH_WEST
Definition:
mlCompassFilter.h:66
ml::CompassFilter::CompassFilter
CompassFilter()
Constructor.
ml::CompassFilter::getDirectionIntFld
IntField * getDirectionIntFld() const
Definition:
mlCompassFilter.h:98
ml::CompassFilter::getDirectionFld
EnumField * getDirectionFld() const
Definition:
mlCompassFilter.h:97
ml::EnumField
Field to encapsulate an enumerated value.
Definition:
mlFields.h:363
ml::Field
Base class for all fields used in the ML.
Definition:
mlField.h:73
ml::IntField
Field to encapsulate an integer value.
Definition:
mlFields.h:161
ml::KernelModule
The typically used convenience class to apply a kernel to an image.
Definition:
mlKernelModule.h:37
ml::KernelModule::handleNotification
void handleNotification(Field *field) override
Called when any parameter field is changed.
ml::KernelModule::calculateOutputImageProperties
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Computes the output image properties for output outIndex.
ml::KernelModule::activateAttachments
void activateAttachments() override
Called when field loading or module cloning has finished.
ml::PagedImage
Class which represents an image, which manages properties of an image and image data which is located...
Definition:
mlPagedImage.h:70
ml::TImageVector< MLint >
ML_MODULE_CLASS_HEADER
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
Definition:
mlRuntimeSubClass.h:245
mlInitSystemKernel.h
MLKERNELEXPORT
#define MLKERNELEXPORT
Includes files used in many parts of the dll, defined dll-specific macros and controls any system dep...
Definition:
mlInitSystemKernel.h:42
CALC_ROW_H
#define CALC_ROW_H()
This file contains macros CALC_ROW_H() and CALC_ROW_CPP() used in classes derived from KernelBaseOp a...
Definition:
mlKernelMacros.h:34
mlKernelModule.h
MLsoffset
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
MeVisLab
Standard
Sources
ML
MLKernel
mlCompassFilter.h
Generated by
1.9.1