Orfeo Toolbox  3.16
otbStereoSensorModelToElevationMapFilter.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 __otbStereoSensorModelToElevationMapFilter_h
19 #define __otbStereoSensorModelToElevationMapFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 #include "otbGenericRSTransform.h"
25 
26 namespace otb
27 {
77 template <class TInputImage, class TOutputHeight>
79  : public itk::ImageToImageFilter<TInputImage, TOutputHeight>
80 {
81 public:
87 
89  itkNewMacro(Self);
90 
92  itkTypeMacro(StereoSensorModelToElevationFilter, ImageToImageFilter);
93 
95  typedef TInputImage InputImageType;
96  typedef typename InputImageType::PixelType InputPixelType;
97  typedef TOutputHeight OutputImageType;
98  typedef typename OutputImageType::RegionType OutputRegionType;
99  typedef typename OutputImageType::PixelType HeightType;
100  typedef typename OutputImageType::PointType OutputPointType;
101 
107  <TInputImage, TInputImage> CorrelationMetricType;
108  typedef typename InputImageType::SizeType RadiusType;
109 
111  void SetMasterInput(const TInputImage * image);
112 
114  void SetSlaveInput(const TInputImage * image);
115 
117  const TInputImage * GetMasterInput() const;
118 
120  const TInputImage * GetSlaveInput() const;
121 
123  TOutputHeight * GetCorrelationOutput();
124 
125  // Deprecated calls to elevation setters
127 
131  itkLegacyMacro(itkSetMacro(UseDEM, bool));
132 
136  itkLegacyMacro(itkGetMacro(UseDEM, bool));
137 
142  itkLegacyMacro(itkBooleanMacro(UseDEM));
143 
147  itkSetMacro(LowerElevation, double);
148 
152  itkSetMacro(HigherElevation, double);
153 
155  itkSetMacro(ElevationStep, double);
156 
160  itkSetMacro(CorrelationThreshold, double);
161 
165  itkGetMacro(CorrelationThreshold, double);
166 
170  itkSetMacro(VarianceThreshold, double);
171 
175  itkGetMacro(VarianceThreshold, double);
176 
181  itkSetMacro(SubtractInitialElevation, bool);
182 
187  itkGetMacro(SubtractInitialElevation, bool);
188 
193  itkBooleanMacro(SubtractInitialElevation);
194 
196  void SetRadius(unsigned int radius)
197  {
198  m_Radius.Fill(radius);
199  this->Modified();
200  }
201 
202 protected:
205 
208 
210  virtual void ThreadedGenerateData(const OutputRegionType& outputRegionForThread,
211  int threadId);
212 
214  virtual void GenerateInputRequestedRegion(void);
215 
217  virtual void BeforeThreadedGenerateData();
218 
219 private:
220  StereoSensorModelToElevationFilter(const Self&); // purposely not implemented
221  void operator=(const Self&); // purposely not implemented
222 
223  inline double Correlation(const std::vector<double>& master,
224  const std::vector<double>& slave) const;
225 
228 
231 
234 
237 
240 
243  bool m_UseDEM;
244 
247 
251 
256 };
257 } // End namespace otb
258 
259 #ifndef OTB_MANUAL_INSTANTIATION
261 #endif
262 
263 #endif

Generated at Sun Feb 3 2013 00:48:46 for Orfeo Toolbox with doxygen 1.8.1.1