ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkHoughTransform2DLinesImageFilter.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 itkHoughTransform2DLinesImageFilter_h
19 #define itkHoughTransform2DLinesImageFilter_h
20 
21 
22 #include "itkImageToImageFilter.h"
23 #include "itkLineSpatialObject.h"
24 
25 namespace itk
26 {
63 template< typename TInputPixelType, typename TOutputPixelType >
65  public ImageToImageFilter< Image< TInputPixelType, 2 >, Image< TOutputPixelType, 2 > >
66 {
67 public:
68 
71 
76 
80 
84 
87  typedef typename LineType::Pointer LinePointer;
88  typedef std::list< LinePointer > LinesListType;
90 
91  typedef typename LinesListType::size_type LinesListSizeType;
92 
95 
98 
101 
104 
107 
109  itkNewMacro(Self);
110 
112  void GenerateData() ITK_OVERRIDE;
113 
116  itkSetMacro(Threshold, float);
117 
119  itkGetConstMacro(Threshold, float);
120 
124  itkSetMacro(AngleResolution, float);
125 
127  itkGetConstMacro(AngleResolution, float);
128 
130  void Simplify();
131 
133  itkGetModifiableObjectMacro(SimplifyAccumulator, OutputImageType);
134 
136  LinesListType & GetLines(unsigned int n = 0);
137 
139  itkSetMacro(NumberOfLines, unsigned int);
140  itkGetConstMacro(NumberOfLines, unsigned int);
142 
145  itkSetMacro(DiscRadius, float);
146  itkGetConstMacro(DiscRadius, float);
148 
150  itkSetMacro(Variance, float);
151  itkGetConstMacro(Variance, float);
153 
154 #ifdef ITK_USE_CONCEPT_CHECKING
155  // Begin concept checking
156  itkConceptMacro( IntConvertibleToOutputCheck,
158  itkConceptMacro( InputGreaterThanFloatCheck,
160  itkConceptMacro( OutputPlusIntCheck,
162  // End concept checking
163 #endif
164 
165 protected:
166 
169 
170  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
171 
175  void GenerateInputRequestedRegion() ITK_OVERRIDE;
176 
183  void GenerateOutputInformation() ITK_OVERRIDE;
184 
186  void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
187 
188 private:
189 
191  void operator=(const Self &);
192 
194  float m_Threshold;
199  float m_Variance;
202 };
203 } // end namespace itk
204 
205 #ifndef ITK_MANUAL_INSTANTIATION
206 #include "itkHoughTransform2DLinesImageFilter.hxx"
207 #endif
208 
209 #endif
Superclass::RegionType RegionType
Definition: itkImage.h:137
void PrintSelf(std::ostream &os, Indent indent) const override
Light weight base class for most itk classes.
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
TPixel PixelType
Definition: itkImage.h:89
Point used for a line definition.
Superclass::IndexType IndexType
Definition: itkImage.h:119
Representation of a Line based on the spatial object classes.
ImageToImageFilter< InputImageType, OutputImageType > Superclass
Performs the Hough Transform to find 2D straight lines in a 2D image.
Base class for filters that take an image as input and produce an image as output.
LinesListType & GetLines(unsigned int n=0)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void EnlargeOutputRequestedRegion(DataObject *output) override
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75