[vtkusers] update scalars of vtkPoints

Sebastien Jourdain sebastien.jourdain at kitware.com
Wed Jun 30 12:10:08 EDT 2010


Hi Hagen,

As you said, you can start by simply change the data on the fly and
call Render() once the change has been done. By change I mean point
location, scalar data and even point number.
But be aware that only one thread should be used in VTK otherwise they
have to be synchronized.

Seb

2010/6/30 Hagen Mölle <h.moelle at googlemail.com>:
> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list