OTB  7.4.0
Orfeo Toolbox
otbCompositeTransform.hxx
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 otbCompositeTransform_hxx
22 #define otbCompositeTransform_hxx
23 
24 #include "otbCompositeTransform.h"
25 
27 #include "otbForwardSensorModel.h"
28 #include "otbInverseSensorModel.h"
29 #include "itkIdentityTransform.h"
30 
31 namespace otb
32 {
33 
34 template <class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
36  : Superclass(ParametersDimension), m_FirstTransform(nullptr), m_SecondTransform(nullptr)
37 {}
38 
39 template <class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
41 {
42 }
43 
44 template <class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
47  const FirstTransformInputPointType& point1) const
48 {
50  geoPoint = m_FirstTransform->TransformPoint(point1);
51 
53  outputPoint = m_SecondTransform->TransformPoint(geoPoint);
54 
55  // otbMsgDevMacro(<< std::setprecision(15) << "Converting: " << point1 << " -> " << geoPoint<< " -> " << outputPoint);
56 
57  return outputPoint;
58 }
59 
60 /*template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
61  typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputVectorType
62  CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>
63  ::TransformVector(const InputVectorType &vector1) const
64  {
65  InputVectorType vectorTmp;
66  OutputVectorType vector2;
67 
68  vectorTmp=m_FirstTransform->TransformVector(vector1);
69  vector2=m_SecondTransform->TransformVector(vectorTmp);
70 
71  return vector2;
72  }
73 
74  template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
75  typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputVnlVectorType
76  CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>
77  ::TransformVector(const InputVnlVectorType &vnlVector1) const
78  {
79  InputVnlVectorType vnlVectorTmp;
80  OutputVnlVectorType vnlVector2;
81 
82  vnlVectorTmp=m_FirstTransform->TransformVector(vnlVector1);
83  vnlVector2=m_SecondTransform->TransformVector(vnlVectorTmp);
84 
85  return vnlVector2;
86  }
87 
88  template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
89  typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputCovariantVectorType
90  CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>
91  ::TransformCovariantVector(const InputCovariantVectorType &covariantVector1) const
92  {
93  InputCovariantVectorType covariantVectorTmp;
94  OutputCovariantVectorType covariantVector2;
95 
96  covariantVectorTmp=m_FirstTransform->TransformCovariantVector(covariantVector1);
97  covariantVector2=m_SecondTransform->TransformCovariantVector(covariantVectorTmp);
98 
99  return covariantVector2;
100  }*/
101 
102 } // namespace otb
103 
104 #endif
Superclass::InputPointType FirstTransformInputPointType
SecondTransformPointerType m_SecondTransform
TFirstTransform::OutputPointType FirstTransformOutputPointType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Superclass::OutputPointType SecondTransformOutputPointType
FirstTransformPointerType m_FirstTransform
SecondTransformOutputPointType TransformPoint(const FirstTransformInputPointType &) const override
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:39