ITK  6.0.0
Insight Toolkit
itkBinaryPruningImageFilter.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 itkBinaryPruningImageFilter_h
19#define itkBinaryPruningImageFilter_h
20
24
25namespace itk
26{
58template <typename TInputImage, typename TOutputImage>
59class ITK_TEMPLATE_EXPORT BinaryPruningImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
60{
61public:
62 ITK_DISALLOW_COPY_AND_MOVE(BinaryPruningImageFilter);
63
69
71 itkNewMacro(Self);
72
74 itkOverrideGetNameOfClassMacro(BinaryPruningImageFilter);
75
77 using InputImageType = TInputImage;
78
80 using OutputImageType = TOutputImage;
81
84
87
89 using PixelType = typename InputImageType::PixelType;
90
93
96
99
102
106
108 itkSetMacro(Iteration, unsigned int);
109 itkGetConstMacro(Iteration, unsigned int);
113 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
114 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
115
116#ifdef ITK_USE_CONCEPT_CHECKING
117 // Begin concept checking
121 itkConceptMacro(IntConvertibleToPixelTypeCheck, (Concept::Convertible<int, PixelType>));
123 // End concept checking
124#endif
125
126protected:
128 ~BinaryPruningImageFilter() override = default;
129 void
130 PrintSelf(std::ostream & os, Indent indent) const override;
131
133 void
134 GenerateData() override;
135
137 void
139
141 void
143
144private:
145 unsigned int m_Iteration{};
146}; // end of BinaryThinningImageFilter class
147} // end namespace itk
148
149#ifndef ITK_MANUAL_INSTANTIATION
150# include "itkBinaryPruningImageFilter.hxx"
151#endif
152
153#endif
This filter removes "spurs" of less than a certain length in the input image.
OutputImageType * GetPruning()
void PrintSelf(std::ostream &os, Indent indent) const override
typename RegionType::IndexType IndexType
~BinaryPruningImageFilter() override=default
typename InputImageType::PixelType PixelType
typename InputImageType::RegionType RegionType
typename RegionType::SizeType SizeType
Base class for all process objects that output image data.
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
Base class for filters that take an image as input and produce an image as output.
typename InputImageType::Pointer InputImagePointer
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....