Skip to content
Snippets Groups Projects
Commit 70d17860 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

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

parents 5ea11899 45061657
Branches
Tags
No related merge requests found
......@@ -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) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment