the code i used is as shown above, when i try to run the code, i get the error vtkmodules doesn’t have OSPRayPass. do i need to add something while building vtk? or is there any other way of getting access to it in vtkmodules?
OSPRay cannot do “cinematic rendering” (Siemens’ term for photorealistic volumetric rendering of medical images) yet - see raytracing in vtk. As far as I understand, OSPray is also primarily runs on the CPU, so most likely it won’t be able to provide near-interactive frame rates.
NVidia OptiX (via VisRTX) is more promising as it can take advantage of modern GPUs, but it does not yet support volume rendering at all.
I guess we need to wait until VTK’s OSPRay and/or OptiX volume rendering capabilities improve. Probably things would happen faster by providing funding to Kitware. We would not like to be the only group to fund this but if others are interested in this, too, then we would be happy to contribute.
thank you, your explanation cleared my misunderstanding. Right now is there anyway to do photo realistic rendering in vtk other than writing our own system?
Disclaimer: this image was made in OSPRayStudio, not VTK per se, but we should be able to get the same image out of VTK master or ParaView 5.9. We will need at least an openvdb import to get this data in…
It looks like this nrrd uses gzip encoding which isn’t supported in VTK 9.0 (or at least exposed in the current python wheel) which is a shame, I’d like to have a play around with it.
ParaView has a .nrrd reader and it works fine on this data, so you could either borrow PV’s nrrd reading code path for your VTK program, or more easily import it once in a ParaView session and export into .vti to work with in your program.
So for some reason VTK 9.0’s NRRD reader doesn’t seem to like this file either, Dave’s suggestion of using ParaView to convert to a vti worked fine so I can always play with that instead. Right now I’ve just used an HSV colormap with a linear opacity transfer function. I’m probably going to have a go at Ospray rendering or at least exporting as a POV file for external raytracing.