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