[vtkusers] problems with transient unstructured volume rendering

Dominik Szczerba dominik at itis.ethz.ch
Tue Dec 15 15:25:23 EST 2009


I am quite happy with static unstructured volume rendering.

The problems arise when I request subsequent timesteps:

	while time<=timeEnd:
		executive = reader.GetExecutive()
		executive.SetUpdateTimeStep(0,time)
		reader.Modified()
		window.Render()


This results in changing but wrong colors in my volume. Don't know 
exactly what is rendered, but it is certainly different from rendering 
the subsequent timestep from scratch. The situation is remedied with the 
following code:

	while time<=timeEnd:
		executive = reader.GetExecutive()
		executive.SetUpdateTimeStep(0,time)
		reader.Modified()
		renderer.RemoveVolume(volume)
		volume = vtkVolume()
		volume.SetMapper(volumeMapper)
		volume.SetProperty(volumeProperty)
		renderer.AddVolume(volume)
		window.Render()

Looks like something is not reset, but my color/transfer functions are 
static (not changing with the changing scalar ranges).

I could just shrug and go on, but this does not look fine to me so I 
thought I'd better ask if it is not a problem somewhere in VTK that 
should be reported.

Dominik

PS. Following the great example of David D. I wanted to set up a wiki 
example, but unfortunately I was unable to find a small (transient 
unstructured) example dataset or an example code to generate one.



More information about the vtkusers mailing list