Adding Slicer to official VTK Continuous Integration aka "Contract Testing"

To more effectively identify and address issues associated with the latest version of VTK that may impact Slicer, we are working with the VTK team to setup what we call “contract testing”.

In a nutshell, Slicer will be built automatically by the VTK CI infrastructure:

  • on a nightly basis
  • on “demand” for merge request

For more details, see CI jobs for contract testing (#18113) · Issues · VTK / VTK · GitLab

Which Slicer build option to build on VTK CI ?

We suggest the following:


Which tests to run on VTK CI ?

While running all tests would be ideal, we would like to instead maximize the use of available resources by identifying existing tests and also implementing new ones.

Here is an initial list of functionality to focus one (based on prior regressions):

  • Fiducial selection
  • Occlusion and transparency
  • Volume rendering, multi-volume rendering, depth peeling
  • Smoothing of segmentation in 3D view
  • Building of Slicer Extension like SlicerLookingGlass and SlicerVirtualReality

We also discussed building VTK and Slicer against Qt6 and that will happen later.

If you would like to help, here are some ideas:

  1. Update Slicer to build against latest VTK:

    • While working on Slicer PR-5381 that updates VTK 9 in Slicer from 9.0.20201111 to 9.0.20210108 and sqlite from 3.30 to 3.33, we identified issues related to building CPython.

    • Prior moving forward with VTK 9 update, we would first need help to update python-cmake-buildsystem to support building python >= 3.7. See Slicer issue #5014

  2. The Slicer/VTK fork associated with VT9 currently has 3 patches, at least 2 of them would need to be addressed so that we can use an install tree of VTK:

  3. Help to (a) identify relevant Slicer tests and (b) implement new ones

  4. The VTK CI will build Slicer by passing the option VTK_DIR pointing to an install tree of VTK9, we need help testing.

This sounds like a lot of work, but nevertheless useful. QtTesting can drive the GUI and set up rendering tests, which could be useful for catching errors in rendering output, so we could try to enable it.