ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkThresholdMaximumConnectedComponentsImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
28namespace itk
29{
67template <typename TInputImage, typename TOutputImage = TInputImage>
69 : public ImageToImageFilter<TInputImage, TOutputImage>
70{
71public:
72 ITK_DISALLOW_COPY_AND_MOVE(ThresholdMaximumConnectedComponentsImageFilter);
73
79
81 itkNewMacro(Self);
82
84 itkOverrideGetNameOfClassMacro(ThresholdMaximumConnectedComponentsImageFilter);
85
87 using PixelType = typename TInputImage::PixelType;
88 using OutputPixelType = typename TOutputImage::PixelType;
89
91 itkConceptMacro(PixelTypeComparable, (Concept::Comparable<PixelType>));
92
100 itkSetMacro(MinimumObjectSizeInPixels, unsigned int);
101 itkGetConstMacro(MinimumObjectSizeInPixels, unsigned int);
103
117 itkSetMacro(InsideValue, OutputPixelType);
118 itkSetMacro(OutsideValue, OutputPixelType);
119 itkSetMacro(UpperBoundary, PixelType);
120 itkGetConstMacro(InsideValue, OutputPixelType);
121 itkGetConstMacro(OutsideValue, OutputPixelType);
122 itkGetConstMacro(UpperBoundary, PixelType);
124
129 itkGetConstMacro(NumberOfObjects, SizeValueType);
130
134 itkGetConstMacro(ThresholdValue, PixelType);
135
137 using InputImageType = TInputImage;
138 using InputImagePointer = typename InputImageType::ConstPointer;
139 using InputImageRegionType = typename InputImageType::RegionType;
140 using InputImagePixelType = typename InputImageType::PixelType;
141
143 using OutputImageType = TOutputImage;
144 using OutputImagePointer = typename OutputImageType::Pointer;
145 using OutputImageRegionType = typename OutputImageType::RegionType;
146 using OutputImagePixelType = typename OutputImageType::PixelType;
147
148protected:
151 void
152 PrintSelf(std::ostream & os, Indent indent) const override;
153
163 void
164 GenerateData() override;
165
172
173private:
175 using FilterPixelType = unsigned int;
176
177 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
178
180
182
183 //
184 // Binary Threshold Filter
185 //
187
188 //
189 // Connected Components Filter
190 //
192
193 //
194 // Relabeled Components Filter
195 //
197
198 //
199 // Minimum maximum calculator
200 //
202
203 //
204 // Declare member variables for the filters of the internal pipeline.
205 //
208
210
212
213 // Variables defined by the user
215
216 // Binary threshold variables
219
222
223 // Filter variables
226};
227} // end namespace itk
228
229#ifndef ITK_MANUAL_INSTANTIATION
230# include "itkThresholdMaximumConnectedComponentsImageFilter.hxx"
231#endif
232
233#endif
Binarize an input image by thresholding.
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:50
Computes the minimum and the maximum intensity values of an image.
Relabel the components in an image such that consecutive labels are used.
Implements transparent reference counting.
void PrintSelf(std::ostream &os, Indent indent) const override
RelabelComponentImageFilter< FilterImageType, FilterImageType > RelabelFilterType
ConnectedComponentImageFilter< OutputImageType, FilterImageType > ConnectedFilterType
BinaryThresholdImageFilter< InputImageType, OutputImageType > ThresholdFilterType
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:86