[vtkusers] vtkRenderer vs vtkRenderWindow performance
M W
sonomw at yahoo.com
Wed Aug 28 00:55:07 EDT 2013
Hi all, I'm relatively new to VTK and am having some issues with performance. I am trying to achieve interactive slicing of a roughly 200x200x200 vtkVolume using vtkImageReslice, displayed through a 640x480 wxVTKRenderWindow in Python. This is all working great, but it's slow, maybe 5 - 10 frames per second, making the application difficult to use. I'm running this on a Windows 7 / Intel Core i7 / nVidia Geforce GTX laptop.
The main bottleneck is the call to the wxVTKRenderWindow Render function. Out of curiosity, I timed the speed of the Render function of the vtkRenderer directly, and this was nearly an order of magnitude faster. Is this to be expected? I figured the bulk of the work would be in the vtkRenderer. I'm fairly new to all of this so I'm not quite clear on what work is performed by the renderer/rendercollection/renderwindow/interactor, but is there a way to get the vtkRenderWindow Render to better match the speed of the vtkRenderer Render?
I get very smooth results rotating the entire volume within the wxVTKRenderWindow, so it seems somewhat unexpected that rendering a single slice is so much slower.
My test case looks something like this:
start_time = time.time()
for i in range(100):
self.sliceRenderer.Render()
#self.sliceRenderWindow.Render()
end_time = time.time()
print 'Elapsed time = ', end_time - start_time
Any ideas? Thanks!
--Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130827/c5d0fc9c/attachment.htm>
More information about the vtkusers
mailing list