ITK  4.5.0
Insight Segmentation and Registration Toolkit
itkThresholdMaximumConnectedComponentsImageFilter.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 __itkThresholdMaximumConnectedComponentsImageFilter_h
19 #define __itkThresholdMaximumConnectedComponentsImageFilter_h
20 
25 #include "itkCastImageFilter.h"
26 
27 
28 namespace itk
29 {
73 template< typename TInputImage, typename TOutputImage = TInputImage >
75  public ImageToImageFilter< TInputImage, TOutputImage >
76 {
77 public:
83 
85  itkNewMacro(Self);
86 
90 
92  typedef typename TInputImage::PixelType PixelType;
93 
95  itkConceptMacro( PixelTypeComparable, ( Concept::Comparable< PixelType > ) );
96 
104  itkSetMacro(MinimumObjectSizeInPixels, unsigned int);
105  itkGetConstMacro(MinimumObjectSizeInPixels, unsigned int);
107 
121  itkSetMacro(InsideValue, PixelType);
122  itkSetMacro(OutsideValue, PixelType);
123  itkSetMacro(UpperBoundary, PixelType);
124  itkGetConstMacro(InsideValue, PixelType);
125  itkGetConstMacro(OutsideValue, PixelType);
126  itkGetConstMacro(UpperBoundary, PixelType);
128 
133  itkGetConstMacro(NumberOfObjects, SizeValueType);
134 
138  itkGetConstMacro(ThresholdValue, PixelType);
139 
141  typedef TInputImage InputImageType;
142  typedef typename InputImageType::ConstPointer InputImagePointer;
143  typedef typename InputImageType::RegionType InputImageRegionType;
144  typedef typename InputImageType::PixelType InputImagePixelType;
145 
147  typedef TOutputImage OutputImageType;
148  typedef typename OutputImageType::Pointer OutputImagePointer;
149  typedef typename OutputImageType::RegionType OutputImageRegionType;
150  typedef typename OutputImageType::PixelType OutputImagePixelType;
151 
152 protected:
155  void PrintSelf(std::ostream & os, Indent indent) const;
156 
157  void GenerateData(void);
158 
164 
165 private:
166 
168  typedef unsigned int FilterPixelType;
169 
170  itkStaticConstMacro(ImageDimension,
171  unsigned int,
172  TInputImage::ImageDimension);
173 
176 
178 
179  //purposely not implemented
181  void operator=(const Self &); //purposely not implemented
182 
183  //
184  // Binary Threshold Filter
185  //
188 
189  //
190  // Connected Components Filter
191  //
194 
195  //
196  // Relabeled Components Filter
197  //
200 
201  //
202  // Minimum maximum calculator
203  //
205 
206  //
207  // Declare member variables for the filters of the internal pipeline.
208  //
211 
213 
215 
216  // Variables defined by the user
218 
219  // Binary threshold variables
224 
225  // Filter variables
228 };
229 } // end namespace itk
230 
231 #ifndef ITK_MANUAL_INSTANTIATION
232 #include "itkThresholdMaximumConnectedComponentsImageFilter.hxx"
233 #endif
234 
235 #endif
ConnectedComponentImageFilter< OutputImageType, FilterImageType > ConnectedFilterType
RelabelComponentImageFilter< FilterImageType, FilterImageType > RelabelFilterType
Base class for all process objects that output image data.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
BinaryThresholdImageFilter< InputImageType, OutputImageType > ThresholdFilterType
Binarize an input image by thresholding.
Finds the threshold value of an image based on maximizing the number of objects in the image that are...
Computes the minimum and the maximum intensity values of an image.
Relabel the components in an image such that consecutive labels are used.
Base class for filters that take an image as input and produce an image as output.
void PrintSelf(std::ostream &os, Indent indent) const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Image< FilterPixelType, itkGetStaticConstMacro(ImageDimension) > FilterImageType
#define itkConceptMacro(name, concept)
Templated n-dimensional image class.
Definition: itkImage.h:75
Label the objects in a binary image.