Skip to content
Snippets Groups Projects
Commit 52cb703b authored by Stéphane Albert's avatar Stéphane Albert
Browse files

MRG: Merged from origin/develop.

parents bb42b908 001d7b6f
Branches
Tags
No related merge requests found
......@@ -174,6 +174,6 @@ otb_add_test(NAME owTuDocExampleStructureNew COMMAND otbApplicationEngineTestDri
)
otb_add_test(NAME owTvApplicationMemoryConnectTest COMMAND otbApplicationEngineTestDriver otbApplicationMemoryConnectTest
${CMAKE_BINARY_DIR}/lib/otb/applications
$<TARGET_FILE_DIR:otbapp_Smoothing>
${INPUTDATA}/poupees.tif
${TEMP}/owTvApplicationMemoryConnectTestOutput.tif)
......@@ -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)
......
......@@ -5,9 +5,9 @@ set(TEST_DRIVER otbTestDriver
if(WIN32)
# on windows, loading the module _otbApplication requires the otbossimplugins*.dll
# which is in the 'bin' folder
# which is in the 'bin/<CMAKE_BUILD_TYPE>' folder
set(TEST_DRIVER ${TEST_DRIVER}
--add-before-env PATH ${OTB_BINARY_DIR}/bin)
--add-before-env PATH $<TARGET_FILE_DIR:OTBCommon>)
endif(WIN32)
add_test( NAME pyTvSmoothing
......
......@@ -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