ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkHoughTransform2DCirclesImageFilter.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 itkHoughTransform2DCirclesImageFilter_h
19 #define itkHoughTransform2DCirclesImageFilter_h
20 
21 
22 #include "itkImageToImageFilter.h"
24 
25 namespace itk
26 {
63 template< typename TInputPixelType, typename TOutputPixelType, typename TRadiusPixelType = TOutputPixelType >
64 class ITK_TEMPLATE_EXPORT HoughTransform2DCirclesImageFilter:
65  public ImageToImageFilter< Image< TInputPixelType, 2 >, Image< TOutputPixelType, 2 > >
66 {
67 public:
68 
75 
80 
84 
88 
91 
94 
97 
101  typedef std::list< CirclePointer > CirclesListType;
102 
103  typedef typename CirclesListType::size_type CirclesListSizeType;
104 
107 
109  itkNewMacro(Self);
110 
112  void GenerateData() ITK_OVERRIDE;
113 
115  void SetRadius(double radius);
116 
118  itkSetMacro(MinimumRadius, double);
119  itkGetConstMacro(MinimumRadius, double);
121 
123  itkSetMacro(MaximumRadius, double);
124  itkGetConstMacro(MaximumRadius, double);
126 
129  itkSetMacro(Threshold, double);
130 
132  itkGetConstMacro(Threshold, double);
133 
135  itkGetModifiableObjectMacro(RadiusImage, RadiusImageType);
136 
138  itkSetMacro(SigmaGradient, double);
139 
141  itkGetConstMacro(SigmaGradient, double);
142 
144  CirclesListType & GetCircles();
145 
148  itkLegacyMacro(CirclesListType & GetCircles(unsigned int n));
149 
151  itkSetMacro(NumberOfCircles, CirclesListSizeType);
152  itkGetConstMacro(NumberOfCircles, CirclesListSizeType);
154 
157  itkSetMacro(DiscRadiusRatio, float);
158  itkGetConstMacro(DiscRadiusRatio, float);
160 
162  itkSetMacro(Variance, float);
163  itkGetConstMacro(Variance, float);
165 
167  itkSetMacro(SweepAngle, float);
168  itkGetConstMacro(SweepAngle, float);
170 
171 #ifdef ITK_USE_CONCEPT_CHECKING
172  // Begin concept checking
173  itkConceptMacro( IntConvertibleToOutputCheck,
175  itkConceptMacro( InputGreaterThanDoubleCheck,
177  itkConceptMacro( OutputPlusIntCheck,
179  itkConceptMacro( OutputDividedByIntCheck,
181  // End concept checking
182 #endif
183 
184 protected:
185 
187  virtual ~HoughTransform2DCirclesImageFilter() ITK_OVERRIDE {}
188 
189  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
190 
194  void GenerateInputRequestedRegion() ITK_OVERRIDE;
195 
200  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE;
201 
202 private:
203 
204  ITK_DISALLOW_COPY_AND_ASSIGN(HoughTransform2DCirclesImageFilter);
205 
206  float m_SweepAngle;
207  double m_MinimumRadius;
208  double m_MaximumRadius;
209  double m_Threshold;
210  double m_SigmaGradient;
211 
212  RadiusImagePointer m_RadiusImage;
213  CirclesListType m_CirclesList;
214  CirclesListSizeType m_NumberOfCircles;
215  float m_DiscRadiusRatio;
216  float m_Variance;
217  ModifiedTimeType m_OldModifiedTime;
218 };
219 } // end namespace itk
220 
221 #ifndef ITK_MANUAL_INSTANTIATION
222 #include "itkHoughTransform2DCirclesImageFilter.hxx"
223 #endif
224 
225 #endif
Superclass::RegionType RegionType
Definition: itkImage.h:137
Light weight base class for most itk classes.
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
TPixel PixelType
Definition: itkImage.h:89
ImageToImageFilter< Image< TInputPixelType, 2 >, Image< TOutputPixelType, 2 > > Superclass
Performs the Hough Transform to find circles in a 2D image.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75