Documentation/Labs/VTK6
From Slicer Wiki
Home < Documentation < Labs < VTK6
This page will document experiments related to the upgrade of Slicer base to VTK6.
Contents
References
- http://www.kitware.com/source/home/post/116
- http://www.kitware.com/blog/home/post/509
- http://www.kitware.com/blog/home/post/508
Experiments
Build System
Migration Guide
This section documents required change to make Slicer code work with VTK6.
Use SetInputPolyDataConnection and GetPolyDataConnection
Start with Slicer r24801, support for VTK5 API was removed and VTK6 API should be used.
Error message similar to:
error: ‘class vtkMRMLModelDisplayNode’ has no member named ‘SetInputPolyData’ resultDisplay->SetInputPolyData(resultModel->GetPolyData()); ^
Solution:
Replace occurrences of SetInputPolyData/GetPolyData with SetInputPolyDataConnection/GetPolyDataConnection.
Progress
- VTK6 has been integrated into Slicer trunk. It is disabled by default. To enable it, pass the option
-DVTK_VERSION_MAJOR:STRING=6
- Using ccmake and setting the VTK_VERSION_MAJOR variable does not seem to work. The first "generation" in ccmake, causes a VTKv5 structure to be created which is not overwritten by subsequent runs with VTK_VERSION_MAJOR changed. I had to remove the VTKv5 directories from the build and run cmake as described above with -DVTK_VERSION_MAJOR:STRING=6. - Jim