[vtkusers] reset scalars

Gonzalo Amadio gonzaloamadio at gmail.com
Mon Jul 9 09:01:55 EDT 2012


Hello,

Is there a good way of deleting scalars from a polydata?


My problem is that I am iterating over the cells of a polydata, and in each
iteration I want to use a different set of scalars.
So, in each iterarion I do :

   surface->GetCellData()->SetScalars(myScalarArray);

But I think I have to delete the scalars of the previous iteration, so I
have only the last array of scalars.



Another point of view of the question would be :
doing

   surface->GetCellData()->SetScalars(array1);
   surface->GetCellData()->SetScalars(array2);

is the same as only

   surface->GetCellData()->SetScalars(array2); ?

or the result of the first case would lead to have the scalars in "array1"
plus the scalars in "array2" and not only the scalars in "array2".

Thank you.!

-- 
--------
Gonzalo Amadio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120709/2e634849/attachment.htm>


More information about the vtkusers mailing list