VTK multi-volume ROI not working

See image below.

Also if I go from VTK multi-volume back to GPU ray casting, slicer crashes.

Error log

[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - Session start time …: 2020-01-29 13:32:04
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - Slicer version …: 4.11.0-2020-01-20 (revision 28737) win-amd64 - installed release
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - Operating system …: Windows / Professional / (Build 9200) - 64-bit
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - Memory …: 130742 MB physical, 174630 MB virtual
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - CPU …: GenuineIntel , 12 cores, 12 logical processors
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - VTK configuration …: OpenGL2 rendering, TBB threading
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - Qt configuration …: version 5.10.1, with SSL, requested OpenGL 3.2 (compatibility profile)
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - Developer mode enabled …: no
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - Prefer executable CLI …: yes
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - Application path …: C:/Users/bordi/AppData/Local/NA-MIC/Slicer 4.11.0-2020-01-20/bin
[DEBUG][Qt] 29.01.2020 13:32:04 (unknown:0) - Additional module paths …: C:/Users/bordi/slicerltrace/Multicore, C:/Users/bordi/AppData/Roaming/NA-MIC/Extensions-28737/SegmentEditorExtraEffects/lib/Slicer-4.11/qt-scripted-modules
[DEBUG][Python] 29.01.2020 13:32:07 [Python] (C:\Users\bordi\AppData\Local\NA-MIC\Slicer 4.11.0-2020-01-20\lib\Slicer-4.11\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations
[DEBUG][Python] 29.01.2020 13:32:07 [Python] (C:\Users\bordi\AppData\Local\NA-MIC\Slicer 4.11.0-2020-01-20\lib\Slicer-4.11\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor
[DEBUG][Python] 29.01.2020 13:32:07 [Python] (C:\Users\bordi\AppData\Local\NA-MIC\Slicer 4.11.0-2020-01-20\lib\Slicer-4.11\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics
[DEBUG][Qt] 29.01.2020 13:32:08 (unknown:0) - Switch to module: “Welcome”
[INFO][VTK] 29.01.2020 13:32:16 [vtkMRMLVolumeArchetypeStorageNode (00000195E4B6D600)] (D:\D\P\Slicer-0\Libs\MRML\Core\vtkMRMLVolumeArchetypeStorageNode.cxx:471) - Loaded volume from file: C:/Users/bordi/AppData/Local/Temp/Slicer/RemoteIO/MR-head.nrrd. Dimensions: 256x256x130. Number of components: 1. Pixel type: short.
[DEBUG][Qt] 29.01.2020 13:32:16 (unknown:0) - “Volume” Reader has successfully read the file “C:/Users/bordi/AppData/Local/Temp/Slicer/RemoteIO/MR-head.nrrd” “[0.16s]”
[DEBUG][Qt] 29.01.2020 13:32:23 (unknown:0) - Switch to module: “VolumeRendering”
[ERROR][VTK] 29.01.2020 13:33:01 [vtkShaderProgram (00000195F03AC460)] (D:\D\P\Slicer-0-build\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx:461) - 1: #version 150

========A LOT OF CODE HERE========

[ERROR][VTK] 29.01.2020 13:33:03 [vtkShaderProgram (00000195E4292220)] (D:\D\P\Slicer-0-build\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx:462) - 0(816) : error C7623: implicit narrowing of type from “vec4” to “float”
0(816) : error C1103: too few parameters in function call
0(815) : error C7623: implicit narrowing of type from “vec4” to “float”
0(816) : error C1102: incompatible type for parameter #2 (“colorTF.72”)
0(815) : error C1035: assignment of incompatible types
[ERROR][VTK] 29.01.2020 13:33:03 [vtkOpenGLGPUVolumeRayCastMapper (00000195E0FC9810)] (D:\D\P\Slicer-0-build\VTK\Rendering\VolumeOpenGL2\vtkOpenGLGPUVolumeRayCastMapper.cxx:2938) - Shader failed to compile

Multi-volume rendering is still experimental. Shading and clipping are not supported yet.

@pieper indicated that we need to use the multi-volume if we need to display multiple volumes: display incorrectly when two volume rendering by3D slicer 4.10.0 - #2 by pieper

When I use the GPU ray-casting, I have the same isse as in display incorrectly when two volume rendering by3D slicer 4.10.0

The top head is always showing in foreground:

image

Multi-volume rendering will allow you to intermix multiple volumes correctly. However, until its limitations (shading, cropping, and maybe a few others that we are not aware yet) are addressed, you can use workarounds including using independent volume renderers (for highly transparent volumes they may provide acceptable quality), merging multiple volumes into a single volume, and/or using model and segmentation nodes for visualization.

I’ve added an issue to track resolving of mult-volume rendering limitations: https://issues.slicer.org/view.php?id=4719

1 Like

Thank you, I think it would be a great improvement for Slicer. Great job.

Hello,

I would like to reopen this question to ask if VTK multi-volume ROI works now with the latest VTK version.