Orfeo Toolbox  4.0
otbLocalHoughFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbLocalHoughFilter_h
19 #define __otbLocalHoughFilter_h
20 
21 
22 #include "itkProcessObject.h"
24 
27 #include "otbExtractROI.h"
28 #include "otbImage.h"
29 
30 namespace otb
31 {
46 template <class TInputImage>
47 class ITK_EXPORT LocalHoughFilter : public ImageToLineSpatialObjectListFilter<TInputImage>
48 {
49 public:
50 
56 
58  itkNewMacro(Self);
59 
62 
64  typedef typename Superclass::LinesListType LinesListType;
65  typedef typename LinesListType::const_iterator LineIterator;
66 
68  typedef typename LineType::Pointer LinePointer;
69 
72 
74  itkStaticConstMacro(InputImageDimension,
75  unsigned int,
76  TInputImage::ImageDimension);
77 
78  typedef TInputImage InputImageType;
79 
80  //------------------------------------------------------------
81  typedef unsigned char OutputPixelType;
83  //-----------------------------------------------
84 
86  typedef typename InputImageType::PixelType InputPixelType;
87  typedef float AccumulatorPixelType;
88 
89  typedef typename InputImageType::RegionType InputImageRegionType;
90 
92  typedef typename InputImageType::SizeType SizeType;
93 
94  typedef typename InputImageType::RegionType::IndexType IndexType;
95 
98 
100  itkSetMacro(Radius, SizeType);
101 
103  itkGetConstReferenceMacro(Radius, SizeType);
104 
106  itkSetMacro(Overlap, SizeType);
107 
109  itkGetConstReferenceMacro(Overlap, SizeType);
110 
112  itkSetMacro(NumberOfLines, unsigned int);
113 
115  itkGetConstReferenceMacro(NumberOfLines, unsigned int);
116 
119  itkSetMacro(DiscRadius, float);
120  itkGetMacro(DiscRadius, float);
121 
123  itkSetMacro(Variance, float);
124  itkGetMacro(Variance, float);
125 
126  itkSetMacro(Threshold, float);
127  itkGetMacro(Threshold, float);
128 
129 protected:
131  virtual ~LocalHoughFilter() {}
132  void PrintSelf(std::ostream& os, itk::Indent indent) const;
133 
136 
137  virtual void GenerateData();
138 
139 private:
140  LocalHoughFilter(const Self &); //purposely not implemented
141  void operator =(const Self&); //purposely not implemented
142 
145 
148 
150  unsigned int m_NumberOfLines;
151 
153  float m_Variance;
154 
157 
159  float m_Threshold;
160 
161  LinePointer LinePointResearch(LineIterator itLines, InputImageType *localImage, IndexType origin);
162 
163 };
164 
165 } // end namespace otb
166 
167 #ifndef OTB_MANUAL_INSTANTIATION
168 #include "otbLocalHoughFilter.txx"
169 #endif
170 
171 #endif

Generated at Sat Mar 8 2014 16:06:03 for Orfeo Toolbox with doxygen 1.8.3.1