[vtkusers] vtkPolyData->GetPointData->GetScalars

Katherine Kerekes kerekes at fastmail.fm
Wed Jun 1 22:14:29 EDT 2005


Hello all,

I have seen several postings on the group about problems getting scalars
from vtkPolyData.  One message says that to do this in tcl, the correct
syntax would be:

[[polyData GetPointData] GetScalars]

So my code is something like this

vtkPointData thisPointData
	set thisPointData [[polyloop GetOutput] GetPointData] 
vtkFloatArray thisdata
	set thisdata [thisPointData GetScalars]
	puts "thisdata=$thisdata"

(polyloop is a vtkSelectPolyData)

But when I do this I get nothing--thisdata="" instead of a vtkTemp object.
I have read that in C++ casting the result of
polyData->GetPointData()->GetScalars() to a vtkFloatArray will give results.
How can I do something similar in tcl?  vtkFloatArray is not a defined data
type.

Please help!

Kate Kerekes




More information about the vtkusers mailing list