[vtkusers] update scalars of vtkPoints

Hagen Mölle h.moelle at googlemail.com
Wed Jun 30 10:51:28 EDT 2010


Hi,

I am working on a program which visualizes measured points in realtime. 
The points have a x,y,z coordinate and an intensity value. As 
vtk-dataset I use a vtkPoints object. The intensity values of all points 
are stored as scalars in the vtkPoints object. During measurement the 
position of the points do not change but the intensity of each point 
changes.

My problem is that the time for updating the visualization (updating of 
intensity of each point) is too slow to call it real-time. My current 
vtk program code performs well if the number of measured points is small 
(lower 100 points). If the number of points is more than 1000 the time 
needed to update the visualization is to high. With 1000 points the 
update takes more than 6 seconds.

The update routine in my program works like this.

For every measured set of points I create a new vtkPoints object.. 
Afterwards I call the corresponding vtkDataSetMapper::SetInput(pointSet) 
method. In the end this results in updating the visualization with 
points in the same location and new intensity values.

Is there any better way to update the visualization to bring down the 
update time? Maybe instead of creating new vtkPoints object it is 
possible to only update the scalars of the old vtkPoints object and 
render it again.

Hagen



More information about the vtkusers mailing list