ITK  4.9.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 >
55  public ImageToImageFilter< TInputImage, TOutputImage >
56 {
57 public:
63 
65  itkNewMacro(Self);
66 
69 
71  typedef TInputImage InputImageType;
72 
74  typedef TOutputImage OutputImageType;
75 
77  typedef typename InputImageType::RegionType RegionType;
78 
80  typedef typename RegionType::IndexType IndexType;
81 
83  typedef typename InputImageType::PixelType PixelType;
84 
86  typedef typename RegionType::SizeType SizeType;
87 
89  typedef typename InputImageType::ConstPointer InputImagePointer;
90 
92  typedef typename OutputImageType::Pointer OutputImagePointer;
93 
96 
99 
101  itkSetMacro(Iteration, unsigned int);
102  itkGetConstMacro(Iteration, unsigned int);
104 
106  itkStaticConstMacro(InputImageDimension, unsigned int,
107  TInputImage::ImageDimension);
108  itkStaticConstMacro(OutputImageDimension, unsigned int,
109  TOutputImage::ImageDimension);
111 
112 #ifdef ITK_USE_CONCEPT_CHECKING
113  // Begin concept checking
114  itkConceptMacro( SameDimensionCheck,
116  itkConceptMacro( SameTypeCheck,
118  itkConceptMacro( AdditiveOperatorsCheck,
120  itkConceptMacro( IntConvertibleToPixelTypeCheck,
122  itkConceptMacro( PixelLessThanIntCheck,
124  // End concept checking
125 #endif
126 
127 protected:
130  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
131 
133  void GenerateData();
134 
136  void PrepareData();
137 
139  void ComputePruneImage();
140 
141 private:
142  BinaryPruningImageFilter(const Self &) ITK_DELETE_FUNCTION;
143  void operator=(const Self &) ITK_DELETE_FUNCTION;
144 
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
InputImageType::RegionType RegionType
void PrintSelf(std::ostream &os, Indent indent) const override
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.
SmartPointer< const Self > ConstPointer
static const unsigned int OutputImageDimension
static const unsigned int InputImageDimension
InputImageType::ConstPointer InputImagePointer
OutputImageType::Pointer OutputImagePointer
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
TOutputImage OutputImageType
NeighborhoodIterator< TInputImage > NeighborhoodIteratorType
#define itkConceptMacro(name, concept)
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
OutputImageType * GetPruning()