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
Container Registry
Model registry
Operate
Environments
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
Main Repositories
otb
Commits
79a14e51
Commit
79a14e51
authored
10 years ago
by
Jordi Inglada
Browse files
Options
Downloads
Patches
Plain Diff
TEST: modify test to accept the reflectance mode parameter
parent
30ee7273
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Testing/Code/Simulation/CMakeLists.txt
+2
-0
2 additions, 0 deletions
Testing/Code/Simulation/CMakeLists.txt
Testing/Code/Simulation/otbReduceSpectralResponse.cxx
+7
-4
7 additions, 4 deletions
Testing/Code/Simulation/otbReduceSpectralResponse.cxx
with
9 additions
and
4 deletions
Testing/Code/Simulation/CMakeLists.txt
+
2
−
0
View file @
79a14e51
...
...
@@ -92,6 +92,7 @@ add_test(siTuReduceSpectralResponse ${Simulation_TESTS2}
${
SPECTRUM_DB
}
/jpl/beckman/minerals/Arsenate/txt/A01Ac.txt
${
INPUTDATA
}
/Radiometry/SPOT5/HRG2/rep6S.dat
4
#nb band
0
#reflectance mode
)
add_test
(
siTvReduceSpectralResponse
${
Simulation_TESTS2
}
...
...
@@ -101,6 +102,7 @@ add_test(siTvReduceSpectralResponse ${Simulation_TESTS2}
${
INPUTDATA
}
/SpectralResponse1.txt
${
INPUTDATA
}
/Radiometry/Test/rep6S.dat
4
#nb band
0
#reflectance mode
${
TEMP
}
/siTvReduceSpectralResponse.txt
)
...
...
This diff is collapsed.
Click to expand it.
Testing/Code/Simulation/otbReduceSpectralResponse.cxx
+
7
−
4
View file @
79a14e51
...
...
@@ -24,11 +24,11 @@
int
otbReduceSpectralResponse
(
int
argc
,
char
*
argv
[])
{
if
((
argc
!=
4
)
&&
(
argc
!=
5
))
if
((
argc
!=
5
)
&&
(
argc
!=
6
))
{
std
::
cout
<<
argv
[
0
]
<<
std
::
endl
<<
"
\t
"
<<
"<Spectral_response_filename>"
;
std
::
cout
<<
"
\t
"
<<
"<RSR_filename>"
<<
"
\t
"
<<
"<Nb total satellite band>"
;
std
::
cout
<<
"
\t
"
<<
"(<Output_filename>)"
<<
std
::
endl
;
std
::
cout
<<
"
\t
"
<<
"<reflectance mode>"
<<
"
\t
"
<<
"(<Output_filename>)"
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
...
...
@@ -44,6 +44,7 @@ int otbReduceSpectralResponse(int argc, char * argv[])
const
std
::
string
spectreFile
(
argv
[
1
]);
const
std
::
string
RSRfile
(
argv
[
2
]);
unsigned
int
nbBand
=
atoi
(
argv
[
3
]);
bool
reflectanceMode
(
atoi
(
argv
[
4
]));
//Instantiation
ResponsePointerType
mySpectralResponse
=
ResponseType
::
New
();
...
...
@@ -63,6 +64,8 @@ int otbReduceSpectralResponse(int argc, char * argv[])
myReduceResponse
->
SetInputSatRSR
(
myRSR
);
/** Load the spectral response of the object in the simulator*/
myReduceResponse
->
SetInputSpectralResponse
(
mySpectralResponse
);
/** Set the reflectance or luminance mode */
myReduceResponse
->
SetReflectanceMode
(
reflectanceMode
);
//Load file into vector
/** Print the input spectral response*/
...
...
@@ -75,9 +78,9 @@ int otbReduceSpectralResponse(int argc, char * argv[])
myReduceResponse
->
CalculateResponse
();
/** Print the Reduce SR*/
std
::
cout
<<
myReduceResponse
<<
std
::
endl
;
if
(
argc
==
5
)
if
(
argc
==
6
)
{
char
*
outputName
=
argv
[
4
];
char
*
outputName
=
argv
[
5
];
std
::
ofstream
outputFile
(
outputName
,
std
::
ios
::
out
);
outputFile
<<
myReduceResponse
<<
std
::
endl
;
...
...
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