[vtkusers] performance issue
Sean McBride
sean at rogue-research.com
Wed Feb 23 17:40:03 EST 2011
On Wed, 23 Feb 2011 15:26:00 -0700, David Gobbi said:
>Even 5s seems like a very long time for an operation like this. My
>guess is still that vtkImplicitDataSet is the main cause of slowness,
>because it's Evaluate method is very expensive and is be called for
>every voxel in the image when the stencil is generated. It is
>possible that some changes to VTK between 4.2 and 5.6 have made
>Evaluate even more expensive than it used to be.
>
>I recommend that instead of using implicit functions, you do the following:
>1) use vtkDataSetSurfaceFilter to generate a polydata surface for your
element
>2) use vtkPolyDataToImageStencil to create a stencil from that surface
>
>The vtkPolyDataToImageStencil filter is much faster than
>vtkImplicitFunctionToImageStencil, especially for 3D data.
Vincent,
David knows his stuff, but even educated guesses are no substitution for
measurement. I suggest also using a profiler to measure where your
bottlenecks are. If you're not familiar with the concept, see:
http://en.wikipedia.org/wiki/Profiler_(computer_science)
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtkusers
mailing list