[vtkusers] How to attach vtkIdlist to vtkDataSet?

Sunrise helios.corona at gmail.com
Fri Sep 13 12:50:40 EDT 2013


Hello,I have two datasets, an vtkUnstructuredGrid and a vtkPolyData. The
polydata is physically inside unstructured grid. For each point of polydata,
I have an Id of the Cell of unstructuredgrid which that point is located
inside that cell. I stored the Ids in vtkIdList.Now, I want to attach the
vtkIdList to the polydata (like
vtkPolyData::GetPointData()->SetScalars(myIds)). But it seems only
vtkDataArrays can be an argument (like vtkIntArray).I could use vtkIntArray
at first. The little problem with vtkIntArray is that its output is double
type again (double vtkIntArray::GetTuple()), so I have to cast its output to
unsigned int every time I want to get an Id. While my guess is that
vtkIdList is designed for integers and does not have such problems.Is there
any way to assign vtkIdlist to vtkDataSet?Thanks.



--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-attach-vtkIdlist-to-vtkDataSet-tp5723467.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130913/975fda75/attachment.htm>


More information about the vtkusers mailing list