[vtkusers] update scalars of vtkPoints
Barth, Sebastian
sebastian.barth at iosb.fraunhofer.de
Thu Jul 1 03:48:36 EDT 2010
Hello Hagen,
did you forget to call Modified() of the vtkPolyData after altering the points? Otherwise the vtkPolyData does not know that their points, scalars or cells were changed.
Sebastian Barth
-----Ursprüngliche Nachricht-----
Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im Auftrag von Hagen Mölle
Gesendet: Donnerstag, 1. Juli 2010 08:26
An: John Drescher; vtkusers at vtk.org; sebastien.jourdain at kitware.com
Betreff: Re: [vtkusers] update scalars of vtkPoints
On 06/30/2010 06:14 PM, John Drescher wrote:
> 2010/6/30 Sebastien Jourdain<sebastien.jourdain at kitware.com>:
>
>> 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.
>>
>>
> I think vtkPolyData->GetPointData->GetScalars()
>
> is where to start
>
> John
>
Hi Sebastien and John,
Thanks for pointing out how to change the scalars of the points on the
fly. So I need to alter the vtkDataArray which I get by
vtkPolyData->GetPointData->GetScalars(). Hopefully this will work.
Yesterday I tried to set new scalars by using the following method:
vtkPolyData->GetPointData->SetScalars(vtkDoubleArray). So I did not
generate a new dataset. But the visualization did not change during
update. It seemed the old scalars where used during update.
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