ITK  4.4.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 {
61 template< typename TInputPixelType, typename TOutputPixelType >
63  public ImageToImageFilter< Image< TInputPixelType, 2 >, Image< TOutputPixelType, 2 > >
64 {
65 public:
66 
69 
74 
78 
82 
85  typedef typename LineType::Pointer LinePointer;
86  typedef std::list< LinePointer > LinesListType;
88 
89  typedef typename LinesListType::size_type LinesListSizeType;
90 
93 
96 
99 
102 
105 
107  itkNewMacro(Self);
108 
110  void GenerateData();
111 
114  itkSetMacro(Threshold, float);
115 
117  itkGetConstMacro(Threshold, float);
118 
122  itkSetMacro(AngleResolution, float);
123 
125  itkGetConstMacro(AngleResolution, float);
126 
128  void Simplify(void);
129 
131  itkGetModifiableObjectMacro(SimplifyAccumulator, OutputImageType);
132 
134  LinesListType & GetLines(unsigned int n = 0);
135 
137  itkSetMacro(NumberOfLines, unsigned int);
138  itkGetConstMacro(NumberOfLines, unsigned int);
140 
143  itkSetMacro(DiscRadius, float);
144  itkGetConstMacro(DiscRadius, float);
146 
148  itkSetMacro(Variance, float);
149  itkGetConstMacro(Variance, float);
151 
152 #ifdef ITK_USE_CONCEPT_CHECKING
153 
154  itkConceptMacro( IntConvertibleToOutputCheck,
156  itkConceptMacro( InputGreaterThanFloatCheck,
158  itkConceptMacro( OutputPlusIntCheck,
160 
162 #endif
163 
164 protected:
165 
168 
169  void PrintSelf(std::ostream & os, Indent indent) const;
170 
174  void GenerateInputRequestedRegion();
175 
182  void GenerateOutputInformation();
183 
185  void EnlargeOutputRequestedRegion(DataObject *output);
186 
187 private:
188 
189  HoughTransform2DLinesImageFilter(const Self &);
190  void operator=(const Self &);
191 
193  float m_Threshold;
198  float m_Variance;
201 };
202 } // end namespace itk
203 
204 #ifndef ITK_MANUAL_INSTANTIATION
205 #include "itkHoughTransform2DLinesImageFilter.hxx"
206 #endif
207 
208 #endif
209