Slow Oblique Slicing and Scrolling with >2k Slices Using vtkOpenGLImageSliceMapper

I’m using vtkOpenGLImageSliceMapper to render more than 2000 image slices. When performing oblique slice operations in 2D or scrolling through slices, the interaction becomes noticeably slow. Are there recommended ways to improve performance with large volumetric datasets when using vtkOpenGLImageSliceMapper?

The most important thing is to ensure that the entire volume is in memory, which you can do by calling UpdateWholeExtent() on your reader. Otherwise, the mapper might be updating the pipeline (and therefore the reader) slice-by-slice as you scroll through the volume.

It’s hard to give specific advice without seeing how you have coded your pipeline.

Thanks for the reply. I re‑checked our implementation and confirmed that we are indeed loading the entire volume into memory using UpdateWholeExtent(). However, the rendering speed of vtkOpenGLImageSliceMapper is still not as fast as we expected, especially when dealing with oblique slicing and large datasets.

We also learned that some projects have rewritten parts of vtkOpenGLImageSliceMapper and implemented custom shader‑based rendering (similar to the image shown). How can we achieve this type of shader‑accelerated slice rendering in VTK 9?

If other people have already done it, why not just ask them to share their code?

Unfortunately, we don’t have access to the custom implementation used in that project. Because of that, I’m looking for any open‑source projects such as 3D Slicer or ParaView.. Are there existing VTK‑based projects or examples that demonstrate optimized shader-driven 2D slice rendering for large volumes?

@lassoan do you know anyone connected to NA-MIC that has an open-source shader-based implementation of image slicing?

@sankhesh i seen your code changes in vtkopenglsliceimagemapper, the above shader‑accelerated slice rendering as shown in above picture can be achieved?