OTB  9.0.0
Orfeo Toolbox
otbDisparityMapEstimationMethod.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbDisparityMapEstimationMethod_h
22 #define otbDisparityMapEstimationMethod_h
23 
24 #include "itkImageToImageMetric.h"
25 #include "itkSingleValuedNonLinearOptimizer.h"
26 #include "itkDataObjectDecorator.h"
27 #include "itkPointSet.h"
28 #include "otbPointSetSource.h"
29 
30 namespace otb
31 {
55 template <class TFixedImage, class TMovingImage, class TPointSet>
56 class ITK_EXPORT DisparityMapEstimationMethod : public PointSetSource<TPointSet>
57 {
58 public:
62  typedef itk::SmartPointer<Self> Pointer;
63  typedef itk::SmartPointer<const Self> ConstPointer;
64 
66  itkNewMacro(Self);
67 
69  itkTypeMacro(DisparityMapEstimationMethod, ProcessObject);
70 
72  typedef TFixedImage FixedImageType;
73  typedef typename FixedImageType::Pointer FixedImagePointerType;
74  typedef typename FixedImageType::PixelType FixedPixelType;
75  typedef typename FixedImageType::SizeType SizeType;
76 
78  typedef TMovingImage MovingImageType;
79  typedef typename MovingImageType::Pointer MovingImagePointerType;
80  typedef typename MovingImageType::PixelType MovingPixelType;
81 
83  typedef TPointSet PointSetType;
84  typedef typename PointSetType::Pointer PointSetPointerType;
85 
87  typedef itk::ImageToImageMetric<FixedImageType, MovingImageType> MetricType;
88  typedef typename MetricType::Pointer MetricPointerType;
89  typedef typename MetricType::FixedImageRegionType FixedImageRegionType;
90 
92  typedef typename MetricType::TransformType TransformType;
93  typedef typename TransformType::Pointer TransformPointerType;
94 
96  typedef itk::DataObjectDecorator<TransformType> TransformOutputType;
97  typedef typename TransformOutputType::Pointer TransformOutputPointerType;
98  typedef typename TransformOutputType::ConstPointer TransformOutputConstPointerType;
99 
101  typedef typename MetricType::InterpolatorType InterpolatorType;
102  typedef typename InterpolatorType::Pointer InterpolatorPointerType;
103 
105  typedef itk::SingleValuedNonLinearOptimizer OptimizerType;
106  typedef typename OptimizerType::Pointer OptimizerPointerType;
107 
110  typedef typename MetricType::TransformParametersType ParametersType;
111 
113  typedef typename itk::DataObject::Pointer DataObjectPointer;
114 
116  itkSetObjectMacro(Optimizer, OptimizerType);
117  itkGetObjectMacro(Optimizer, OptimizerType);
119 
121  itkSetObjectMacro(Metric, MetricType);
122  itkGetObjectMacro(Metric, MetricType);
124 
126  itkSetObjectMacro(Transform, TransformType);
127  itkGetObjectMacro(Transform, TransformType);
129 
131  itkSetObjectMacro(Interpolator, InterpolatorType);
132  itkGetObjectMacro(Interpolator, InterpolatorType);
134 
136  itkSetMacro(WinSize, SizeType);
137  itkGetMacro(WinSize, SizeType);
139 
141  itkSetMacro(ExploSize, SizeType);
142  itkGetMacro(ExploSize, SizeType);
144 
146  itkSetMacro(InitialTransformParameters, ParametersType);
147  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
149 
154  void SetPointSet(const TPointSet* pointset);
155 
160  const TPointSet* GetPointSet(void);
161 
166  void SetFixedImage(const TFixedImage* image);
167 
172  const TFixedImage* GetFixedImage(void);
173 
178  void SetMovingImage(const TMovingImage* image);
179 
184  const TMovingImage* GetMovingImage(void);
185 
186 protected:
191 
195  ~DisparityMapEstimationMethod() override;
196 
200  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
201 
205  void GenerateData() override;
206 
207 private:
208  DisparityMapEstimationMethod(const Self&) = delete;
209  void operator=(const Self&) = delete;
214 
219 
224 
229 
234 
239 
244 };
245 } // end namespace otb
246 #ifndef OTB_MANUAL_INSTANTIATION
248 #endif
249 
250 #endif
otb::DisparityMapEstimationMethod::PointSetType
TPointSet PointSetType
Definition: otbDisparityMapEstimationMethod.h:83
otb::DisparityMapEstimationMethod::SizeType
FixedImageType::SizeType SizeType
Definition: otbDisparityMapEstimationMethod.h:75
otb::DisparityMapEstimationMethod::TransformPointerType
TransformType::Pointer TransformPointerType
Definition: otbDisparityMapEstimationMethod.h:93
otb::DisparityMapEstimationMethod::m_InitialTransformParameters
ParametersType m_InitialTransformParameters
Definition: otbDisparityMapEstimationMethod.h:233
otb::DisparityMapEstimationMethod::ParametersType
MetricType::TransformParametersType ParametersType
Definition: otbDisparityMapEstimationMethod.h:110
otb::DisparityMapEstimationMethod::MovingPixelType
MovingImageType::PixelType MovingPixelType
Definition: otbDisparityMapEstimationMethod.h:80
otb::DisparityMapEstimationMethod::m_Metric
MetricPointerType m_Metric
Definition: otbDisparityMapEstimationMethod.h:213
otb::DisparityMapEstimationMethod::OptimizerPointerType
OptimizerType::Pointer OptimizerPointerType
Definition: otbDisparityMapEstimationMethod.h:106
otb::DisparityMapEstimationMethod::Self
DisparityMapEstimationMethod Self
Definition: otbDisparityMapEstimationMethod.h:60
otb::DisparityMapEstimationMethod::m_ExploSize
SizeType m_ExploSize
Definition: otbDisparityMapEstimationMethod.h:238
otb::DisparityMapEstimationMethod::TransformOutputPointerType
TransformOutputType::Pointer TransformOutputPointerType
Definition: otbDisparityMapEstimationMethod.h:97
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::DisparityMapEstimationMethod::TransformOutputConstPointerType
TransformOutputType::ConstPointer TransformOutputConstPointerType
Definition: otbDisparityMapEstimationMethod.h:98
otbDisparityMapEstimationMethod.hxx
otb::DisparityMapEstimationMethod::MovingImagePointerType
MovingImageType::Pointer MovingImagePointerType
Definition: otbDisparityMapEstimationMethod.h:79
otb::DisparityMapEstimationMethod::MovingImageType
TMovingImage MovingImageType
Definition: otbDisparityMapEstimationMethod.h:78
otb::DisparityMapEstimationMethod::TransformOutputType
itk::DataObjectDecorator< TransformType > TransformOutputType
Definition: otbDisparityMapEstimationMethod.h:96
otb::DisparityMapEstimationMethod::Superclass
PointSetSource< TPointSet > Superclass
Definition: otbDisparityMapEstimationMethod.h:61
otb::DisparityMapEstimationMethod
This class performs an estimation of the local displacement modelled by a given transform between the...
Definition: otbDisparityMapEstimationMethod.h:56
otb::DisparityMapEstimationMethod::FixedPixelType
FixedImageType::PixelType FixedPixelType
Definition: otbDisparityMapEstimationMethod.h:74
otb::DisparityMapEstimationMethod::m_Transform
TransformPointerType m_Transform
Definition: otbDisparityMapEstimationMethod.h:223
otb::DisparityMapEstimationMethod::m_WinSize
SizeType m_WinSize
Definition: otbDisparityMapEstimationMethod.h:243
otb::DisparityMapEstimationMethod::FixedImageRegionType
MetricType::FixedImageRegionType FixedImageRegionType
Definition: otbDisparityMapEstimationMethod.h:89
otb::Transform
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:39
otb::DisparityMapEstimationMethod::MetricPointerType
MetricType::Pointer MetricPointerType
Definition: otbDisparityMapEstimationMethod.h:88
otb::PointSetSource
Base class for all process objects that output point set data.
Definition: otbPointSetSource.h:45
otb::DisparityMapEstimationMethod::OptimizerType
itk::SingleValuedNonLinearOptimizer OptimizerType
Definition: otbDisparityMapEstimationMethod.h:105
otb::DisparityMapEstimationMethod::m_Optimizer
OptimizerPointerType m_Optimizer
Definition: otbDisparityMapEstimationMethod.h:218
otb::DisparityMapEstimationMethod::FixedImagePointerType
FixedImageType::Pointer FixedImagePointerType
Definition: otbDisparityMapEstimationMethod.h:73
otb::DisparityMapEstimationMethod::PointSetPointerType
PointSetType::Pointer PointSetPointerType
Definition: otbDisparityMapEstimationMethod.h:84
otbPointSetSource.h
otb::DisparityMapEstimationMethod::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbDisparityMapEstimationMethod.h:62
otb::DisparityMapEstimationMethod::FixedImageType
TFixedImage FixedImageType
Definition: otbDisparityMapEstimationMethod.h:69
otb::DisparityMapEstimationMethod::MetricType
itk::ImageToImageMetric< FixedImageType, MovingImageType > MetricType
Definition: otbDisparityMapEstimationMethod.h:87
otb::DisparityMapEstimationMethod::DataObjectPointer
itk::DataObject::Pointer DataObjectPointer
Definition: otbDisparityMapEstimationMethod.h:113
otb::DisparityMapEstimationMethod::m_Interpolator
InterpolatorPointerType m_Interpolator
Definition: otbDisparityMapEstimationMethod.h:228
otb::DisparityMapEstimationMethod::InterpolatorPointerType
InterpolatorType::Pointer InterpolatorPointerType
Definition: otbDisparityMapEstimationMethod.h:102
otb::DisparityMapEstimationMethod::TransformType
MetricType::TransformType TransformType
Definition: otbDisparityMapEstimationMethod.h:92
otb::DisparityMapEstimationMethod::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbDisparityMapEstimationMethod.h:63
otb::DisparityMapEstimationMethod::InterpolatorType
MetricType::InterpolatorType InterpolatorType
Definition: otbDisparityMapEstimationMethod.h:101