[vtkusers] How to Connect vtkUnstructuredGridReader with vtkUnstructuredGrid

Amy Henderson amy.henderson at kitware.com
Thu Aug 19 09:33:15 EDT 2004


Hi Guido,

The method GetNumberOfPoints does not take any arguments (as the error 
message you received points out). To get the number of points from the 
output of the reader, first call Update() on the reader; then get its 
output; and then ask the output for the number of points. The code to do 
this is shown below.

reader.Update()
ugrid = reader.GetOutput()
print ugrid.GetNumberOfPoints()

- Amy

At 09:27 AM 8/19/2004, Guido Aselmann wrote:
>Hi,
>
>I want to get the GetNumberOfPoints of a file read with
>vtkUnstructuredGridReader
>
>I think vtkUnstructuredGrid.GetNumberOfPoints would do the job
>
>I try
>
>import vtk
>reader = vtk.vtkUnstructuredGridReader()
>reader.SetFileName("tracking.vtk")
>
>ugrid = vtk.vtkUnstructuredGrid()
>print ugrid.GetNumberOfPoints(reader)
>---------------------------------------------------------------------------
>TypeError                                 Traceback (most recent call last)
>TypeError: function takes exactly 0 arguments (1 given)
>
>
>
>--
>NEU: Bis zu 10 GB Speicher für e-mails & Dateien!
>1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers






More information about the vtkusers mailing list