Speed problems

Matthew Hall mahall at math.uiuc.edu
Thu Oct 14 18:04:31 EDT 1999


Nils Holger Busch wrote:
> 
> Hello,
> 
> I am encountering severe speed problems using vtk . In my app code I
> read in a 160^2*200 volume and try to render three orthogonal slices
> like in the medical example. However, vtk takes a lot of time to even
> display(several minutes) the slices and it is almost impossible to
> interact (transform the viewpoint) with the data. Can anyone explain
> that behaviour? Is this normal?

It is normal if you are taking slices using the vtkImplicitFunction
filter in your pipeline. It is ridiculously slow, and takes longer
than an isosurfacer! (on Structured Points, at least). However, the
implicit function method is more general, and can be used to slice with
other surfaces besides planes.

There are several alternatives for plane slicing:
Use a vtkPlaneSource and vtkProbeFilter.
Use a vtkGeometryFilter (extract a 2D slice of the data with no
		interpolation. Hardly a problem for a dataset of
		your size)
Use vtkImageReslice, or
Grab an orthoslicer that I wrote at:
http://zeus.ncsa.uiuc.edu/~mahall/
called vtkOrthoSlicer (which linearly interpolates the scalars if 
the plane cuts between your data vertices)

Any of these will make slicing much, much, much more interactive,
even for large datasets.

I don't have any example code for the above methods, since my needs are
modest, and I just use mine (no frills though). vtkGeometryFilter seems
to be the filter of choice for orthogonal slices on structured points,
and vtkImageReslice for non-orthogonal (despite the "Image" in the
name, it works just fine on structured points as well) 


> Does anyone know how vtk compares in speed to pure OpenGL Code,
> OpenGLOptimizer, OpenInventor or complete  visualization programs like
> OpenDX from IBM? If this is no heresy to ask on a vtk list.

The OpenGL renderer VTK uses incurs some overhead, so rendering is
a wee bit slower than if you were to write it yourself. Depending on
how dynamic your model is, though, vtk can use OpenGL display lists
to render static images, incurring almost no overhead. 

Also, since filters don't use any OpenGL specific code, some of em 
can kill ya (as you found out).

-matt


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list