Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
bcc55ec3
Commit
bcc55ec3
authored
15 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Plain Diff
Automated merge with
http://hg.orfeo-toolbox.org/OTB
parents
c49d4220
f5f886f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Radiometry/otbVegetationIndicesFunctor.h
+9
-6
9 additions, 6 deletions
Code/Radiometry/otbVegetationIndicesFunctor.h
with
9 additions
and
6 deletions
Code/Radiometry/otbVegetationIndicesFunctor.h
+
9
−
6
View file @
bcc55ec3
...
...
@@ -44,7 +44,7 @@ public:
/// Vector pixel type used to support both vector images and multiple
/// input images
typedef
itk
::
VariableLengthVector
<
TInput1
>
InputVectorType
;
//operators !=
bool
operator
!=
(
const
RAndNIRIndexBase
&
)
const
{
...
...
@@ -67,7 +67,7 @@ public:
return
this
->
Evaluate
(
r
,
nir
);
};
/// Constructor
RAndNIRIndexBase
()
:
m_RedIndex
(
3
),
m_NIRIndex
(
4
)
{}
RAndNIRIndexBase
()
:
m_EpsilonToBeConsideredAsZero
(
0.0000001
),
m_RedIndex
(
3
),
m_NIRIndex
(
4
)
{}
/// Desctructor
virtual
~
RAndNIRIndexBase
()
{};
...
...
@@ -95,7 +95,7 @@ protected:
// This method must be reimplemented in subclasses to actually
// compute the index value
virtual
TOutput
Evaluate
(
const
TInput1
&
r
,
const
TInput2
&
nir
)
const
=
0
;
static
const
double
m_EpsilonToBeConsideredAsZero
=
0.0000001
;
const
double
m_EpsilonToBeConsideredAsZero
;
private
:
unsigned
int
m_RedIndex
;
...
...
@@ -135,7 +135,9 @@ public:
// Operator on vector pixel type
inline
TOutput
operator
()(
const
InputVectorType
&
inputVector
)
{
return
this
->
Evaluate
(
inputVector
[
m_RedIndex
-
1
],
static_cast
<
TInput2
>
(
inputVector
[
m_BlueIndex
-
1
]),
static_cast
<
TInput3
>
(
inputVector
[
m_NIRIndex
-
1
]));
return
this
->
Evaluate
(
inputVector
[
m_RedIndex
-
1
],
static_cast
<
TInput2
>
(
inputVector
[
m_BlueIndex
-
1
]),
static_cast
<
TInput3
>
(
inputVector
[
m_NIRIndex
-
1
]));
}
// Binary operator
inline
TOutput
operator
()(
const
TInput1
&
r
,
const
TInput2
&
b
,
const
TInput2
&
nir
)
...
...
@@ -211,7 +213,9 @@ public:
// Operator on vector pixel type
inline
TOutput
operator
()(
const
InputVectorType
&
inputVector
)
{
return
this
->
Evaluate
(
inputVector
[
m_RedIndex
-
1
],
static_cast
<
TInput2
>
(
inputVector
[
m_GreenIndex
-
1
]),
static_cast
<
TInput3
>
(
inputVector
[
m_NIRIndex
-
1
]));
return
this
->
Evaluate
(
inputVector
[
m_RedIndex
-
1
],
static_cast
<
TInput2
>
(
inputVector
[
m_GreenIndex
-
1
]),
static_cast
<
TInput3
>
(
inputVector
[
m_NIRIndex
-
1
]));
}
// Binary operator
...
...
@@ -1033,4 +1037,3 @@ private:
}
// namespace otb
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment