[vtkusers] Efficient thresholding

Phil Goddard philgoddard at telus.net
Fri Aug 15 10:49:04 EDT 2008


I'm having problems with performing thresholding of data at an acceptable
speed, and am wondering if there are better ways than I am currently using.

I am visualizing cells, where my data consists of a StructuredGrid where
each point has a real scalar value between 0 and 10, and I've got a lookup
table so that points that round down to the same integer are coloured the
same.
My grid is about 200 by 100 by 30 points.
I have a UI with a button that when pressed thresholds the data by
eliminating points with the same colour, i.e. the first press removes points
less than 1, the second press eliminates those less than 2, etc...

On initialization I create a pipeline that consists of

vtkStructuredGrid
vtkThreshold
vtkGeometryFilter
vtkPolyDataMapper
vtkActor

Each time my threshold button is pressed I perform
thresh->ThresholdBetween(lowerVal,upperVal);
Renderer->Render();

This does the job, but takes 5-6 seconds to update, which is unacceptable
from a user perspective.
Is there a more efficient way to do this type of thresholding?

Thanks
Phil.







More information about the vtkusers mailing list