ITK  4.2.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< class TInputImage, class TOutputImage >
54 class ITK_EXPORT BinaryPruningImageFilter:
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 
98  OutputImageType * GetPruning(void);
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 
114  itkConceptMacro( SameDimensionCheck,
116  itkConceptMacro( SameTypeCheck,
118  itkConceptMacro( AdditiveOperatorsCheck,
120  itkConceptMacro( IntConvertibleToPixelTypeCheck,
122  itkConceptMacro( PixelLessThanIntCheck,
124 
126 #endif
127 protected:
130  void PrintSelf(std::ostream & os, Indent indent) const;
132 
134  void GenerateData();
135 
137  void PrepareData();
138 
140  void ComputePruneImage();
141 
142 private:
143  BinaryPruningImageFilter(const Self &); //purposely not implemented
144  void operator=(const Self &); //purposely not implemented
145 
146  unsigned int m_Iteration;
147 }; // end of BinaryThinningImageFilter class
148 } //end namespace itk
149 
150 #ifndef ITK_MANUAL_INSTANTIATION
151 #include "itkBinaryPruningImageFilter.hxx"
152 #endif
153 
154 #endif
155