[vtkusers] get points from unstructured reader

pablo p del castillo pablodecastillo at yahoo.es
Wed Nov 9 13:29:58 EST 2011


Usually i use this method to get points from an unstructured grid :

vtkUnstructuredGridReader readerquad
readerquad SetFileName "$file"
readerquad Update
set nump [[readerquad GetOutput] GetNumberOfPoints]
vtkPoints initialpoints
puts "nump $nump"
for {set i 0} {$i < $nump} {incr i} {
set x [[readerquad GetOutput] GetPoint $i]
puts " x $x "
initialpoints InsertPoint $i [lindex $x 0] [lindex $x 1] [lindex $x 2]
}

And now i am wondering if there is a more direct method without the loop like

set points [[readerquad GetOutput] GetPoints] 

or similar.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111109/5cb19a6b/attachment.htm>


More information about the vtkusers mailing list