Page MenuHomePhabricator

2D fiber mapper and VTK9
Open, HighPublic


Apparently the MITK migration to VTK9 broke the 2D fiber mapper, specifically the shader. It's probably necessary to look into the VTK handling of the shader, the shader itself and also into the MITK related input to the shader, such as the plane geometry that is used to calculate the clipping plane.

Event Timeline

neher triaged this task as High priority.Oct 27 2021, 6:18 PM
neher created this task.

Original description of the issue by Nil Goyette:

Hi all,

I've been trying to port our application to MITK 2021.02. I usually look at mitk-diffusion because we both work with the FiberBundle class and this helps me a lot! (Thank you Peter). However, I have a problem that I'm unable to solve. The 2D FiberBundle doesn't seem to work with vtk9. See

The crosshair is in the middle of a set of streamlines but we only see them in the sagittal view. If I want to see them in the other views, I need to place the crosshair at a "random" location. To see them in all views, I need to be at a weird location that is not the center of the image.
The streamlines are visible only in 3 slices. If I go further than that, they simply disappear. But they are completely visible like in the 3D view. I tried changing the Fiber2DSliceThickness property. To have an "acceptable" result, I need to use a really small number like 0.01. The screenshot above is using 0.1. At 0.5, I can see the whole streamlines. It's as if the streamlines are not where we see them. As if they were really tiny. Or the shaders are simply broken on vtk9.

I can clearly see that the mapper in mitk-diffusion (latest release using VTK 8.1.0) works, so I tried removing our modifications as much as possible to be as identical to mitk-diffusion as possible. I'm using the same TrackVis loader, FiberBundle, mapper 2D 3D, etc. It didn't change anything.

At that point, I'm already at several days of debugging, I don't know what to try and I would gladly accept any help!


I tried to create an artificial fiberbundle using Fiberfox. The result looks fine in 2D and 3D.