[vtkusers] Rendering multiple volumes

Arunachalam naraya3 at rpi.edu
Thu Jan 29 18:42:07 EST 2009


Hi,

    I have been trying to render a vtkVolume using 
vtkOpenGLVolumeTextureMapper3D. In my case, I have a number of 
volumes(say 5 to 10) and I need to be able to switch between them very 
fast. At any point of time I'd be rendering only one volume though. I 
assumed, that generating all volumes adding them to a vtkRenderer and 
toggling the visibility option for the vtkProp3D works fast. In the 
first few changes, it takes a long to Render(). It hardly takes any time 
after a few toggles. I'm guessing, that VTK is probably regenerating the 
textures initially. My volumes are of size 480x400x30 and I'm using 3D 
texture mapping.

Is there a way to make it retain all the textures in the GPU? I have a 
good GPU and wouldn't mind it caching all the volumes if it is indeed 
possible. That way, it could have some delay initially to copy all the 
textures to GPU, but once the interactive program boots, it should be 
able to change between the volumes fast.

I'm using QVTKWidget and rendering my volumes inside it. This could also 
be causing some trouble..

My code to update the volume looks like this

    m_vtkvolumes[m_currenttime]->VisibilityOff();
    m_currenttime = t;
    m_vtkvolumes[m_currenttime]->VisibilityOn();
    m_vtkrenderer->Render();


Thanks,
Arun



More information about the vtkusers mailing list