OTB  7.2.0
Orfeo Toolbox
otbGeocentricTransform.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2020 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 otbGeocentricTransform_h
22 #define otbGeocentricTransform_h
23 
25 #include "otbEllipsoidAdapter.h"
26 
27 namespace otb
28 {
36 template <TransformDirection::TransformationDirection TDirectionOfMapping, class TScalarType = double, unsigned int NInputDimensions = 3,
37  unsigned int NOutputDimensions = 3>
38 class ITK_EXPORT GeocentricTransform : public Transform<TScalarType, // Data type for scalars
39  NInputDimensions, // Number of dimensions in the input space
40  NOutputDimensions> // Number of dimensions in the output space
41 {
42 public:
46  typedef itk::SmartPointer<Self> Pointer;
47  typedef itk::SmartPointer<const Self> ConstPointer;
48 
50  typedef itk::Point<ScalarType, NInputDimensions> InputPointType;
51  typedef itk::Point<ScalarType, NOutputDimensions> OutputPointType;
52 
54  itkNewMacro(Self);
55 
57  itkTypeMacro(GeocentricTransform, Transform);
58 
59  static const TransformDirection::TransformationDirection DirectionOfMapping = TDirectionOfMapping;
60 
61  itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
62  itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
63  itkStaticConstMacro(SpaceDimension, unsigned int, NInputDimensions);
64  itkStaticConstMacro(ParametersDimension, unsigned int, NInputDimensions*(NInputDimensions + 1));
65 
66  OutputPointType TransformPoint(const InputPointType& point) const override;
67 
68 protected:
70  ~GeocentricTransform() override;
72 
73 private:
74  GeocentricTransform(const Self&) = delete;
75  void operator=(const Self&) = delete;
76 };
77 
78 } // namespace otb
79 
80 #ifndef OTB_MANUAL_INSTANTIATION
82 #endif
83 
84 #endif
itk::Point< ScalarType, NOutputDimensions > OutputPointType
itk::Point< ScalarType, NInputDimensions > InputPointType
Transform< TScalarType, NInputDimensions, NOutputDimensions > Superclass
Convert coordinates from geocentric (X, Y, Z) to geographic (lon, lat, h)
Superclass::ScalarType ScalarType
EllipsoidAdapter::Pointer m_Ellipsoid
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
itk::SmartPointer< const Self > ConstPointer
itk::SmartPointer< Self > Pointer
TScalarType ScalarType
Definition: otbTransform.h:71
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:39