Skip to content
Snippets Groups Projects
Commit b1b800c3 authored by Julien Malik's avatar Julien Malik
Browse files

TEST: make Rescale test pass

parent 78b222c2
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
#
# Example on the use of the Smoothing
#
from sys import argv
import otbApplication as otb
import thread
class PythonApplicationClass:
"Python application class"
def __init__(self, key):
self.m_App = otb.Registry.CreateApplication(key)
def SetParameterString( self, key, value ):
self.m_App.SetParameterString(key, value)
def SetParameterFloat( self, key, value ):
self.m_App.SetParameterFloat(key, value)
def ExecuteAndWriteOutput( self ):
thread.start_new_thread(self.m_App.ExecuteAndWriteOutput())
self.WatchThread();
return
def WatchThread( self ):
print "je watch"
return
......@@ -4,20 +4,13 @@
# Example on the use of the Rescale
#
from sys import argv
import PythonApplication
#import otbApplication as otb
import otbApplication as otb
app = PythonApplication.PythonApplicationClass("Rescale")
app = otb.Registry.CreateApplication("Rescale")
print app.m_App.GetParametersKeys()
app.SetParameterString("in", argv[1])
app.SetParameterString("in", argv[1])
app.SetParameterFloat("outmin", 1)
app.SetParameterFloat("outmax", 100)
app.SetParameterString("out", argv[2] + ".tif")
app.ExecuteAndWriteOutput()
print dir(app)
app.ExecuteAndWriteOutput()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment