ITK  4.12.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 {
53 template< typename TInputPixelType, typename TOutputPixelType >
54 class ITK_TEMPLATE_EXPORT HoughTransform2DCirclesImageFilter:
55  public ImageToImageFilter< Image< TInputPixelType, 2 >, Image< TOutputPixelType, 2 > >
56 {
57 public:
58 
65 
70 
74 
77 
80 
83 
87  typedef std::list< CirclePointer > CirclesListType;
88 
89  typedef typename CirclesListType::size_type CirclesListSizeType;
90 
93 
95  itkNewMacro(Self);
96 
98  void GenerateData() ITK_OVERRIDE;
99 
101  void SetRadius(double radius);
102 
104  itkSetMacro(MinimumRadius, double);
105  itkGetConstMacro(MinimumRadius, double);
107 
109  itkSetMacro(MaximumRadius, double);
110  itkGetConstMacro(MaximumRadius, double);
112 
115  itkSetMacro(Threshold, double);
116 
118  itkGetConstMacro(Threshold, double);
119 
121  itkGetModifiableObjectMacro(RadiusImage, OutputImageType);
122 
124  itkSetMacro(SigmaGradient, double);
125 
127  itkGetConstMacro(SigmaGradient, double);
128 
130  CirclesListType & GetCircles(unsigned int n = 0);
131 
133  itkSetMacro(NumberOfCircles, CirclesListSizeType);
134  itkGetConstMacro(NumberOfCircles, CirclesListSizeType);
136 
139  itkSetMacro(DiscRadiusRatio, float);
140  itkGetConstMacro(DiscRadiusRatio, float);
142 
144  itkSetMacro(Variance, float);
145  itkGetConstMacro(Variance, float);
147 
149  itkSetMacro(SweepAngle, float);
150  itkGetConstMacro(SweepAngle, float);
152 
153 #ifdef ITK_USE_CONCEPT_CHECKING
154  // Begin concept checking
155  itkConceptMacro( IntConvertibleToOutputCheck,
157  itkConceptMacro( InputGreaterThanDoubleCheck,
159  itkConceptMacro( OutputPlusIntCheck,
161  itkConceptMacro( OutputDividedByIntCheck,
163  // End concept checking
164 #endif
165 
166 protected:
167 
170 
171  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
172 
176  void GenerateInputRequestedRegion() ITK_OVERRIDE;
177 
182  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE;
183 
184 private:
185 
186  ITK_DISALLOW_COPY_AND_ASSIGN(HoughTransform2DCirclesImageFilter);
187 
188  float m_SweepAngle;
189  double m_MinimumRadius;
190  double m_MaximumRadius;
191  double m_Threshold;
192  double m_SigmaGradient;
193 
194  OutputImagePointer m_RadiusImage;
195  CirclesListType m_CirclesList;
196  CirclesListSizeType m_NumberOfCircles;
197  float m_DiscRadiusRatio;
198  float m_Variance;
199  ModifiedTimeType m_OldModifiedTime;
200 
201  CirclesListSizeType m_OldNumberOfCircles;
202 };
203 } // end namespace itk
204 
205 #ifndef ITK_MANUAL_INSTANTIATION
206 #include "itkHoughTransform2DCirclesImageFilter.hxx"
207 #endif
208 
209 #endif
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Light weight base class for most itk classes.
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
An image region represents a structured region of data.
TPixel PixelType
Definition: itkImage.h:89
ImageToImageFilter< Image< TInputPixelType, 2 >, Image< TOutputPixelType, 2 > > Superclass
Base class for all data objects in ITK.
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)
Templated n-dimensional image class.
Definition: itkImage.h:75