Difference between revisions of "Documentation/Labs/VTK8"
Max.smolens (talk | contribs) m (→Future work) |
|||
(56 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This page documents the update of Slicer to use VTK 8.0. | This page documents the update of Slicer to use VTK 8.0. | ||
+ | |||
+ | {{documentation/banner | ||
+ | | text = Status on this page is out-of-date. Since VTK8 transition will happen in conjunction with Qt5, see detailed TODO lists on [[Documentation/Labs/Qt5-and-VTK8]]}} | ||
+ | |||
==Overview== | ==Overview== | ||
Line 7: | Line 11: | ||
==Status== | ==Status== | ||
− | * Builds on Linux and Windows | + | * Builds on Linux and Windows. |
− | + | * Fails to build on Mac due to linker error in VTK introduced in https://gitlab.kitware.com/vtk/vtk/merge_requests/1713. Potential fix is in progress: https://gitlab.kitware.com/vtk/vtk/merge_requests/3014. | |
− | * | + | * Windows shows OpenGL errors at exit with the OpenGL backend. Likely a regression from https://github.com/Kitware/VTK/commit/49802a3d15fac9dd64feb6e86fb8d0dfc2d31a05. |
− | * "VTKv7" project name | + | <pre> |
+ | Generic Warning: In C:\path\to\S\VTKv7\Rendering\OpenGL\vtkOpenGLDisplayListPainter.cxx, line 52 | ||
+ | failed after ReleaseAllLists 16 OpenGL errors detected | ||
+ | 0 : (1282) Invalid operation | ||
+ | 1 : (1282) Invalid operation | ||
+ | ... | ||
+ | 15 : (1282) Invalid operation | ||
+ | </pre> | ||
+ | * <del>VTK8 requires C++11. Because Slicer includes custom VTK classes, Slicer should also be compiled with C++11.</del> | ||
+ | * <del>On Mac, if targeting 10.7 or 10.8, likely will need to set CMAKE_CXX_FLAGS=-stdlib=libc++ for C++11 support. Note that this would require Qt build with libc++, which is officially supported by Qt5. Note: Qt 5.7.1 minimum officially supported deployment target is 10.8.</del> Resolution: target 10.9. | ||
+ | * There may be picking issues with widgets. For example, the slice view ROI handles don't work correctly. | ||
+ | * <del>* Windows (VS2013) may have a dependency issue related to Python wrapping. At first, wrapping seems to not use the hierarchy files or runs before they are available. Building again generates the wrapped classes correctly.</del> (resolved) | ||
+ | * <del>Update "VTKv7" project name to "VTKv8".</del> | ||
+ | * <del>Add <tt>Slicer_VTK_VERSION_MAJOR</tt> option to support building with VTK7 and VTK8, as was done for VTK5/6 in https://github.com/Slicer/Slicer/commit/50281153c57c683106498295ea82472eaa20eee4. VTK7 wrapping should not build the hierarchy files.</del> | ||
+ | * <del>EMSegment remote module will require updates to fix vtkDebugLeaks output.</del> (updated in r17131) | ||
===Branches/Merge Requests=== | ===Branches/Merge Requests=== | ||
Line 16: | Line 34: | ||
<b>VTK:</b> | <b>VTK:</b> | ||
− | * https://github.com/Slicer/VTK/commits/slicer-v8.0.0-2017-06-26-782d7ed | + | * <del>https://github.com/Slicer/VTK/commits/slicer-v8.0.0-2017-06-26-782d7ed</del> |
<b>Slicer:</b> | <b>Slicer:</b> | ||
− | * https://github.com/msmolens/Slicer/commits/support-vtk8 | + | * <del>https://github.com/msmolens/Slicer/commits/support-vtk8</del> |
====Outstanding VTK issues==== | ====Outstanding VTK issues==== | ||
− | * | + | * <del>Respect access specifier of using statements in wrapping: https://gitlab.kitware.com/vtk/vtk/merge_requests/2988</del> {{done}} |
− | * | + | * OpenGL errors occur when destroying vtkWin32OpenGLRenderWindow: https://gitlab.kitware.com/vtk/vtk/issues/17076 |
+ | ** Would be great to get a proper fix from the VTK team for this regression. | ||
+ | * <del>Can't build VTK on Mac with <tt>-DVTK_WRAP_PYTHON:BOOL=ON -DVTK_ENABLE_KITS:BOOL=ON</tt> because libvtkWrapping-8.1.1.dylib doesn't link.</del> | ||
+ | * Update Slicer/VTK branch to include upstreamed fixes | ||
====Slicer-specific VTK commits==== | ====Slicer-specific VTK commits==== | ||
Slicer's VTK 8.0 branch includes fixes/changes that aren't in upstream: | Slicer's VTK 8.0 branch includes fixes/changes that aren't in upstream: | ||
− | * Respect access specifier of using statements in wrapping | + | * <del>Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac</del> {{done}} (Merged upstream - Integrated in VTK as https://github.com/Kitware/VTK/commit/8a60be1) |
− | ** https://github.com/Slicer/VTK/commit/93a7c677481259cf23121a053d82ba4b7c2286e6 | + | ** <del>https://github.com/Slicer/VTK/commit/cbb1269509cb32d3827adfce1795e51209132e73</del> |
− | * ENH: Allow selection of seed points using vtkSeedWidget | + | * <del>Respect access specifier of using statements in wrapping</del> {{done}} (Merged upstream - Integrated in VTK as https://github.com/Kitware/VTK/commit/5a4ddec) |
− | ** https://github.com/Slicer/VTK/commit/734709ee38a0a25c92a9a0c7477cfddec5e12cf3 | + | ** <del>https://github.com/Slicer/VTK/commit/93a7c677481259cf23121a053d82ba4b7c2286e6</del> |
− | * Ensure vtkVariant stream associated with << operator is set back to "dec". | + | * <del>ENH: Allow selection of seed points using vtkSeedWidget</del> {{done}} (Merged upstream - Integrated in VTK as https://github.com/Kitware/VTK/commit/b684733) |
− | ** https://github.com/Slicer/VTK/commit/dbf5de60c0809ca6233fe428761ef19e561ef542 | + | ** <del>https://github.com/Slicer/VTK/commit/734709ee38a0a25c92a9a0c7477cfddec5e12cf3</del> |
+ | * <del>Ensure vtkVariant stream associated with << operator is set back to "dec".</del> {{done}} (Merged upstream - Integrated in VTK as https://github.com/Kitware/VTK/commit/dc7c62a) | ||
+ | ** <del>https://github.com/Slicer/VTK/commit/dbf5de60c0809ca6233fe428761ef19e561ef542</del> | ||
* BUG: WIP: fix vtkPickingManager interaction with widgets | * BUG: WIP: fix vtkPickingManager interaction with widgets | ||
** https://github.com/Slicer/VTK/commit/2c55e994475b6568a5b3e7363ab70c4dd722cc5d | ** https://github.com/Slicer/VTK/commit/2c55e994475b6568a5b3e7363ab70c4dd722cc5d | ||
− | === | + | ===Test results=== |
− | |||
− | |||
<b>Windows:</b> | <b>Windows:</b> | ||
Test results: | Test results: | ||
− | * | + | * http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=1058006 (Release configuration, OpenGL backend) |
<b>Linux:</b> | <b>Linux:</b> | ||
Test results: | Test results: | ||
− | * | + | * http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=1053469 (Release configuration, OpenGL backend, Ubuntu 16.04) |
− | + | ** py_StandaloneEditorWidgetTest is vtkDebugLeaks; also occurs when built with VTK7. | |
+ | * http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=1053471 (Release configuration, OpenGL2 backend, Ubuntu 16.04) | ||
<b>OS X:</b> | <b>OS X:</b> | ||
Line 60: | Line 82: | ||
===Rendering backend=== | ===Rendering backend=== | ||
− | Although VTK 7 changed the default setting of <tt>VTK_RENDERING_BACKEND</tt> to <tt>OpenGL2</tt>, Slicer still explicitly sets it to <tt>OpenGL</tt>. | + | Although VTK 7 changed the default setting of <tt>VTK_RENDERING_BACKEND</tt> to <tt>OpenGL2</tt>, Slicer still explicitly sets it to <tt>OpenGL</tt>. The rendering backend in Slicer is set using <tt>Slicer_VTK_RENDERING_BACKEND</tt>. |
====OpenGL2 backend known issues==== | ====OpenGL2 backend known issues==== | ||
− | |||
* Need to move OS X nightly build to new factory machine to be able to set <tt>CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7</tt>. This will ensure that the required OpenGL version is found. See https://github.com/Slicer/Slicer/pull/595. | * Need to move OS X nightly build to new factory machine to be able to set <tt>CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7</tt>. This will ensure that the required OpenGL version is found. See https://github.com/Slicer/Slicer/pull/595. | ||
+ | ** WIP PR: https://github.com/Slicer/DashboardScripts/pull/12. Will need to be updated for Qt5. | ||
* [http://www.na-mic.org/Bug/view.php?id=4252 4252: Slicer crashes on start when started through Windows Remote Desktop] | * [http://www.na-mic.org/Bug/view.php?id=4252 4252: Slicer crashes on start when started through Windows Remote Desktop] | ||
Line 71: | Line 93: | ||
The transition plan was announced on the Slicer forum: https://discourse.slicer.org/t/transition-to-vtk-8-0/379. | The transition plan was announced on the Slicer forum: https://discourse.slicer.org/t/transition-to-vtk-8-0/379. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Future work== | ==Future work== |
Latest revision as of 21:32, 14 August 2017
Home < Documentation < Labs < VTK8This page documents the update of Slicer to use VTK 8.0.
Status on this page is out-of-date. Since VTK8 transition will happen in conjunction with Qt5, see detailed TODO lists on Documentation/Labs/Qt5-and-VTK8 |
Contents
Overview
It is planned to update the version of VTK that Slicer uses from 7.1 to 8.0.
Status
- Builds on Linux and Windows.
- Fails to build on Mac due to linker error in VTK introduced in https://gitlab.kitware.com/vtk/vtk/merge_requests/1713. Potential fix is in progress: https://gitlab.kitware.com/vtk/vtk/merge_requests/3014.
- Windows shows OpenGL errors at exit with the OpenGL backend. Likely a regression from https://github.com/Kitware/VTK/commit/49802a3d15fac9dd64feb6e86fb8d0dfc2d31a05.
Generic Warning: In C:\path\to\S\VTKv7\Rendering\OpenGL\vtkOpenGLDisplayListPainter.cxx, line 52 failed after ReleaseAllLists 16 OpenGL errors detected 0 : (1282) Invalid operation 1 : (1282) Invalid operation ... 15 : (1282) Invalid operation
VTK8 requires C++11. Because Slicer includes custom VTK classes, Slicer should also be compiled with C++11.On Mac, if targeting 10.7 or 10.8, likely will need to set CMAKE_CXX_FLAGS=-stdlib=libc++ for C++11 support. Note that this would require Qt build with libc++, which is officially supported by Qt5. Note: Qt 5.7.1 minimum officially supported deployment target is 10.8.Resolution: target 10.9.- There may be picking issues with widgets. For example, the slice view ROI handles don't work correctly.
* Windows (VS2013) may have a dependency issue related to Python wrapping. At first, wrapping seems to not use the hierarchy files or runs before they are available. Building again generates the wrapped classes correctly.(resolved)Update "VTKv7" project name to "VTKv8".Add Slicer_VTK_VERSION_MAJOR option to support building with VTK7 and VTK8, as was done for VTK5/6 in https://github.com/Slicer/Slicer/commit/50281153c57c683106498295ea82472eaa20eee4. VTK7 wrapping should not build the hierarchy files.EMSegment remote module will require updates to fix vtkDebugLeaks output.(updated in r17131)
Branches/Merge Requests
VTK:
Slicer:
Outstanding VTK issues
Respect access specifier of using statements in wrapping: https://gitlab.kitware.com/vtk/vtk/merge_requests/2988- OpenGL errors occur when destroying vtkWin32OpenGLRenderWindow: https://gitlab.kitware.com/vtk/vtk/issues/17076
- Would be great to get a proper fix from the VTK team for this regression.
Can't build VTK on Mac with -DVTK_WRAP_PYTHON:BOOL=ON -DVTK_ENABLE_KITS:BOOL=ON because libvtkWrapping-8.1.1.dylib doesn't link.- Update Slicer/VTK branch to include upstreamed fixes
Slicer-specific VTK commits
Slicer's VTK 8.0 branch includes fixes/changes that aren't in upstream:
Fix linking libvtkWrapping with Python wrapping and kits enabled on Mac(Merged upstream - Integrated in VTK as https://github.com/Kitware/VTK/commit/8a60be1)Respect access specifier of using statements in wrapping(Merged upstream - Integrated in VTK as https://github.com/Kitware/VTK/commit/5a4ddec)ENH: Allow selection of seed points using vtkSeedWidget(Merged upstream - Integrated in VTK as https://github.com/Kitware/VTK/commit/b684733)Ensure vtkVariant stream associated with << operator is set back to "dec".(Merged upstream - Integrated in VTK as https://github.com/Kitware/VTK/commit/dc7c62a)- BUG: WIP: fix vtkPickingManager interaction with widgets
Test results
Windows:
Test results:
- http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=1058006 (Release configuration, OpenGL backend)
Linux:
Test results:
- http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=1053469 (Release configuration, OpenGL backend, Ubuntu 16.04)
- py_StandaloneEditorWidgetTest is vtkDebugLeaks; also occurs when built with VTK7.
- http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=1053471 (Release configuration, OpenGL2 backend, Ubuntu 16.04)
OS X:
Test results:
- TBD
Rendering backend
Although VTK 7 changed the default setting of VTK_RENDERING_BACKEND to OpenGL2, Slicer still explicitly sets it to OpenGL. The rendering backend in Slicer is set using Slicer_VTK_RENDERING_BACKEND.
OpenGL2 backend known issues
- Need to move OS X nightly build to new factory machine to be able to set CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7. This will ensure that the required OpenGL version is found. See https://github.com/Slicer/Slicer/pull/595.
- WIP PR: https://github.com/Slicer/DashboardScripts/pull/12. Will need to be updated for Qt5.
- 4252: Slicer crashes on start when started through Windows Remote Desktop
Discussion
The transition plan was announced on the Slicer forum: https://discourse.slicer.org/t/transition-to-vtk-8-0/379.
Future work
Future work in Slicer related to VTK 8 could include:
- Remove BTX/ETX markers.
- Check for and resolve build warnings in Slicer VTK classes.
- Check that settings in External_VTKv8.cmake are all still necessary, specifically VTK_USE_PARALLEL, and anything related to Qt.