[vtkusers] update scalars of vtkPoints

Hagen Mölle h.moelle at googlemail.com
Thu Jul 1 02:26:09 EDT 2010


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



More information about the vtkusers mailing list