[vtkusers] vtkRenderWindow : performance issues ?!

Prashanth Dumpuri prashanth.dumpuri at vanderbilt.edu
Fri Nov 4 16:12:19 EST 2005


All,
  I'm trying to display a 2D image (one slice from a 3D volume) and a 3D
object in the same RenderWindow. After reading in the input files, I use
vtkImageMapper and vtkActor2D to display the image slice and
vtkPolyDataMapper and vtkActor to display the object. I have two
vtkRenderers, one for the image and one for the object with their
viewports set to split the RenderWindow into two. 
  But displaying both the image and the 3D object slows down all mouse
interactions(rotate,pan,zoom) with the 3D object. There's a "delayed"
effect, i.e., events occur a while after i press/click the mouse
buttons. 
  I'm not sure if this is hardware related but here's my machine specs:
I have a dual processor machine (2.4GHz Pentium4 each) with a  1GB of
RAM and a QuadroFx1000.
Any help will be greatly appreciated.
Thanks,
Prashanth


Here's the psuedo-code of what i'm trying to do:
--------------------------------------------------------
 read in inputs and store 'em as image(3D image volume) and 3dobject(the
3d object)

image_mapper = vtkImageMapper()
image_mapper.SetInput(image.GetOutput())
image_mapper.SetZSlice(<the slice i want to view>)

image_actor = vtkActor2D()
image_actor.SetMapper(image_mapper)

r_image = vtkRenderer()
r_image.SetViewport(0.0,0.0,0.5,1.0)
r_image.AddActor(image_actor)

object_mapper = vtkDataSetMapper()
object_mapper.SetInput(3dobject.GetOutput())

object_actor = vtkActor()
object_actor.SetMapper(object_mapper)

r_object = vtkRenderer()
r_object.SetViewport(0.5,0.0,1.0,1.0)
r_object.AddActor(object_actor)

rw = vtkRenderWindow()
rw.AddRenderer(r_image)
rw.AddRenderer(r_object)
rw.Render()
-------------------------------------------------------------------




More information about the vtkusers mailing list