How we created a faster volume rendering pipeline for CT?
For a long time, I was using VTK’s CPU mapper for volume rendering out of habit. It worked, but once we switched to the GPU mapper, the difference was obvious. If your workstation or server has a GPU, moving from vtkFixedPointVolumeRayCastMapper to vtkGPUVolumeRayCastMapper is one of those small changes that pays off immediately.
What changed in our viewer

We recently updated our viewer to use vtkGPUVolumeRayCastMapper wherever a compatible GPU is available. The impact was immediate:
- Interaction feels natural. Rotation, and zoom are fluid, even on large studies.
- Live cropping is responsive. Adjusting the region of interest updates without that lag you learn to tolerate on CPU.
- Visual quality benefits from lighting and gradient-based shading without the usual hitching.
The video in the post shows a full-body CT running smoothly, with no noticeable hiccups during navigation or cropping.
Why the GPU mapper makes a difference
- Ray casting on the GPU uses 3D textures and parallel sampling, which is well-suited for modern cards.
- Shading, gradient opacity, and smooth transfer function updates are handled with little penalty.
- Large volumes that felt “heavy” on CPU become manageable in clinical workflows.
A quick note on vtkSmartVolumeMapper
vtkSmartVolumeMapper can automatically select a mapper based on your system. In practice, we prefer explicitly setting vtkGPUVolumeRayCastMapper for predictable performance and feature parity across workstations and servers. We then fall back to CPU only when needed.
Practical setup tips we found helpful
- Check driver support and headless contexts. On Linux servers, use an offscreen OpenGL context (EGL) and the NVIDIA Container Toolkit if you’re running in Docker.
- Mind VRAM. Large CTs can exhaust GPU memory. Consider resampling, cropping, or tiling strategies for very large volumes.
- Use appropriate scalar types and ranges. Many CTs are 12–16 bit; set the volume property and transfer functions accordingly to avoid banding or washed-out windows.
- Tune sampling distance. Smaller sample distances improve quality but increase cost. Find a balance per modality.
- Enable shading deliberately. vtkVolumeProperty supports gradient opacity and shading; enable them where they add diagnostic value.
- Use cropping in the mapper. vtkGPUVolumeRayCastMapper supports cropping planes natively, which keeps interactivity high when focusing on a region of interest.
- Provide a safe fallback. If no GPU is available, automatically switch to vtkFixedPointVolumeRayCastMapper or degrade features gracefully.
When we still use CPU
- Environments with no compatible GPU or limited drivers.
- Batch processing pipelines where interactivity is irrelevant.
- Memory-constrained deployments where CPU behavior is more predictable.
Results you can expect
Without promising a specific number, you should see a clear jump in responsiveness on modern GPUs, especially during navigation, window/level adjustments, and cropping. It’s one of those changes your users will feel immediately.
Need help building or upgrading your medical imaging platform?
This is exactly the type of work we do at PYCAD. We build custom medical imaging platforms with advanced, modular DICOM viewers, tailored measurement tools, volume rendering, AI-assisted workflows, and integrations with your PACS, VNA, or cloud storage. We also help teams:
- Move to GPU-accelerated rendering across desktop and server environments
- Build plugin-based viewers that support MPR, VR, and 3D meshes
- Deploy secure, performant web apps using VTK, trame, and modern frontends
- Optimize rendering for large studies and complex clinical workflows
If you’re planning a new viewer or want to upgrade an existing one, let’s talk. Visit pycad.co and tell us about your project.