Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Code
SARPolarimetry
otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: ORFEO Toolbox
4
Language: C++
5
Date: $Date$
6
Version: $Revision$
7
8
9
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10
See OTBCopyright.txt for details.
11
12
13
This software is distributed WITHOUT ANY WARRANTY; without even
14
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15
PURPOSE. See the above copyright notices for more information.
16
17
=========================================================================*/
18
#ifndef __otbSinclairToReciprocalCircularCovarianceMatrixFunctor_h
19
#define __otbSinclairToReciprocalCircularCovarianceMatrixFunctor_h
20
21
#include "vcl_complex.h"
22
#include "
otbSinclairToReciprocalCovarianceMatrixFunctor.h
"
23
24
namespace
otb
25
{
26
namespace
Functor
27
{
57
template
<
class
TInput1,
class
TInput2,
class
TInput3,
class
TOutput>
58
class
SinclairToReciprocalCircularCovarianceMatrixFunctor
59
{
60
public
:
62
typedef
double
RealType
;
63
typedef
std::complex <RealType>
ComplexType
;
64
typedef
typename
TOutput::ValueType
OutputValueType
;
65
typedef
SinclairToReciprocalCovarianceMatrixFunctor<ComplexType, ComplexType, ComplexType, TOutput>
SinclairToReciprocalCovarianceFunctorType
;
66
67
inline
TOutput
operator ()
(
const
TInput1& Shh,
const
TInput2& Shv,
const
TInput3& Svv)
68
{
69
TOutput result;
70
71
result.SetSize(
m_NumberOfComponentsPerPixel
);
72
73
74
const
ComplexType
S_hh =
static_cast<
ComplexType
>
(Shh);
75
const
ComplexType
S_hv =
static_cast<
ComplexType
>
(Shv);
76
const
ComplexType
S_vv =
static_cast<
ComplexType
>
(Svv);
77
78
const
ComplexType
coef(0.5);
79
80
const
ComplexType
j2S_hv = S_hv *
ComplexType
(0.0, 2.0);
81
82
const
ComplexType Sll = coef * ( -S_hh-j2S_hv+S_vv );
83
const
ComplexType Slr = coef * ( -S_hh+-S_vv );
84
const
ComplexType Srr = coef * ( -S_hh+j2S_hv+S_vv );
85
86
//const ComplexType conjSll = vcl_conj(Sll);
87
//const ComplexType conjSlr = vcl_conj(Slr);
88
//const ComplexType conjSrr = vcl_conj(Srr);
89
90
SinclairToReciprocalCovarianceFunctorType
funct;
91
return
( funct(Sll, Slr, Srr ) );
92
}
93
94
unsigned
int
GetNumberOfComponentsPerPixel
()
95
{
96
return
m_NumberOfComponentsPerPixel
;
97
}
98
100
SinclairToReciprocalCircularCovarianceMatrixFunctor
() :
m_NumberOfComponentsPerPixel
(6) {}
101
103
virtual
~SinclairToReciprocalCircularCovarianceMatrixFunctor
() {}
104
105
protected
:
106
107
108
private
:
109
unsigned
int
m_NumberOfComponentsPerPixel
;
110
};
111
112
}
// namespace Functor
113
}
// namespace otb
114
115
#endif
Generated at Sun Feb 3 2013 00:47:38 for
Orfeo Toolbox
with
doxygen 1.8.1.1