ITK
4.2.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Filtering
MathematicalMorphology
include
itkMorphologicalGradientImageFilter.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright Insight Software Consortium
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef __itkMorphologicalGradientImageFilter_h
19
#define __itkMorphologicalGradientImageFilter_h
20
21
#include "
itkKernelImageFilter.h
"
22
#include "
itkMovingHistogramMorphologicalGradientImageFilter.h
"
23
#include "
itkBasicDilateImageFilter.h
"
24
#include "
itkBasicErodeImageFilter.h
"
25
#include "
itkAnchorErodeImageFilter.h
"
26
#include "
itkAnchorDilateImageFilter.h
"
27
#include "
itkVanHerkGilWermanDilateImageFilter.h
"
28
#include "
itkVanHerkGilWermanErodeImageFilter.h
"
29
#include "
itkSubtractImageFilter.h
"
30
#include "
itkConstantBoundaryCondition.h
"
31
#include "
itkNeighborhood.h
"
32
33
namespace
itk
34
{
51
template
<
class
TInputImage,
class
TOutputImage,
class
TKernel >
52
class
ITK_EXPORT
MorphologicalGradientImageFilter
:
53
public
KernelImageFilter
< TInputImage, TOutputImage, TKernel >
54
{
55
public
:
57
typedef
MorphologicalGradientImageFilter
Self
;
58
typedef
KernelImageFilter< TInputImage, TOutputImage, TKernel >
Superclass
;
59
typedef
SmartPointer< Self >
Pointer
;
60
typedef
SmartPointer< const Self >
ConstPointer
;
61
63
itkNewMacro(
Self
);
64
66
itkTypeMacro(
MorphologicalGradientImageFilter
,
67
KernelImageFilter
);
68
70
itkStaticConstMacro(ImageDimension,
unsigned
int
,
71
TInputImage::ImageDimension);
72
74
typedef
TInputImage
InputImageType
;
75
typedef
TOutputImage
OutputImageType
;
76
typedef
typename
TInputImage::RegionType
RegionType
;
77
typedef
typename
TInputImage::SizeType
SizeType
;
78
typedef
typename
TInputImage::IndexType
IndexType
;
79
typedef
typename
TInputImage::PixelType
PixelType
;
80
typedef
typename
TInputImage::OffsetType
OffsetType
;
81
typedef
typename
Superclass::OutputImageRegionType
OutputImageRegionType
;
82
83
typedef
FlatStructuringElement< itkGetStaticConstMacro(ImageDimension) >
84
FlatKernelType
;
85
typedef
MovingHistogramMorphologicalGradientImageFilter< TInputImage, TOutputImage, TKernel >
86
HistogramFilterType
;
87
typedef
BasicDilateImageFilter< TInputImage, TInputImage, TKernel >
88
BasicDilateFilterType
;
89
typedef
BasicErodeImageFilter< TInputImage, TInputImage, TKernel >
90
BasicErodeFilterType
;
91
typedef
AnchorDilateImageFilter< TInputImage, FlatKernelType >
92
AnchorDilateFilterType
;
93
typedef
AnchorErodeImageFilter< TInputImage, FlatKernelType >
AnchorErodeFilterType
;
94
typedef
VanHerkGilWermanDilateImageFilter< TInputImage, FlatKernelType >
95
VHGWDilateFilterType
;
96
typedef
VanHerkGilWermanErodeImageFilter< TInputImage, FlatKernelType >
97
VHGWErodeFilterType
;
98
typedef
SubtractImageFilter< TInputImage, TInputImage, TOutputImage >
99
SubtractFilterType
;
100
102
typedef
TKernel
KernelType
;
103
// typedef typename KernelType::Superclass KernelSuperClass;
104
// typedef Neighborhood< typename KernelType::PixelType, ImageDimension >
105
// KernelSuperClass;
106
108
void
SetKernel(
const
KernelType
& kernel);
109
111
void
SetAlgorithm(
int
algo);
112
113
itkGetConstMacro(Algorithm,
int
);
114
117
virtual
void
Modified()
const
;
118
120
enum
{
121
BASIC = 0,
122
HISTO = 1,
123
ANCHOR = 2,
124
VHGW = 3
125
} AlgorithmChoice;
126
protected
:
127
MorphologicalGradientImageFilter
();
128
~MorphologicalGradientImageFilter
() {}
129
void
PrintSelf(std::ostream & os,
Indent
indent)
const
;
131
132
void
GenerateData();
133
134
private
:
135
MorphologicalGradientImageFilter
(
const
Self &);
//purposely not implemented
136
void
operator=(
const
Self &);
//purposely not implemented
137
138
// the filters used internally
139
typename
HistogramFilterType::Pointer
m_HistogramFilter
;
140
141
typename
BasicDilateFilterType::Pointer
m_BasicDilateFilter
;
142
143
typename
BasicErodeFilterType::Pointer
m_BasicErodeFilter
;
144
145
typename
AnchorDilateFilterType::Pointer
m_AnchorDilateFilter
;
146
147
typename
AnchorErodeFilterType::Pointer
m_AnchorErodeFilter
;
148
149
typename
VHGWDilateFilterType::Pointer
m_VanHerkGilWermanDilateFilter
;
150
151
typename
VHGWErodeFilterType::Pointer
m_VanHerkGilWermanErodeFilter
;
152
153
// and the name of the filter
154
int
m_Algorithm
;
155
};
// end of class
156
}
// end namespace itk
157
158
#ifndef ITK_MANUAL_INSTANTIATION
159
#include "itkMorphologicalGradientImageFilter.hxx"
160
#endif
161
162
#endif
163
Generated on Tue Jul 10 2012 23:36:54 for ITK by
1.8.1