ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBinaryThinningImageFilter.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 itkBinaryThinningImageFilter_h
19 #define itkBinaryThinningImageFilter_h
20 
22 #include "itkImageToImageFilter.h"
24 
25 namespace itk
26 {
60 template< typename TInputImage, typename TOutputImage >
61 class ITK_TEMPLATE_EXPORT BinaryThinningImageFilter:
62  public ImageToImageFilter< TInputImage, TOutputImage >
63 {
64 public:
65  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryThinningImageFilter);
66 
72 
74  itkNewMacro(Self);
75 
78 
80  using InputImageType = TInputImage;
81 
83  using OutputImageType = TOutputImage;
84 
87 
89  using IndexType = typename RegionType::IndexType;
90 
92  using PixelType = typename InputImageType::PixelType;
93 
95  using SizeType = typename RegionType::SizeType;
96 
98  using InputImagePointer = typename InputImageType::ConstPointer;
99 
101  using OutputImagePointer = typename OutputImageType::Pointer;
102 
104  using OutputImagePixelType = typename Superclass::OutputImagePixelType;
105 
108 
110  OutputImageType * GetThinning();
111 
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
118  itkConceptMacro( SameDimensionCheck,
120  itkConceptMacro( InputAdditiveOperatorsCheck,
122  itkConceptMacro( InputConvertibleToIntCheck,
124  itkConceptMacro( IntConvertibleToInputCheck,
126  itkConceptMacro( SameTypeCheck,
128  // End concept checking
129 #endif
130 
131 protected:
133  ~BinaryThinningImageFilter() override = default;
134 
136  void GenerateData() override;
137 
139  void PrepareData();
140 
142  void ComputeThinImage();
143 }; // end of BinaryThinningImageFilter
144  // class
145 } //end namespace itk
146 
147 #ifndef ITK_MANUAL_INSTANTIATION
148 #include "itkBinaryThinningImageFilter.hxx"
149 #endif
150 
151 #endif
This filter computes one-pixel-wide edges of the input image.
typename OutputImageType::Pointer OutputImagePointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename InputImageType::RegionType RegionType
Base class for all process objects that output image data.
typename RegionType::SizeType SizeType
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::Pointer InputImagePointer
TOutputImage OutputImageType
typename RegionType::IndexType IndexType
typename InputImageType::PixelType PixelType
Base class for filters that take an image as input and produce an image as output.
#define itkConceptMacro(name, concept)
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.