I have an algorithm running on the GPU and I want to visualize its output matrix of size 1000 x 100 x 100
as a volume using a maximum intensity projection. Currently, I am copying the data back to the host, initialize a vtkFloatArray
using a pointer to the matrix, transform it to a vtkImageData
and then visualize it using a vtkFixedPointVolumeRayCastMapper
.
However, since I want to update the volume after the previous visualization has finished, which currently takes around 300 ms, the goal is to accelerate the visualization time.
- Is it possible to make a
vtkOpenGLGPUVolumeRayCastMapper
instance access the data on the GPU directly without copying it back to the host? - Even with the current approach, if I switch from
vtkFixedPointVolumeRayCastMapper
tovtkOpenGLGPUVolumeRayCastMapper
, the volume is not updating anymore if I callvtkRenderWindow::Render()
. Do I have to change anything in order to update the OpenGL-based mapper, e.g.,vtkOpenGLGPUVolumeRayCastMapper::DoGPURender()
? - Are there any VTK-related techniques to accelerate the animation of large volumes and is there any advantage of using