OTB
9.0.0
Orfeo Toolbox
Modules
Core
Transform
include
otbRPCForwardTransform.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 otbRPCForwardTransform_hxx
22
#define otbRPCForwardTransform_hxx
23
24
#include "
otbRPCForwardTransform.h
"
25
26
namespace
otb
27
{
28
template
<
class
TScalarType,
unsigned
int
NInputDimensions,
unsigned
int
NOutputDimensions>
29
RPCForwardTransform<TScalarType, NInputDimensions, NOutputDimensions>::RPCForwardTransform
() :
Superclass
(
TransformDirection
::FORWARD)
30
{}
31
32
template
<
class
TScalarType,
unsigned
int
NInputDimensions,
unsigned
int
NOutputDimensions>
33
typename
RPCForwardTransform<TScalarType, NInputDimensions, NOutputDimensions>::OutputPointType
34
RPCForwardTransform<TScalarType, NInputDimensions, NOutputDimensions>::TransformPoint
(
const
InputPointType
& point)
const
35
{
36
GDALRPCTransformer::PointType
zePoint;
37
zePoint[0] =
static_cast<
double
>
(point[0]);
38
zePoint[1] =
static_cast<
double
>
(point[1]);
39
if
(NInputDimensions > 2)
40
zePoint[2] =
static_cast<
double
>
(point[2]);
41
else
42
zePoint[2] = 0.0;
43
44
zePoint = this->m_Transformer->ForwardTransform(zePoint);
45
46
OutputPointType
pOut;
47
pOut[0] =
static_cast<
TScalarType
>
(zePoint[0]);
48
pOut[1] =
static_cast<
TScalarType
>
(zePoint[1]);
49
if
(NOutputDimensions > 2)
50
pOut[2] =
static_cast<
TScalarType
>
(zePoint[2]);
51
return
pOut;
52
}
53
57
template
<
class
TScalarType,
unsigned
int
NInputDimensions,
unsigned
int
NOutputDimensions>
58
void
RPCForwardTransform<TScalarType, NInputDimensions, NOutputDimensions>::PrintSelf
(std::ostream& os, itk::Indent indent)
const
59
{
60
Superclass::PrintSelf(os, indent);
61
os << indent <<
"Transformation direction: Forward"
<< std::endl;
62
}
64
65
}
66
67
#endif
otb::GDALRPCTransformer::PointType
itk::Point< double, 3 > PointType
Definition:
otbGDALRPCTransformer.h:56
otb::RPCForwardTransform::OutputPointType
itk::Point< TScalarType, NOutputDimensions > OutputPointType
Definition:
otbRPCForwardTransform.h:49
otb::RPCForwardTransform::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Definition:
otbRPCForwardTransform.hxx:58
otb::Transform< TScalarType, 2, 3 >::TransformDirection
TransformDirection
Definition:
otbPCAImageFilter.h:34
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition:
otbJoinContainer.h:32
otb::RPCTransformBase
Base projection class based on the RPC method.
Definition:
otbRPCTransformBase.h:45
otb::RPCForwardTransform::TransformPoint
OutputPointType TransformPoint(const InputPointType &point) const override
Definition:
otbRPCForwardTransform.hxx:34
otbRPCForwardTransform.h
otb::RPCForwardTransform::RPCForwardTransform
RPCForwardTransform()
Definition:
otbRPCForwardTransform.hxx:29
otb::RPCForwardTransform::InputPointType
itk::Point< TScalarType, NInputDimensions > InputPointType
Definition:
otbRPCForwardTransform.h:48
Generated at Wed Feb 28 2024 15:23:37 for
OTB
with
1.8.17