ITK  4.8.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  //purposely not implemented
182  void operator=(const Self &); //purposely not implemented
183 
184  //
185  // Binary Threshold Filter
186  //
189 
190  //
191  // Connected Components Filter
192  //
195 
196  //
197  // Relabeled Components Filter
198  //
201 
202  //
203  // Minimum maximum calculator
204  //
206 
207  //
208  // Declare member variables for the filters of the internal pipeline.
209  //
212 
214 
215  typename MinMaxCalculatorType::Pointer m_MinMaxCalculator;
216 
217  // Variables defined by the user
219 
220  // Binary threshold variables
223 
226 
227  // Filter variables
230 };
231 } // end namespace itk
232 
233 #ifndef ITK_MANUAL_INSTANTIATION
234 #include "itkThresholdMaximumConnectedComponentsImageFilter.hxx"
235 #endif
236 
237 #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.