ITK  6.0.0
Insight Toolkit
itkBinaryThinningImageFilter.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 itkBinaryThinningImageFilter_h
19 #define itkBinaryThinningImageFilter_h
20 
22 #include "itkImageToImageFilter.h"
24 
25 namespace itk
26 {
61 template <typename TInputImage, typename TOutputImage>
62 class ITK_TEMPLATE_EXPORT BinaryThinningImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
63 {
64 public:
65  ITK_DISALLOW_COPY_AND_MOVE(BinaryThinningImageFilter);
66 
72 
74  itkNewMacro(Self);
75 
77  itkOverrideGetNameOfClassMacro(BinaryThinningImageFilter);
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 
99 
102 
104  using typename Superclass::OutputImagePixelType;
105 
108 
111  GetThinning();
112 
114  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
115  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
116 
117 #ifdef ITK_USE_CONCEPT_CHECKING
118  // Begin concept checking
120  itkConceptMacro(InputAdditiveOperatorsCheck, (Concept::AdditiveOperators<PixelType>));
121  itkConceptMacro(InputConvertibleToIntCheck, (Concept::Convertible<PixelType, int>));
122  itkConceptMacro(IntConvertibleToInputCheck, (Concept::Convertible<int, PixelType>));
124  // End concept checking
125 #endif
126 
127 protected:
129  ~BinaryThinningImageFilter() override = default;
130 
132  void
133  GenerateData() override;
134 
136  void
137  PrepareData();
138 
140  void
141  ComputeThinImage();
142 }; // end of BinaryThinningImageFilter
143  // class
144 } // end namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 # include "itkBinaryThinningImageFilter.hxx"
148 #endif
149 
150 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::BinaryThinningImageFilter::RegionType
typename InputImageType::RegionType RegionType
Definition: itkBinaryThinningImageFilter.h:86
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itkNeighborhoodIterator.h
itk::BinaryThinningImageFilter::IndexType
typename RegionType::IndexType IndexType
Definition: itkBinaryThinningImageFilter.h:89
itk::BinaryThinningImageFilter::SizeType
typename RegionType::SizeType SizeType
Definition: itkBinaryThinningImageFilter.h:95
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itkImageRegionIteratorWithIndex.h
itk::Concept::SameDimension
Definition: itkConceptChecking.h:696
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::BinaryThinningImageFilter::PixelType
typename InputImageType::PixelType PixelType
Definition: itkBinaryThinningImageFilter.h:92
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::NeighborhoodIterator
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
Definition: itkNeighborhoodIterator.h:212
itk::BinaryThinningImageFilter
This filter computes one-pixel-wide edges of the input image.
Definition: itkBinaryThinningImageFilter.h:62
itk::Concept::AdditiveOperators
Definition: itkConceptChecking.h:360
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk::Concept::SameType
Definition: itkConceptChecking.h:679
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::Concept::Convertible
Definition: itkConceptChecking.h:216
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90