ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBinaryPruningImageFilter.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 itkBinaryPruningImageFilter_h
19 #define itkBinaryPruningImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
24 
25 namespace itk
26 {
53 template< typename TInputImage, typename TOutputImage >
54 class ITK_TEMPLATE_EXPORT BinaryPruningImageFilter:
55  public ImageToImageFilter< TInputImage, TOutputImage >
56 {
57 public:
58  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryPruningImageFilter);
59 
65 
67  itkNewMacro(Self);
68 
71 
73  using InputImageType = TInputImage;
74 
76  using OutputImageType = TOutputImage;
77 
80 
82  using IndexType = typename RegionType::IndexType;
83 
85  using PixelType = typename InputImageType::PixelType;
86 
88  using SizeType = typename RegionType::SizeType;
89 
91  using InputImagePointer = typename InputImageType::ConstPointer;
92 
94  using OutputImagePointer = typename OutputImageType::Pointer;
95 
98 
100  OutputImageType * GetPruning();
101 
103  itkSetMacro(Iteration, unsigned int);
104  itkGetConstMacro(Iteration, unsigned int);
106 
108  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
109  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
110 
111 #ifdef ITK_USE_CONCEPT_CHECKING
112  // Begin concept checking
113  itkConceptMacro( SameDimensionCheck,
115  itkConceptMacro( SameTypeCheck,
117  itkConceptMacro( AdditiveOperatorsCheck,
119  itkConceptMacro( IntConvertibleToPixelTypeCheck,
121  itkConceptMacro( PixelLessThanIntCheck,
123  // End concept checking
124 #endif
125 
126 protected:
128  ~BinaryPruningImageFilter() override = default;
129  void PrintSelf(std::ostream & os, Indent indent) const override;
130 
132  void GenerateData() override;
133 
135  void PrepareData();
136 
138  void ComputePruneImage();
139 
140 private:
141  unsigned int m_Iteration;
142 }; // end of BinaryThinningImageFilter class
143 } //end namespace itk
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 #include "itkBinaryPruningImageFilter.hxx"
147 #endif
148 
149 #endif
typename OutputImageType::Pointer OutputImagePointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
This filter removes &quot;spurs&quot; of less than a certain length in the input image.
typename InputImageType::Pointer InputImagePointer
TOutputImage OutputImageType
typename RegionType::SizeType SizeType
typename InputImageType::PixelType PixelType
typename InputImageType::RegionType RegionType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename RegionType::IndexType IndexType
#define itkConceptMacro(name, concept)
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.