ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkErodeObjectMorphologyImageFilter.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 __itkErodeObjectMorphologyImageFilter_h
19 #define __itkErodeObjectMorphologyImageFilter_h
20 
22 
23 namespace itk
24 {
45 template< class TInputImage, class TOutputImage, class TKernel >
47  public ObjectMorphologyImageFilter< TInputImage, TOutputImage, TKernel >
48 {
49 public:
55 
57  itkNewMacro(Self);
58 
61 
63  typedef typename Superclass::PixelType PixelType;
64 
66  typedef TKernel KernelType;
67 
69  typedef typename KernelType::ConstIterator KernelIteratorType;
70 
72 
74  typedef typename Superclass::DefaultBoundaryConditionType
76 
79  void SetErodeValue(PixelType objectValue)
80  {
81  this->SetObjectValue(objectValue);
82  }
83 
86  PixelType GetErodeValue(void)
87  {
88  return this->GetObjectValue();
89  }
90 
92  itkSetMacro(BackgroundValue, PixelType);
93 
95  itkGetConstMacro(BackgroundValue, PixelType);
96 
98  typedef typename TKernel::PixelType KernelPixelType;
99 
100 #ifdef ITK_USE_CONCEPT_CHECKING
101 
102  itkConceptMacro( KernelGreaterThanComparableCheck,
104 
106 #endif
107 
108 protected:
111  void PrintSelf(std::ostream & os, Indent indent) const;
112 
117  void Evaluate(OutputNeighborhoodIteratorType & nit,
118  const KernelType & kernel);
119 
120 private:
121  ErodeObjectMorphologyImageFilter(const Self &); //purposely not implemented
122  void operator=(const Self &); //purposely not implemented
123 
125 
126  // Default boundary condition for erosion filter, defaults to
127  // NumericTraits<PixelType>::max()
129 }; // end of class
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 #include "itkErodeObjectMorphologyImageFilter.hxx"
134 #endif
135 
136 #endif
137