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
Julien Cabieces
otb
Commits
3bd4e8ab
Commit
3bd4e8ab
authored
10 years ago
by
Jordi Inglada
Browse files
Options
Downloads
Patches
Plain Diff
STYLE: remove old comments and tidy up
parent
79a14e51
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
Testing/Code/Simulation/otbReduceSpectralResponse.cxx
+1
-20
1 addition, 20 deletions
Testing/Code/Simulation/otbReduceSpectralResponse.cxx
with
1 addition
and
20 deletions
Testing/Code/Simulation/otbReduceSpectralResponse.cxx
+
1
−
20
View file @
3bd4e8ab
...
...
@@ -31,50 +31,33 @@ int otbReduceSpectralResponse(int argc, char * argv[])
std
::
cout
<<
"
\t
"
<<
"<reflectance mode>"
<<
"
\t
"
<<
"(<Output_filename>)"
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
typedef
otb
::
SpectralResponse
<
double
,
double
>
ResponseType
;
typedef
ResponseType
::
Pointer
ResponsePointerType
;
typedef
otb
::
SatelliteRSR
<
double
,
double
>
SatRSRType
;
typedef
SatRSRType
::
Pointer
SatRSRPointerType
;
typedef
otb
::
ReduceSpectralResponse
<
ResponseType
,
SatRSRType
>
ReduceResponseType
;
typedef
ReduceResponseType
::
Pointer
ReduceResponseTypePointerType
;
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
();
/** Load the spectral response file*/
mySpectralResponse
->
Load
(
spectreFile
,
100.0
);
SatRSRPointerType
myRSR
=
SatRSRType
::
New
();
/** Set the satelite number of bands */
myRSR
->
SetNbBands
(
nbBand
);
/** Load the satelite response file*/
myRSR
->
Load
(
RSRfile
);
ReduceResponseTypePointerType
myReduceResponse
=
ReduceResponseType
::
New
();
//Instantiation
//
ResponsePointerType
myRe
sponse=
ResponseType::New();
Reduce
Response
Type
PointerType
myRe
duceResponse
=
Reduce
ResponseType
::
New
();
/** Load the satelite response in the simulator */
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*/
//std::cout << mySpectralResponse << std::endl;
//itk::Indent ind;
/** Print the input Satelite RSR*/
//std::cout << myRSR << std::endl;
//myResponse->PrintSelf(std::cout, ind);
/** Compute the RSR reduce spectral response*/
myReduceResponse
->
CalculateResponse
();
/** Print the Reduce SR*/
std
::
cout
<<
myReduceResponse
<<
std
::
endl
;
...
...
@@ -82,10 +65,8 @@ int otbReduceSpectralResponse(int argc, char * argv[])
{
char
*
outputName
=
argv
[
5
];
std
::
ofstream
outputFile
(
outputName
,
std
::
ios
::
out
);
outputFile
<<
myReduceResponse
<<
std
::
endl
;
}
else
std
::
cout
<<
myReduceResponse
<<
std
::
endl
;
return
EXIT_SUCCESS
;
}
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