Commit 70d17860 authored by Rashad Kanavath's avatar Rashad Kanavath

Merge remote-tracking branch 'origin/develop' into msvc_support

parents 5ea11899 45061657
......@@ -10,8 +10,8 @@ def test(otbApplication, argv):
RadiometricIndices.SetParameterStringList("list", ["Vegetation:NDVI","Vegetation:RVI","Vegetation:IPVI"])
print RadiometricIndices.GetParameterStringList("list")
print( RadiometricIndices.GetParameterStringList("list") )
print RadiometricIndices.GetParameterValue("list")
print( RadiometricIndices.GetParameterValue("list") )
RadiometricIndices.ExecuteAndWriteOutput()
def test(otb, argv):
app = otb.Registry.CreateApplication('TrainImagesClassifier')
app.SetParameterFloat('classifier.libsvm.opt',True)
print app.GetParameterValue('classifier.libsvm.opt')
print( app.GetParameterValue('classifier.libsvm.opt') )
......@@ -4,7 +4,7 @@ def test(otb, argv):
try:
app.GetParameterInt('szx')
except RuntimeError, e:
print "Exception message : " + e.args[0]
print( "Exception message : " + e.args[0] )
if e.args[0].startswith("boost::bad_any_cast"):
exit(1)
......
......@@ -14,9 +14,9 @@ def test(otb, argv):
app = otb.Registry.CreateApplication('OrthoRectification')
# test GetParameterTypeAsString() method in python.
print app.GetParameterTypeAsString(otb.ParameterType_InputImage)
print app.GetParameterTypeAsString(otb.ParameterType_String)
print app.GetParameterTypeAsString(otb.ParameterType_Empty)
print( app.GetParameterTypeAsString(otb.ParameterType_InputImage) )
print( app.GetParameterTypeAsString(otb.ParameterType_String) )
print( app.GetParameterTypeAsString(otb.ParameterType_Empty) )
# one test for each parameter type (string, float, int, ...)
......
......@@ -5,17 +5,17 @@
#
def test(otb, argv):
print "Available applications : " + str(otb.Registry.GetAvailableApplications())
print( "Available applications : " + str(otb.Registry.GetAvailableApplications()) )
app = otb.Registry.CreateApplication("Smoothing")
print app.GetParametersKeys()
print( app.GetParametersKeys() )
app.SetParameterString("in", argv[1])
for type in ['mean', 'gaussian', 'anidif']:
print 'Testing ' + type
app.SetParameterString("type", type)
app.SetParameterString("out", argv[2] + type + ".tif")
for type_ in ['mean', 'gaussian', 'anidif']:
print( 'Testing ' + type_ )
app.SetParameterString("type", type_)
app.SetParameterString("out", argv[2] + type_ + ".tif")
app.ExecuteAndWriteOutput()
print dir(app)
print( dir(app) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment