]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
[For eval] add image comparison V8_1_0a1
authorCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 20 May 2016 09:52:49 +0000 (11:52 +0200)
committerrnv <rnv@opencascade.com>
Thu, 30 Jun 2016 11:00:52 +0000 (14:00 +0300)
87 files changed:
test/VisuPrs/3D_viewer/A1.py
test/VisuPrs/3D_viewer/CMakeLists.txt
test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_3.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_1.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_10.0.png [new file with mode: 0644]
test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_3.0.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/CMakeLists.txt
test/VisuPrs/ScalarMap/G2.py
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________10_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________1_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________2_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________3_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________4_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________5_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________6_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________7_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________8_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________9_SCALARMAP.png [new file with mode: 0644]
test/VisuPrs/Util/paravistest.py

index c8e1d2a2112c6801ba51fff71851bd27abba920e..b9072293967dd8c1122472eb38c2c765eb9639a6 100644 (file)
@@ -98,7 +98,13 @@ for reprCode in represents:
 
                 # save picture in file
                 # Construct image file name
-                pic_name = picturedir + "params_" + repr.replace(' ', '_') + "_any_" +  \
+                base_name = "params_" + repr.replace(' ', '_') + "_any_" +  \
                     str(sha) + "_" + str(opa) + "_" + str(lwi) + "." + pictureext
+                pic_name = os.path.join(picturedir, base_name)
                 # Show and record the presentation
                 process_prs_for_test(plot3d, my_view, pic_name)
+
+                # Compare to baseline
+                current_dir = os.path.dirname(os.path.realpath(__file__))
+                baseline = os.path.join(current_dir, "_refs", base_name)
+                compare_view_to_ref_image(my_view, baseline, threshold=1)
index ccd21f1018513043a642b51c916ae0beb31cf0fd..0e01eab45eed39e9741504baeabb12dbadcc833c 100755 (executable)
@@ -41,3 +41,4 @@ INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${TEST_INSTALL_DIRECTORY}
         RENAME CTestTestfile.cmake)
 INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+INSTALL(DIRECTORY _refs DESTINATION ${TEST_INSTALL_DIRECTORY})
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_1.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_10.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_3.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_1.0.png
new file mode 100644 (file)
index 0000000..f0eb92c
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_10.0.png
new file mode 100644 (file)
index 0000000..0990cb7
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_3.0.png
new file mode 100644 (file)
index 0000000..ca4840c
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_0.5_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_1.0.png
new file mode 100644 (file)
index 0000000..8044e2f
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_10.0.png
new file mode 100644 (file)
index 0000000..86e016e
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_3.0.png
new file mode 100644 (file)
index 0000000..a844ff3
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Flat_1.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_1.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_10.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_3.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_1.0.png
new file mode 100644 (file)
index 0000000..f0eb92c
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_10.0.png
new file mode 100644 (file)
index 0000000..0990cb7
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_3.0.png
new file mode 100644 (file)
index 0000000..ca4840c
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_0.5_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_1.0.png
new file mode 100644 (file)
index 0000000..8044e2f
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_10.0.png
new file mode 100644 (file)
index 0000000..86e016e
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_3.0.png
new file mode 100644 (file)
index 0000000..a844ff3
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Points_any_Gouraud_1.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_1.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_10.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_3.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_1.0.png
new file mode 100644 (file)
index 0000000..5591a6c
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_10.0.png
new file mode 100644 (file)
index 0000000..46687c8
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_3.0.png
new file mode 100644 (file)
index 0000000..ea56766
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_0.5_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_1.0.png
new file mode 100644 (file)
index 0000000..b6c5af5
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_10.0.png
new file mode 100644 (file)
index 0000000..af95f61
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_3.0.png
new file mode 100644 (file)
index 0000000..27a7be0
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Flat_1.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_1.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_10.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_3.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_1.0.png
new file mode 100644 (file)
index 0000000..5591a6c
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_10.0.png
new file mode 100644 (file)
index 0000000..46687c8
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_3.0.png
new file mode 100644 (file)
index 0000000..ea56766
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_0.5_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_1.0.png
new file mode 100644 (file)
index 0000000..b6c5af5
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_10.0.png
new file mode 100644 (file)
index 0000000..af95f61
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_3.0.png
new file mode 100644 (file)
index 0000000..27a7be0
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Surface_any_Gouraud_1.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_1.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_10.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_3.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_1.0.png
new file mode 100644 (file)
index 0000000..5591a6c
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_10.0.png
new file mode 100644 (file)
index 0000000..46687c8
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_3.0.png
new file mode 100644 (file)
index 0000000..ea56766
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_0.5_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_1.0.png
new file mode 100644 (file)
index 0000000..b6c5af5
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_10.0.png
new file mode 100644 (file)
index 0000000..af95f61
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_3.0.png
new file mode 100644 (file)
index 0000000..27a7be0
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Flat_1.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_1.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_10.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_3.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_1.0.png
new file mode 100644 (file)
index 0000000..5591a6c
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_10.0.png
new file mode 100644 (file)
index 0000000..46687c8
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_3.0.png
new file mode 100644 (file)
index 0000000..ea56766
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_0.5_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_1.0.png
new file mode 100644 (file)
index 0000000..b6c5af5
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_10.0.png
new file mode 100644 (file)
index 0000000..af95f61
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_3.0.png
new file mode 100644 (file)
index 0000000..27a7be0
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Volume_any_Gouraud_1.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_1.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_10.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_3.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_1.0.png
new file mode 100644 (file)
index 0000000..edd919e
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_10.0.png
new file mode 100644 (file)
index 0000000..9624ad1
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_3.0.png
new file mode 100644 (file)
index 0000000..d1d9535
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_0.5_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_1.0.png
new file mode 100644 (file)
index 0000000..5bbce68
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_10.0.png
new file mode 100644 (file)
index 0000000..27b9569
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_3.0.png
new file mode 100644 (file)
index 0000000..86989a1
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Flat_1.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_1.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_10.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_3.0.png
new file mode 100644 (file)
index 0000000..2a61580
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.0_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_1.0.png
new file mode 100644 (file)
index 0000000..edd919e
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_10.0.png
new file mode 100644 (file)
index 0000000..9624ad1
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_3.0.png
new file mode 100644 (file)
index 0000000..d1d9535
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_0.5_3.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_1.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_1.0.png
new file mode 100644 (file)
index 0000000..5bbce68
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_1.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_10.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_10.0.png
new file mode 100644 (file)
index 0000000..27b9569
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_10.0.png differ
diff --git a/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_3.0.png b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_3.0.png
new file mode 100644 (file)
index 0000000..86989a1
Binary files /dev/null and b/test/VisuPrs/3D_viewer/_refs/params_Wireframe_any_Gouraud_1.0_3.0.png differ
index 1d8c45fd8f5abbb6e120e5b40b8fbc7b4cef19d5..b23aefcad537bcd5e78b6fa460af47c08a53d492 100644 (file)
@@ -41,3 +41,4 @@ INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${TEST_INSTALL_DIRECTORY}
         RENAME CTestTestfile.cmake)
 INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+INSTALL(DIRECTORY _refs DESTINATION ${TEST_INSTALL_DIRECTORY})
index d8eda87473bc2e7061c4a742cde61361bf987ad2..2f4ea4dfc9cfae77471f6c0c54467c77374e7b31 100644 (file)
@@ -22,7 +22,7 @@
 
 import sys
 import os
-from paravistest import datadir, pictureext, get_picture_dir, get_png_picture_resolution
+from paravistest import datadir, pictureext, get_picture_dir, compare_view_to_ref_image
 from pvsimple import GetActiveSource, GetRenderView, Render, OpenDataFile
 from presentations import ScalarMapOnField, hide_all, EntityType, PrsTypeEnum,reset_view,process_prs_for_test
 
@@ -48,9 +48,6 @@ import time
 
 aFieldEntity = EntityType.NODE
 aFieldName = "MODES___DEPL____________________"
-#create list to store picture files sizes
-sizesw=[]
-sizesh=[]
 #create Scalar Map presentations for 10 timestamps
 for i in range(1,11):
     hide_all(aView, True)
@@ -62,36 +59,19 @@ for i in range(1,11):
     reset_view(aView)
     Render(aView)
 
-    # Add path separator to the end of picture path if necessery
-    if not picturedir.endswith(os.sep):
-            picturedir += os.sep
     prs_type = PrsTypeEnum.SCALARMAP
 
     # Get name of presentation type
     prs_name = PrsTypeEnum.get_name(prs_type)
     f_prs_type = prs_name.replace(' ', '').upper()
     # Construct image file name
-    pic_name = picturedir + aFieldName + "_" + str(i) + "_" + f_prs_type + "." + pictureext
+    base_name = aFieldName + "_" + str(i) + "_" + f_prs_type + "." + pictureext
+    pic_name = os.path.join(picturedir, base_name)
 
     # Show and record the presentation
     process_prs_for_test(aPrs, aView, pic_name)
-    (w,h) = get_png_picture_resolution(pic_name)
-    sizesw.append(w)
-    sizesh.append(h)
-
-# check sizes of pictures: width
-if abs(max(sizesw)-min(sizesw)) > 0:
-    print "<b>ERROR!!! Pictures have different width !!!</b>";
-    for i in range(1,11):
-        picture_name = "time_stamp_"+str(i)+"."+pictureext
-        print "Picture: "+picture_name+"; width : "+str(sizesw[i-1])
-    raise RuntimeError
-
-# check sizes of pictures: height
-if abs(max(sizesh)-min(sizesh)) > 0:
-    print "<b>WARNING!!! Pictures have different height !!!</b>";
-    for i in range(1,11):
-        picture_name = "time_stamp_"+str(i)+"."+pictureext
-        print "Picture: "+picture_name+"; height : "+str(sizesh[i-1])
-    raise RuntimeError
 
+    # Compare to baseline
+    current_dir = os.path.dirname(os.path.realpath(__file__))
+    baseline = os.path.join(current_dir, "_refs", base_name)
+    compare_view_to_ref_image(aView, baseline, threshold=1)
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________10_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________10_SCALARMAP.png
new file mode 100644 (file)
index 0000000..7334154
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________10_SCALARMAP.png differ
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________1_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________1_SCALARMAP.png
new file mode 100644 (file)
index 0000000..d33080f
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________1_SCALARMAP.png differ
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________2_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________2_SCALARMAP.png
new file mode 100644 (file)
index 0000000..8d0d5e6
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________2_SCALARMAP.png differ
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________3_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________3_SCALARMAP.png
new file mode 100644 (file)
index 0000000..0963b12
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________3_SCALARMAP.png differ
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________4_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________4_SCALARMAP.png
new file mode 100644 (file)
index 0000000..30f8647
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________4_SCALARMAP.png differ
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________5_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________5_SCALARMAP.png
new file mode 100644 (file)
index 0000000..631467c
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________5_SCALARMAP.png differ
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________6_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________6_SCALARMAP.png
new file mode 100644 (file)
index 0000000..9e70cb6
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________6_SCALARMAP.png differ
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________7_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________7_SCALARMAP.png
new file mode 100644 (file)
index 0000000..51992e9
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________7_SCALARMAP.png differ
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________8_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________8_SCALARMAP.png
new file mode 100644 (file)
index 0000000..66e4553
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________8_SCALARMAP.png differ
diff --git a/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________9_SCALARMAP.png b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________9_SCALARMAP.png
new file mode 100644 (file)
index 0000000..b1f32f0
Binary files /dev/null and b/test/VisuPrs/ScalarMap/_refs/MODES___DEPL_____________________9_SCALARMAP.png differ
index 353cd0496e6e546bbb53e4d8bcbdee545830cc37..0df553ccbbb04d2d4d8321bfe1d8896082e7f5e0 100755 (executable)
@@ -29,6 +29,7 @@ import tempfile
 import getpass
 from datetime import date
 import struct
+import sys
 
 # Auxiliary variables
 
@@ -352,8 +353,8 @@ def delete_with_inputs(obj):
         pvsimple.Delete(tmp_obj)
 
 def get_png_picture_resolution(infile):
-    """Returns size (width, height) of the PNG image"""    
-    f = open(infile, 'rb')    
+    """Returns size (width, height) of the PNG image"""
+    f = open(infile, 'rb')
     data = f.read(24)
     f.close()
     if not (data[:8] == '\211PNG\r\n\032\n'and (data[12:16] == 'IHDR')):
@@ -364,8 +365,28 @@ def get_png_picture_resolution(infile):
     height = int(h)
     return (width,height)
 
-def save_trace(afile,atrace):    
-    """Saves atrace in afile"""        
+def save_trace(afile,atrace):
+    """Saves atrace in afile"""
     f = open(afile, 'w')
     f.write(atrace)
     f.close()
+
+def compare_view_to_ref_image(view, image_file, threshold=10):
+  import vtk.test.Testing
+  # warning: vtkGetTempDir looks at sys.argv contents...
+  save_sys_argv = sys.argv
+  sys.argv = []
+  vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
+
+  try:
+    vtk.test.Testing.compareImage(view.GetRenderWindow(),
+                                  image_file,
+                                  threshold=threshold)
+    vtk.test.Testing.interact()
+  except:
+    sys.argv = save_sys_argv
+    print "<b>ERROR!!! Pictures differs from reference image !!!</b>";
+    print "Picture: "+image_file
+    raise
+    pass
+  sys.argv = save_sys_argv