Orfeo Toolbox  4.0
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 
128  itkSetMacro(LowerElevation, double);
129 
133  itkSetMacro(HigherElevation, double);
134 
136  itkSetMacro(ElevationStep, double);
137 
141  itkSetMacro(CorrelationThreshold, double);
142 
146  itkGetMacro(CorrelationThreshold, double);
147 
151  itkSetMacro(VarianceThreshold, double);
152 
156  itkGetMacro(VarianceThreshold, double);
157 
162  itkSetMacro(SubtractInitialElevation, bool);
163 
168  itkGetMacro(SubtractInitialElevation, bool);
169 
174  itkBooleanMacro(SubtractInitialElevation);
175 
177  void SetRadius(unsigned int radius)
178  {
179  m_Radius.Fill(radius);
180  this->Modified();
181  }
182 
183 protected:
186 
189 
191  virtual void ThreadedGenerateData(const OutputRegionType& outputRegionForThread,
192  itk::ThreadIdType threadId);
193 
195  virtual void GenerateInputRequestedRegion(void);
196 
198  virtual void BeforeThreadedGenerateData();
199 
205  virtual void VerifyInputInformation() {}
206 
207 
208 private:
209  StereoSensorModelToElevationFilter(const Self&); // purposely not implemented
210  void operator=(const Self&); // purposely not implemented
211 
212  inline double Correlation(const std::vector<double>& master,
213  const std::vector<double>& slave) const;
214 
217 
220 
223 
226 
229 
232  bool m_UseDEM;
233 
236 
240 
245 };
246 } // End namespace otb
247 
248 #ifndef OTB_MANUAL_INSTANTIATION
250 #endif
251 
252 #endif

Generated at Sat Mar 8 2014 16:19:30 for Orfeo Toolbox with doxygen 1.8.3.1