OTB  10.0.0
Orfeo Toolbox
otbDisparityMapEstimationMethod.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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);
119 
121  itkSetObjectMacro(Metric, MetricType);
124 
126  itkSetObjectMacro(Transform, TransformType);
129 
131  itkSetObjectMacro(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:
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
This class performs an estimation of the local displacement modelled by a given transform between the...
itkGetObjectMacro(Optimizer, OptimizerType)
TransformOutputType::ConstPointer TransformOutputConstPointerType
TransformOutputType::Pointer TransformOutputPointerType
itk::DataObjectDecorator< TransformType > TransformOutputType
itkGetObjectMacro(Metric, MetricType)
itk::SmartPointer< const Self > ConstPointer
DisparityMapEstimationMethod(const Self &)=delete
MetricType::TransformParametersType ParametersType
MetricType::FixedImageRegionType FixedImageRegionType
itkGetObjectMacro(Interpolator, InterpolatorType)
void operator=(const Self &)=delete
itk::ImageToImageMetric< FixedImageType, MovingImageType > MetricType
itkGetObjectMacro(Transform, TransformType)
itk::SingleValuedNonLinearOptimizer OptimizerType
Base class for all process objects that output point set data.
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:42
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.