Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 539163fe authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

Merge branch 'feature/vtk7-compatibility' into 'develop'

Feature/vtk7 compatibility

See merge request !107
parents 59ad9f0f 6997c52a
......@@ -15,3 +15,4 @@ fi
pwd
printenv
ls -la $PROJECT_SOURCE_DIR
......@@ -6,9 +6,11 @@
# This is ok on Linux but since gitlab-runner 11.7 on windows all path variables use backward slash instead of forward slash
# → Replace all backslash to forward slash
export PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR//\\//}
export CI_PROJECT_DIR=${CI_PROJECT_DIR//\\//}
echo "Job $CI_JOB_NAME"
echo "PROJECT_SOURCE_DIR=$PROJECT_SOURCE_DIR"
echo "CI_PROJECT_DIR=$CI_PROJECT_DIR"
if ! grep -q TRIGGER_STAGE_TEST "${PROJECT_LOG_DIR}/trigger-stage.txt"; then
echo "Job skipped as /test flag not in commit message and CAMITK_CI_STAGE < $STAGE_CONFIGURE";
......@@ -16,12 +18,12 @@ if ! grep -q TRIGGER_STAGE_TEST "${PROJECT_LOG_DIR}/trigger-stage.txt"; then
fi
if [[ "$OS" != "win7" ]]; then
echo "===== Configuring xvfb =====" > >(tee ${PROJECT_LOG_DIR}/test.log) 2>&1
echo "===== Configuring xvfb =====" > >(tee --append ${PROJECT_LOG_DIR}/test.log) 2>&1
# Starts the server first (try to avoid unexpected and random "QXcbConnection: Could not connect to display :99")
export DISPLAY=":98"
# create a specific file for xauth
export XAUTHORITY=$(mktemp)
Xvfb $DISPLAY -screen 0 1280x1024x16 -ac -nolisten tcp -nolisten unix -auth $XAUTHORITY & > >(tee ${PROJECT_LOG_DIR}/test.log) 2>&1
Xvfb $DISPLAY -screen 0 1280x1024x16 -ac -nolisten tcp -nolisten unix -auth $XAUTHORITY & > >(tee --append ${PROJECT_LOG_DIR}/test.log) 2>&1
trap "kill $! || true" EXIT
# give some times to start the Xvfb
sleep 10
......@@ -42,16 +44,43 @@ ctest -VV \
-DCI_PROJECT_LOG_DIRECTORY="$CI_PROJECT_DIR/$PROJECT_LOG_DIR" \
-DCTEST_SOURCE_DIRECTORY="$PROJECT_SOURCE_DIR" \
-DCTEST_BINARY_DIRECTORY="$PROJECT_BUILD_DIR" \
-S $PROJECT_SOURCE_DIR/sdk/cmake/ctest/ci-test.cmake > >(tee ${PROJECT_LOG_DIR}/test.log | grep --line-buffered -e "Test \#") 2>&1
-S $PROJECT_SOURCE_DIR/sdk/cmake/ctest/ci-test.cmake > >(tee --append ${PROJECT_LOG_DIR}/test.log | grep --line-buffered -e "Test \#") 2>&1
# Rerun only the failed tests
# There seems to be a bug in CMake, disabling for now
# see https://gitlab.kitware.com/cmake/cmake/issues/17767
# and https://gitlab.kitware.com/cmake/cmake/issues/16314
# echo "===== Re-running failed tests ====="
# ctest -VV \
# --rerun-failed \
# -DCTEST_SITE="$CDASH_SITE" \
# -DCI_MODE="$CAMITK_CI_MODE" \
# -DCI_ID="P $CI_PIPELINE_ID - J $CI_BUILD_ID" \
# -DCI_BRANCH="$CI_COMMIT_REF_NAME" \
# -DCI_BUILD_SETTINGS="$COMPILER_CONFIG" \
# -DCI_PROJECT_LOG_DIRECTORY="$CI_PROJECT_DIR/$PROJECT_LOG_DIR" \
# -DCTEST_SOURCE_DIRECTORY="$PROJECT_SOURCE_DIR" \
# -DCTEST_BINARY_DIRECTORY="$PROJECT_BUILD_DIR" \
# -S $PROJECT_SOURCE_DIR/sdk/cmake/ctest/ci-test.cmake > >(tee --append ${PROJECT_LOG_DIR}/test.log | grep --line-buffered -e "Test \#") 2>&1
# if [[ "$OS" != "win7" ]]; then
# # shutdown xvfb
# kill $xvfbPid
# fi
echo
echo "===== Not run (disabled) tests ====="
grep -e "Not Run" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/test.log
# as ctest return a strange 255 error, check the log
if grep --quiet "Fatal error" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/ci-test.log; then
echo
echo "===== Fatal errors ====="
echo "Found fatal error in $CI_PROJECT_DIR/$PROJECT_LOG_DIR/ci-test.log"
echo
echo "===== Failed tests ====="
grep -e "\*\*\*Failed" -e "SegFault" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/test.log
echo
exit 1
else
echo "OK"
......
......@@ -20,27 +20,32 @@ camitk_extension(ACTION_EXTENSION
ENABLE_INTEGRATION_TEST
)
# Test failure due to ITK exception
# For now consider these fail tests as passed until this can be taken care of in the save() method
# TODO check if it possible to avoid this exception
# For input file: biorad.pic
# Applying action Gradient Magnitude With Smoothing...
# camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
# itk::ERROR: RecursiveGaussianImageFilter(0x55b3b21bc700): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed...
set_tests_properties("action-itkfilters-level1-6" PROPERTIES WILL_FAIL true)
# For input file: cthead1.lsm
# Applying action Gradient Magnitude With Smoothing...
# camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
# itk::ERROR: RecursiveGaussianImageFilter(0x559652ac6cc0): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed..
set_tests_properties("action-itkfilters-level1-8" PROPERTIES WILL_FAIL true)
# For input file: mini-complex-slow1.nrrd
# Applying action Gradient Magnitude With Smoothing...
# camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
# itk::ERROR: RecursiveGaussianImageFilter(0x55f942cacac0): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed.
set_tests_properties("action-itkfilters-level1-14" PROPERTIES WILL_FAIL true)
# --------------------------------
# --- Specific test management ---
# --------------------------------
camitk_disable_tests(TESTS action-itkfilters-level1-6
action-itkfilters-level1-8
action-itkfilters-level1-14
REASON " Test failure due to ITK exception.
For now disable these tests until this can be taken care of in the save() method
For input file: biorad.pic, cthead1.lsm, mini-complex-slow1.nrrd
When applying action Gradient Magnitude With Smoothing, the following exception is raised:
\"camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
itk::ERROR: RecursiveGaussianImageFilter(0x55b3b21bc700): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed...\""
)
# Tests fail due to OpenGL crashing when used inside a VM
# As the test can be run directly on a "real" desktop, add the test but flag it with WILL_FAIL
if(WIN32)
set_tests_properties(action-itkfilters-integration-test PROPERTIES WILL_FAIL true)
endif()
camitk_tests_requirement(TESTS action-itkfilters-integration-test
REQUIRES "NOT WIN32"
REASON "WIN32 OpenGL failure on a VM
This test will always fail when run inside a VM due to OpenGL crash.
This test will pass when run directly from a physical windows machine."
)
camitk_tests_requirement(TESTS action-itkfilters-integration-test
REQUIRES "${VTK_VERSION} VERSION_EQUAL 6.3"
REASON "VTK version is not equals than 6.3
The default test files are written using the currently supported version of VTK (VTK 6.3).
This test will therefore fail when comparing the input to the output if another version of VTK is used.
E.g., Ubuntu 16.04 LTS comes with VTK 6.2 and Debian buster comes with VTK 7.1
Although everything should work well on both OS, this test will unconditionnaly fail."
)
......@@ -8,50 +8,46 @@ camitk_extension(COMPONENT_EXTENSION
ENABLE_AUTO_TEST
)
# Test failure due to ITK exception
# For now consider these fail tests as passed until this can be taken care of in the save() method
# TODO check if it possible to avoid this exception
# Trying to save "biorad.pic" generates the following ITK Exception:
# /build/insighttoolkit4-zpsE3g/insighttoolkit4-4.10.1-dfsg1/Modules/IO/BioRad/src/itkBioRadImageIO.cxx:484:
# itk::ERROR: BioRadImageIO(0x55bf9bc9bb90): Component type not supported.
set_tests_properties("component-itkimage-level3-9" PROPERTIES WILL_FAIL true)
# Saving Error: problem occurs while saving file:/home/promayon/Dev/CamiTK/build/camitk/Testing/Temporary/component-itkimage-level3-10/cthead1.lsm: ITK Exception: /build/insighttoolkit4-zpsE3g/insighttoolkit4-4.10.1-dfsg1/Modules/IO/LSM/src/itkLSMImageIO.cxx:275:
# itk::ERROR: LSMImageIO(0x55a165be7310): TIFF supports unsigned char and unsigned short
set_tests_properties("component-itkimage-level3-10" PROPERTIES WILL_FAIL true)
# --------------------------------
# --- Specific test management ---
# --------------------------------
# Test failure due to bad export
# TODO check why ITK cannot save BigEndian.spr properly
set_tests_properties("component-itkimage-level3-3" PROPERTIES WILL_FAIL true)
# TODO check why ITK cannot save LittleEndianZ.hdr properly
set_tests_properties("component-itkimage-level3-19" PROPERTIES WILL_FAIL true)
# TODO check why ITK cannot save LittleEndianZ.img.gz properly
set_tests_properties("component-itkimage-level3-20" PROPERTIES WILL_FAIL true)
camitk_disable_tests(TESTS component-itkimage-level3-3
component-itkimage-level3-9
component-itkimage-level3-10
component-itkimage-level3-19
component-itkimage-level3-20
REASON " Test failure due to ITK exception.
For now disable these tests until this can be dealt with (if possible)
For input file: biorad.pic, cthead1.lsm, BigEndian.spr, LittleEndianZ.hdr and LittleEndianZ.img.gz
When applying action Gradient Magnitude With Smoothing, the following exception is raised:
\"camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
itk::ERROR: RecursiveGaussianImageFilter(0x55b3b21bc700): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed...\""
)
if(WIN32)
# TODO check why BigEndianCompressed.img.gz does not work on Windows (maybe because of double suffix .im.gz?)
set_tests_properties(component-itkimage-level3-6 PROPERTIES WILL_FAIL true)
# same for LittleEndianCompressed.img.gz
set_tests_properties(component-itkimage-level3-16 PROPERTIES WILL_FAIL true)
# same for minimal.nii.gz
set_tests_properties(component-itkimage-level3-28 PROPERTIES WILL_FAIL true)
endif()
# TODO confirm diagnostic: check why BigEndianCompressed.img.gz, LittleEndianCompressed.img.gz and minimal.nii.gz does not work on Windows (maybe because of double suffix .im.gz?)
camitk_tests_requirement(TESTS component-itkimage-level3-6
component-itkimage-level3-16
component-itkimage-level3-28
REQUIRES "NOT WIN32"
REASON "WIN32 failure (probably) due to double suffix .im.gz or .nii.gz
For input file: BigEndianCompressed.img.gz, LittleEndianCompressed.img.gz and minimal.nii.gz"
)
# On Ubuntu 18.04 LTS, the default ITK version is 4.12
# ITK 4.12 handle export to some format differently that generates different file and therefore
# test errors for level3
# The following exception should be removed when all plateforms are based on ITK 4.12 or higher
if("${ITK_VERSION}" VERSION_GREATER 4.11)
set_tests_properties(component-itkimage-level3-1
component-itkimage-level3-4
component-itkimage-level3-7
component-itkimage-level3-11
component-itkimage-level3-13
component-itkimage-level3-15
component-itkimage-level3-17
component-itkimage-level3-21
component-itkimage-level3-28
PROPERTIES WILL_FAIL true)
endif()
camitk_tests_requirement(TESTS component-itkimage-level3-1
component-itkimage-level3-4
component-itkimage-level3-7
component-itkimage-level3-11
component-itkimage-level3-13
component-itkimage-level3-15
component-itkimage-level3-17
component-itkimage-level3-21
component-itkimage-level3-28
REQUIRES "${ITK_VERSION} VERSION_LESS 4.12"
REASON " ITK version is greater than 4.11
The default test files are written using the currently supported version of ITK (ITK 4.11).
This test will therefore fail when comparing the input to the output if another version of ITK is used."
)
# Additional test for SDK actions: this will add auto test for the given actions using the itkimage component
camitk_additional_action_test(ACTION_EXTENSIONS cropvolume imagelut imageresampling multipicking pixelcolorchanger reconstruction reorientimage showin3d volumerendering
......
......@@ -10,14 +10,21 @@ camitk_extension(ACTION_EXTENSION
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
# On Ubuntu 16.04 LTS, the default VTK version is 6.2 not 6.3
# VTK6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version
if("${VTK_VERSION}" VERSION_LESS 6.3)
set_tests_properties(action-reconstruction-integration-test PROPERTIES WILL_FAIL true)
endif()
# --------------------------------
# --- Specific test management ---
# --------------------------------
camitk_tests_requirement(TESTS action-reconstruction-integration-test
REQUIRES "${VTK_VERSION} VERSION_EQUAL 6.3"
REASON "VTK version is not equals than 6.3
The default test files are written using the currently supported version of VTK (VTK 6.3).
This test will therefore fail when comparing the input to the output if another version of VTK is used.
E.g., Ubuntu 16.04 LTS comes with VTK 6.2 and Debian buster comes with VTK 7.1
Although everything should work well on both OS, this test will unconditionnaly fail."
)
# Tests fail due to OpenGL crashing when used inside a VM
# As the test can be run directly on a "real" desktop, add the test but flag it with WILL_FAIL
if(WIN32)
set_tests_properties(action-reconstruction-integration-test PROPERTIES WILL_FAIL true)
endif()
camitk_tests_requirement(TESTS action-reconstruction-integration-test
REQUIRES "NOT WIN32"
REASON "WIN32 OpenGL failure on a VM
This test will always fail when run inside a VM due to OpenGL crash.
This test will pass when run directly from a physical windows machine."
)
......@@ -336,7 +336,6 @@ Action::ApplyStatus MeshClipping::clipMesh(MeshComponent* mesh, vtkSmartPointer
filter->SetInputConnection(mesh->getDataPort());
filter->ExtractInsideOn();
filter->SetImplicitFunction(plane);
filter->Update();
mesh->setDataConnection(filter->GetOutputPort());
if (save) {
new MeshComponent((vtkPointSet*)filter->GetOutput(), mesh->getName() + " clipped");
......
This directory contains all the test data files required to pass the automatic tests when building CamiTK with VTK7.
It is kepts here in order to simplify the future move to VTK7.
As of 23 February 2019 CamiTK supports
- VTK6 and all associated test
- VTK7 with some test disabled (all the tests that depends on the VTK version)
When CamiTK move to VTK7 only, just move the files of this directory to their respective location. All tests will
then pass.
# vtk DataFile Version 4.1
color data (not implemented yet!)
ASCII
DATASET POLYDATA
POINTS 25 float
-0.0981577 0.0639953 -0.152536 0.0662411 0.913408 0.214962 -0.0256973 1.90475 0.0318697
-0.0732923 2.97639 -0.14693 -0.0907575 4.03827 0.424344 0.991426 0.088565 -0.439235
0.956044 1.03466 -0.119008 0.966296 1.9451 -0.376246 1.08769 2.93903 -0.257324
1.03252 4.02625 -0.19867 1.98952 -0.0785815 0.407174 2.07315 0.973676 -0.168316
2.02312 1.95903 -0.0489972 1.90072 3.05295 -0.0383131 2.01426 4.03996 0.337362
3.01026 -0.0131874 -0.19971 3.09593 1.03124 -0.335646 2.95806 2.0721 0.065351
3.07098 3.09579 0.13096 3.00829 3.92759 -0.215786 4.05534 0.0646894 0.175641
4.00035 0.955553 -0.0894418 3.95042 2.05852 0.0185222 4.06053 2.96645 -0.364692
3.92506 4.01263 0.0126824
POLYGONS 32 128
3 11 6 5
3 12 8 7
3 5 1 0
3 7 3 2
3 15 11 10
3 20 16 15
3 6 2 1
3 9 4 3
3 6 1 5
3 7 2 6
3 8 3 7
3 9 3 8
3 12 7 6
3 19 14 13
3 11 5 10
3 13 9 8
3 12 6 11
3 13 8 12
3 14 9 13
3 17 12 11
3 17 13 12
3 16 11 15
3 17 11 16
3 18 13 17
3 19 13 18
3 22 17 16
3 22 18 17
3 21 16 20
3 24 19 18
3 22 16 21
3 23 18 22
3 24 18 23
POINT_DATA 25
FIELD FieldData 1
Colors 3 25 unsigned_char
196 255 0 0 254 255 0 255 19
185 255 0 0 0 255 255 0 0
137 255 0 255 46 0 255 237 0
246 255 0 0 3 255 216 255 0
23 255 0 13 255 0 0 85 255
246 255 0 255 115 0 0 255 65
0 255 185 254 255 0 0 255 241
82 255 0 0 255 8 255 67 0
0 255 4
# vtk DataFile Version 4.1
Cube example
ASCII
DATASET POLYDATA
POINTS 8 float
0 0 0 1 0 0 1 1 0
0 1 0 0 0 1 1 0 1
1 1 1 0 1 1
POLYGONS 6 30
4 0 1 2 3
4 4 5 6 7
4 0 1 5 4
4 2 3 7 6
4 0 4 7 3
4 1 2 6 5
CELL_DATA 6
NORMALS cell_normals float
0 0 -1 0 0 1 0 -1 0
0 1 0 -1 0 0 1 0 0
FIELD FieldData 1
cell_scalars 1 6 int
0 1 2 3 4 5
METADATA
INFORMATION 0
POINT_DATA 8
FIELD FieldData 1
my_scalars 1 8 float
0 1 2 3 4 5 6 7
METADATA
INFORMATION 0
# vtk DataFile Version 4.1
Random data to test tensors
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 8 float
0 0 0 1 0 0 0 1 0
1 1 0 0 0 1 1 0 1
0 1 1 1 1 1
CELLS 1 9
8 0 1 2 3 4 5 6 7
CELL_TYPES 1
11
POINT_DATA 8
FIELD FieldData 3
scalars 1 8 float
0 1 2 3 4 3 2 0
METADATA
INFORMATION 0
other_scalars 1 8 float
0 6 2 3 4 7 5 1
METADATA
INFORMATION 0
tensors1 9 8 float
1 0 0 0 1 0 0 0 1
-2 0 0 0 -2 0 0 0 3
1 0 0 0 1 0 0 0 0.001
2 1 1 1 2 1 1 1 3
0.247186 0.490995 0.131325 0.490995 -0.371056 0.719072 0.131325 0.719072 -0.156008
0.280588 0.467439 0.934953 0.467439 0.0600321 -0.211376 0.934953 -0.211376 0.962976
0.062861 -0.0117908 -0.667617 -0.0117908 -0.390601 -0.957805 -0.667617 -0.957805 -0.19332
0 0 0 0 0 0 0 0 0
# vtk DataFile Version 4.1
cell attributes
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 18 float
0.5 0.5 0.5 1.5 0.5 0.5 0.5 1.5 0.5
0.5 0.5 1.5 1.5 0.5 1.5 0.5 1.5 1.5
1.1 1.1 1 2.1 1.1 1 2.1 2.1 1
1.1 2.1 1 1.1 1.1 2 2.1 1.1 2
2.1 2.1 2 1.1 2.1 2 2.2 2.2 2
3.2 2.2 2 2.2 3.2 2 2.2 2.2 3
CELLS 3 27
8 0 1 2 2 3 4 5 5
8 6 7 8 9 10 11 12 13
8 14 15 16 17 17 17 17 17
CELL_TYPES 3
12
12
12
CELL_DATA 3
FIELD FieldData 3
group 1 3 int
1 2 1
METADATA
INFORMATION 0
material 1 3 int
100 200 300
METADATA
INFORMATION 0
group_and_material 2 3 int
1 100 2 200 1 300
# vtk DataFile Version 4.1
ImageBoundingBox
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 8 float
0 0 0 0 0 2 0 1 0
0 1 2 1 0 0 1 0 2
1 1 0 1 1 2
CELLS 1 9
8 0 4 6 2 1 5 7 3
CELL_TYPES 1
12
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