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
f3e31303
Commit
f3e31303
authored
8 years ago
by
Rashad Kanavath
Browse files
Options
Downloads
Patches
Plain Diff
TEST: try patch on one python test
parent
84e478ee
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/Wrappers/SWIG/test/python/PythonRescaleTest.py
+25
-6
25 additions, 6 deletions
Modules/Wrappers/SWIG/test/python/PythonRescaleTest.py
with
25 additions
and
6 deletions
Modules/Wrappers/SWIG/test/python/PythonRescaleTest.py
+
25
−
6
View file @
f3e31303
# -*- coding: utf-8 -*-
#
# Example on the use of the Rescale
# Example on the use of the Rescale
#
from
sys
import
argv
import
otbApplication
as
otb
import
os
import
sys
if
os
.
name
==
'
posix
'
:
orig_dlopen_flags
=
sys
.
getdlopenflags
()
try
:
import
dl
except
ImportError
:
try
:
import
DLFCN
as
dl
except
ImportError
:
dl
=
None
if
dl
:
sys
.
setdlopenflags
(
dl
.
RTLD_NOW
|
dl
.
RTLD_GLOBAL
)
# now load the module !
import
otbApplication
as
otb
sys
.
setdlopenflags
(
orig_dlopen_flags
)
del
dl
del
orig_dlopen_flags
else
:
import
otbApplication
as
otb
app
=
otb
.
Registry
.
CreateApplication
(
"
Rescale
"
)
app
.
SetParameterString
(
"
in
"
,
argv
[
1
])
app
.
SetParameterString
(
"
in
"
,
sys
.
argv
[
1
])
app
.
SetParameterFloat
(
"
outmin
"
,
1
)
app
.
SetParameterFloat
(
"
outmax
"
,
100
)
app
.
SetParameterString
(
"
out
"
,
argv
[
2
]
+
"
.tif
"
)
app
.
SetParameterString
(
"
out
"
,
sys
.
argv
[
2
]
+
"
.tif
"
)
app
.
ExecuteAndWriteOutput
()
\ No newline at end of file
app
.
ExecuteAndWriteOutput
()
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