ITK  6.0.0
Insight Toolkit
itkHoughTransform2DLinesImageFilter.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 itkHoughTransform2DLinesImageFilter_h
19#define itkHoughTransform2DLinesImageFilter_h
20
21
24
25namespace itk
26{
61template <typename TInputPixelType, typename TOutputPixelType>
62class ITK_TEMPLATE_EXPORT HoughTransform2DLinesImageFilter
63 : public ImageToImageFilter<Image<TInputPixelType, 2>, Image<TOutputPixelType, 2>>
64{
65public:
66 ITK_DISALLOW_COPY_AND_MOVE(HoughTransform2DLinesImageFilter);
67
70
75
79
83
87 using LinesListType = std::list<LinePointer>;
89
90 using LinesListSizeType = typename LinesListType::size_type;
91
94
97
100
103
105 itkOverrideGetNameOfClassMacro(HoughTransform2DLinesImageFilter);
106
108 itkNewMacro(Self);
109
111 void
112 GenerateData() override;
113
116 itkSetMacro(Threshold, double);
117 itkGetConstMacro(Threshold, double);
123 itkSetMacro(AngleResolution, double);
124 itkGetConstMacro(AngleResolution, double);
130 void
132
134 itkGetModifiableObjectMacro(SimplifyAccumulator, OutputImageType);
135
139
141 itkSetMacro(NumberOfLines, LinesListSizeType);
142 itkGetConstMacro(NumberOfLines, LinesListSizeType);
147 itkSetMacro(DiscRadius, double);
148 itkGetConstMacro(DiscRadius, double);
152 itkSetMacro(Variance, double);
153 itkGetConstMacro(Variance, double);
156#ifdef ITK_USE_CONCEPT_CHECKING
157 // Begin concept checking
158 itkConceptMacro(IntConvertibleToOutputCheck, (Concept::Convertible<int, TOutputPixelType>));
161 // End concept checking
162#endif
163
164protected:
167
168 void
169 PrintSelf(std::ostream & os, Indent indent) const override;
170
174 void
176
183 void
185
187 void
189
190private:
191 double m_AngleResolution{ 500 };
192 double m_Threshold{ 0 };
193
194 OutputImagePointer m_SimplifyAccumulator{};
195 LinesListType m_LinesList{};
196 LinesListSizeType m_NumberOfLines{ 1 };
197 double m_DiscRadius{ 10 };
198 double m_Variance{ 5 };
199 ModifiedTimeType m_OldModifiedTime{ 0 };
200};
201} // end namespace itk
202
203#ifndef ITK_MANUAL_INSTANTIATION
204# include "itkHoughTransform2DLinesImageFilter.hxx"
205#endif
206
207#endif
Base class for all data objects in ITK.
Performs the Hough Transform to find 2D straight lines in a 2D image.
typename InputImageType::ConstPointer InputImageConstPointer
~HoughTransform2DLinesImageFilter() override=default
void EnlargeOutputRequestedRegion(DataObject *output) override
typename InputImageType::RegionType OutputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
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.
Point used for a line definition.
Representation of a Line based on the spatial object 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