ITK  6.0.0
Insight Toolkit
itkHoughTransform2DCirclesImageFilter.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 itkHoughTransform2DCirclesImageFilter_h
19#define itkHoughTransform2DCirclesImageFilter_h
20
21
24
25namespace itk
26{
60template <typename TInputPixelType, typename TOutputPixelType, typename TRadiusPixelType>
61class ITK_TEMPLATE_EXPORT HoughTransform2DCirclesImageFilter
62 : public ImageToImageFilter<Image<TInputPixelType, 2>, Image<TOutputPixelType, 2>>
63{
64public:
65 ITK_DISALLOW_COPY_AND_MOVE(HoughTransform2DCirclesImageFilter);
66
72
77
81
85
88
91
94
98 using CirclesListType = std::list<CirclePointer>;
99
100 using CirclesListSizeType = typename CirclesListType::size_type;
101
103 itkOverrideGetNameOfClassMacro(HoughTransform2DCirclesImageFilter);
104
106 itkNewMacro(Self);
107
109 void
110 VerifyPreconditions() const override;
111
113 void
114 GenerateData() override;
115
117 void
118 SetRadius(double radius);
119
121 itkSetMacro(MinimumRadius, double);
122 itkGetConstMacro(MinimumRadius, double);
126 itkSetMacro(MaximumRadius, double);
127 itkGetConstMacro(MaximumRadius, double);
132 itkSetMacro(Threshold, double);
133
135 itkGetConstMacro(Threshold, double);
136
139 itkSetMacro(GradientNormThreshold, double);
140 itkGetConstMacro(GradientNormThreshold, double);
144 itkGetModifiableObjectMacro(RadiusImage, RadiusImageType);
145
147 itkSetMacro(SigmaGradient, double);
148
150 itkGetConstMacro(SigmaGradient, double);
151
158
160 itkSetMacro(NumberOfCircles, CirclesListSizeType);
161 itkGetConstMacro(NumberOfCircles, CirclesListSizeType);
166 itkSetMacro(DiscRadiusRatio, double);
167 itkGetConstMacro(DiscRadiusRatio, double);
171 itkSetMacro(Variance, double);
172 itkGetConstMacro(Variance, double);
176 itkSetMacro(SweepAngle, double);
177 itkGetConstMacro(SweepAngle, double);
182 itkSetMacro(UseImageSpacing, bool);
183 itkGetConstMacro(UseImageSpacing, bool);
187#ifdef ITK_USE_CONCEPT_CHECKING
188 // Begin concept checking
189 itkConceptMacro(IntConvertibleToOutputCheck, (Concept::Convertible<int, TOutputPixelType>));
193 // End concept checking
194#endif
195
196protected:
199
200 void
201 PrintSelf(std::ostream & os, Indent indent) const override;
202
206 void
208
213 void
214 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
215
216private:
217 double m_SweepAngle{ 0.0 };
218 double m_MinimumRadius{ 0.0 };
219 double m_MaximumRadius{ 10.0 };
220 double m_Threshold{ 0.0 };
221 double m_GradientNormThreshold{ 1.0 };
222 double m_SigmaGradient{ 1.0 };
223
224 RadiusImagePointer m_RadiusImage{};
225 CirclesListType m_CirclesList{};
226 CirclesListSizeType m_NumberOfCircles{ 1 };
227 double m_DiscRadiusRatio{ 1 };
228 double m_Variance{ 10 };
229 bool m_UseImageSpacing{ true };
230 ModifiedTimeType m_OldModifiedTime{ 0 };
231};
232} // end namespace itk
233
234#ifndef ITK_MANUAL_INSTANTIATION
235# include "itkHoughTransform2DCirclesImageFilter.hxx"
236#endif
237
238#endif
Base class for all data objects in ITK.
Performs the Hough Transform to find circles in a 2D image.
void PrintSelf(std::ostream &os, Indent indent) const override
void VerifyPreconditions() const override
~HoughTransform2DCirclesImageFilter() override=default
void EnlargeOutputRequestedRegion(DataObject *) override
typename InputImageType::ConstPointer InputImageConstPointer
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition: itkImage.h:89
TPixel PixelType
Definition: itkImage.h:108
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType ModifiedTimeType
Definition: itkIntTypes.h:105