[vtkusers] Accessing vtkPolyData scalars with Python

Berkowitz, Benjamin M benjamin-berkowitz at uiowa.edu
Fri Feb 17 13:47:05 EST 2012


Jothy, I get an attribute error when I try that...and I don't see GetInput() on the vtkPolyData() documentation.  If GetPointCells() is a subclass of vtkPolyData (and distanceMapper.Surface is a vtkPolyData), shouldn't I just be able to run it as a subclass without specifying an input?


________________________________
From: Jothybasu Selvaraj [jothybasu at gmail.com]
Sent: Friday, February 17, 2012 11:08 AM
To: Berkowitz, Benjamin M
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Accessing vtkPolyData scalars with Python

If surface is your input then you should use

mapper.GetInput().GetPointCells()

Jothy



On Fri, Feb 17, 2012 at 4:54 PM, bberkowi <benjamin-berkowitz at uiowa.edu<mailto:benjamin-berkowitz at uiowa.edu>> wrote:
The error is:

Traceback (most recent call last):
 File "VTK_testing.py", line 100, in <module>
   distanceMapper.Surface.GetPointCells(i, pointCellIds)
ValueError: method requires a VTK object


--
View this message in context: http://vtk.1045678.n5.nabble.com/Accessing-vtkPolyData-scalars-with-Python-tp5470807p5493180.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



--
Jothy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120217/a4684b9e/attachment.htm>


More information about the vtkusers mailing list