ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkErodeObjectMorphologyImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
23namespace itk
24{
46template <typename TInputImage, typename TOutputImage, typename TKernel>
47class ITK_TEMPLATE_EXPORT ErodeObjectMorphologyImageFilter
48 : public ObjectMorphologyImageFilter<TInputImage, TOutputImage, TKernel>
49{
50public:
51 ITK_DISALLOW_COPY_AND_MOVE(ErodeObjectMorphologyImageFilter);
52
58
60 itkNewMacro(Self);
61
63 itkOverrideGetNameOfClassMacro(ErodeObjectMorphologyImageFilter);
64
66 using typename Superclass::PixelType;
67
69 using KernelType = TKernel;
70
72 using KernelIteratorType = typename KernelType::ConstIterator;
73
75
78
81 void
83 {
84 this->SetObjectValue(objectValue);
85 }
86
89 PixelType
91 {
92 return this->GetObjectValue();
93 }
94
96 itkSetMacro(BackgroundValue, PixelType);
97
99 itkGetConstMacro(BackgroundValue, PixelType);
100
102 using KernelPixelType = typename TKernel::PixelType;
103
104 itkConceptMacro(KernelGreaterThanComparableCheck, (Concept::GreaterThanComparable<KernelPixelType>));
105
106protected:
109 void
110 PrintSelf(std::ostream & os, Indent indent) const override;
111
116 void
117 Evaluate(OutputNeighborhoodIteratorType & nit, const KernelType & kernel) override;
118
119private:
121
122 // Default boundary condition for erosion filter, defaults to
123 // NumericTraits<PixelType>::max()
125}; // end of class
126} // end namespace itk
127
128#ifndef ITK_MANUAL_INSTANTIATION
129# include "itkErodeObjectMorphologyImageFilter.hxx"
130#endif
131
132#endif
void Evaluate(OutputNeighborhoodIteratorType &nit, const KernelType &kernel) override
~ErodeObjectMorphologyImageFilter() override=default
ObjectMorphologyImageFilter< TInputImage, TOutputImage, TKernel > Superclass
NeighborhoodIterator< TOutputImage > OutputNeighborhoodIteratorType
void PrintSelf(std::ostream &os, Indent indent) const override
ConstantBoundaryCondition< InputImageType > DefaultBoundaryConditionType
Control indentation during Print() invocation.
Definition itkIndent.h:50
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
virtual void SetObjectValue(PixelType _arg)
typename TInputImage::PixelType PixelType
virtual PixelType GetObjectValue() const
ConstantBoundaryCondition< InputImageType > DefaultBoundaryConditionType
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....