[vtkusers] Raw pointer returned as a string in Python

Guillaume Dumont rippalka at gmail.com
Wed Jul 9 12:19:26 EDT 2014


Hi all,

I am having a little issue concerning a function in Python that returns
what seems like a pointer as a string.

>> visPts = vtk.vtkSelectVisiblePoints()
>> visPts.SetInputData(polyData)
>> visPts.SetRenderer(ren)
>> zbuff = visPts.Initialize(True)
>> print zbuff
>> print type(zbuff)

and it prints:
_000000000dc90040_void_p
<type 'str'>

​I understand that `vtkSelectVisiblePoints::vtInitialize(bool)'​ returns a
raw pointer (float*) which I believe cannot directly be exposed to Python,
but is there a way to pass it to
`vtkSelectVisiblePoints::IsPointOccluded(const double[3], connst float*
zBuffer)' in Python somehow? Or is it just a limitation of the Python
interface?

Thanks a lot for your help!

​Guillaume​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140709/3b292241/attachment.html>


More information about the vtkusers mailing list