ITK  4.13.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:
70 
72  itkNewMacro(Self);
73 
76 
78  typedef TInputImage InputImageType;
79 
81  typedef TOutputImage OutputImageType;
82 
84  typedef typename InputImageType::RegionType RegionType;
85 
87  typedef typename RegionType::IndexType IndexType;
88 
90  typedef typename InputImageType::PixelType PixelType;
91 
93  typedef typename RegionType::SizeType SizeType;
94 
96  typedef typename InputImageType::ConstPointer InputImagePointer;
97 
99  typedef typename OutputImageType::Pointer OutputImagePointer;
100 
102  typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
103 
106 
108  OutputImageType * GetThinning();
109 
111  itkStaticConstMacro(InputImageDimension, unsigned int,
112  TInputImage::ImageDimension);
113  itkStaticConstMacro(OutputImageDimension, unsigned int,
114  TOutputImage::ImageDimension);
116 
117 #ifdef ITK_USE_CONCEPT_CHECKING
118  // Begin concept checking
119  itkConceptMacro( SameDimensionCheck,
121  itkConceptMacro( InputAdditiveOperatorsCheck,
123  itkConceptMacro( InputConvertibleToIntCheck,
125  itkConceptMacro( IntConvertibleToInputCheck,
127  itkConceptMacro( SameTypeCheck,
129  // End concept checking
130 #endif
131 
132 protected:
134  virtual ~BinaryThinningImageFilter() ITK_OVERRIDE {}
135 
137  void GenerateData() ITK_OVERRIDE;
138 
140  void PrepareData();
141 
143  void ComputeThinImage();
144 
145 private:
146  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryThinningImageFilter);
147 }; // end of BinaryThinningImageFilter
148  // class
149 } //end namespace itk
150 
151 #ifndef ITK_MANUAL_INSTANTIATION
152 #include "itkBinaryThinningImageFilter.hxx"
153 #endif
154 
155 #endif
This filter computes one-pixel-wide edges of the input image.
Superclass::OutputImagePixelType OutputImagePixelType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
InputImageType::ConstPointer InputImagePointer
Base class for all process objects that output image data.
NeighborhoodIterator< TInputImage > NeighborhoodIteratorType
Base class for filters that take an image as input and produce an image as output.
TOutputImage OutputImageType
#define itkConceptMacro(name, concept)
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.