ITK  4.9.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  typedef typename TOutputImage::PixelType OutputPixelType;
94 
96  itkConceptMacro( PixelTypeComparable, ( Concept::Comparable< PixelType > ) );
97 
105  itkSetMacro(MinimumObjectSizeInPixels, unsigned int);
106  itkGetConstMacro(MinimumObjectSizeInPixels, unsigned int);
108 
122  itkSetMacro(InsideValue, OutputPixelType);
123  itkSetMacro(OutsideValue, OutputPixelType);
124  itkSetMacro(UpperBoundary, PixelType);
125  itkGetConstMacro(InsideValue, OutputPixelType);
126  itkGetConstMacro(OutsideValue, OutputPixelType);
127  itkGetConstMacro(UpperBoundary, PixelType);
129 
134  itkGetConstMacro(NumberOfObjects, SizeValueType);
135 
139  itkGetConstMacro(ThresholdValue, PixelType);
140 
142  typedef TInputImage InputImageType;
143  typedef typename InputImageType::ConstPointer InputImagePointer;
144  typedef typename InputImageType::RegionType InputImageRegionType;
145  typedef typename InputImageType::PixelType InputImagePixelType;
146 
148  typedef TOutputImage OutputImageType;
149  typedef typename OutputImageType::Pointer OutputImagePointer;
150  typedef typename OutputImageType::RegionType OutputImageRegionType;
151  typedef typename OutputImageType::PixelType OutputImagePixelType;
152 
153 protected:
156  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
157 
158  void GenerateData(void) ITK_OVERRIDE;
159 
165 
166 private:
167 
169  typedef unsigned int FilterPixelType;
170 
171  itkStaticConstMacro(ImageDimension,
172  unsigned int,
173  TInputImage::ImageDimension);
174 
175  typedef itk::Image< FilterPixelType, itkGetStaticConstMacro(ImageDimension) >
177 
179 
180  ThresholdMaximumConnectedComponentsImageFilter(const Self &) ITK_DELETE_FUNCTION;
181  void operator=(const Self &) ITK_DELETE_FUNCTION;
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 
214  typename MinMaxCalculatorType::Pointer m_MinMaxCalculator;
215 
216  // Variables defined by the user
218 
219  // Binary threshold variables
222 
225 
226  // Filter variables
229 };
230 } // end namespace itk
231 
232 #ifndef ITK_MANUAL_INSTANTIATION
233 #include "itkThresholdMaximumConnectedComponentsImageFilter.hxx"
234 #endif
235 
236 #endif
Base class for all process objects that output image data.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
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...
typedef(Concept::Comparable< PixelType >) PixelTypeComparable
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.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TOutputImage OutputImageType
#define itkConceptMacro(name, concept)
void PrintSelf(std::ostream &os, Indent indent) const override
Templated n-dimensional image class.
Definition: itkImage.h:75
Label the objects in a binary image.