OTB  9.0.0
Orfeo Toolbox
otbSarTransformBase.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 otbSarTransformBase_h
22 #define otbSarTransformBase_h
23 
24 #include "otbSensorTransformBase.h"
25 #include "otbSARMetadata.h"
26 #include "otbSarSensorModel.h"
27 
28 
29 namespace otb
30 {
45 template <class TScalarType, unsigned int NInputDimensions = 3, unsigned int NOutputDimensions = 2>
46 class ITK_EXPORT SarTransformBase : public SensorTransformBase<TScalarType, NInputDimensions, NOutputDimensions>
47 {
48 public:
53  using Pointer = itk::SmartPointer<Self>;
54  using ConstPointer = itk::SmartPointer<const Self> ;
55 
56  using InputPointType = itk::Point<TScalarType, NInputDimensions>;
57  using OutputPointType = itk::Point<TScalarType, NOutputDimensions>;
58  using TiePointsType = std::vector<std::pair<InputPointType,OutputPointType>>;
59  using PixelType =TScalarType;
61 
64 
65  itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
66  itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
67 
68  /*
69  * Provide the ImageMetadata in order to set the model.
70  * Return false if model not valid.
71  */
72  bool SetMetadata(const ImageMetadata& imd) override;
73 
75  bool IsValidSensorModel() const override;
76 
78  void OptimizeParameters(ImageMetadata& imd, const TiePointsType& tiepoints, double& rmsError) final;
79 
80 protected:
82  ~SarTransformBase() = default;
83  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
84 
85  std::unique_ptr<SARParam> m_SarParam;
86  std::unique_ptr<SarSensorModel> m_Transformer;
87 
88 private:
89  SarTransformBase(const Self&) = delete;
90  void operator=(const Self&) = delete;
91 };
92 
93 }
94 
95 #ifndef OTB_MANUAL_INSTANTIATION
96 #include "otbSarTransformBase.hxx"
97 #endif
98 
99 #endif
otb::SensorTransformBase::TiePointsType
std::vector< std::pair< InputPointType, OutputPointType > > TiePointsType
Definition: otbSensorTransformBase.h:61
otb::SensorTransformBase::OutputPointType
itk::Point< TScalarType, NOutputDimensions > OutputPointType
Definition: otbSensorTransformBase.h:60
otb::SensorTransformBase::InputPointType
itk::Point< TScalarType, NInputDimensions > InputPointType
Definition: otbSensorTransformBase.h:59
otbSarSensorModel.h
otb::Transform< TScalarType, 2, 3 >::TransformDirection
TransformDirection
Definition: otbPCAImageFilter.h:34
otb::SensorTransformBase::PixelType
TScalarType PixelType
Definition: otbSensorTransformBase.h:62
otbSarTransformBase.hxx
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbSARMetadata.h
otb::SarTransformBase::m_SarParam
std::unique_ptr< SARParam > m_SarParam
Definition: otbSarTransformBase.h:85
otb::SensorTransformBase::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSensorTransformBase.h:57
otb::SensorTransformBase::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSensorTransformBase.h:56
otb::Transform
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:39
otbSensorTransformBase.h
otb::SarTransformBase
Base projection class based on the Sar model.
Definition: otbSarTransformBase.h:46
otb::SarTransformBase::m_Transformer
std::unique_ptr< SarSensorModel > m_Transformer
Definition: otbSarTransformBase.h:86
otb::SensorTransformBase
Base class for the sensor model projection classes.
Definition: otbSensorTransformBase.h:48
otb::ImageMetadata
Generic class containing image metadata used in OTB.
Definition: otbImageMetadata.h:270
otb::SarTransformBase::SarTransformBase
SarTransformBase(TransformDirection dir)
Definition: otbSarTransformBase.h:81