ITK  4.2.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  itkGetObjectMacro(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 protected:
164 
167 
168  void PrintSelf(std::ostream & os, Indent indent) const;
169 
173  void GenerateInputRequestedRegion();
174 
181  void GenerateOutputInformation();
182 
184  void EnlargeOutputRequestedRegion(DataObject *output);
185 
186 private:
187 
188  HoughTransform2DLinesImageFilter(const Self &);
189  void operator=(const Self &);
190 
192  float m_Threshold;
197  float m_Variance;
198  unsigned long m_OldModifiedTime;
200 };
201 } // end namespace itk
202 
203 #ifndef ITK_MANUAL_INSTANTIATION
204 #include "itkHoughTransform2DLinesImageFilter.hxx"
205 #endif
206 
207 #endif
208