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