[vtkusers] points from polydata

Bruno Travençolo bant at grad.icmc.usp.br
Mon Mar 17 09:25:56 EST 2003


Hello All,

I read a polydata from this file, that represents one line in the space:
----------------------------------------------------------------------------
# vtk DataFile Version 3.0
A simple line formed by 1000 points
ASCII
DATASET POLYDATA
POINTS 1000 float
247.0 218.0 145.0
246.9 218.4 145.2
..........

LINES 1 1001
1000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14..............
----------------------------------------------------------------------------

and the commands that I used to read it was:

        reader[i]  = vtkPolyDataReader::New();
        reader[i]->SetFileName(filename);
        reader[i]->Update();


Now I want to get the first point and the last point  from the point 
list. Something like that:

float first[3],last[3]
first = reader[i]->GetOutput()???????????
last = reader[i]->GetOutput()???????????


But I didn't find the proper command for that. How can I do this??

thanks,

Bruno.




More information about the vtkusers mailing list