[vtkusers] GetVoidPointer() in Python...

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Aug 19 14:28:37 EDT 2004


>>>>> "TS" == Tuhin Sinha <tk.sinha at vanderbilt.edu> writes:

    TS> Hey all,
    TS>   What's the point of vtkDataArray::GetVoidPointer() in
    TS>   Python?  How can
    TS> I use the returned pointer address inside Python to get to the
    TS> data.  In a similar vein, why doesn't vtkDataArray have
    TS> something like ExportToVoidPointer(void*).  This would allow
    TS> easy exporting of vtkDataArrays to Python.  FYI, my end goal
    TS> is to copy a substantial amount of data from a vtkFloatArray
    TS> over to a python array without going through a for loop.  Any
    TS> help is appreciated.

Look at Wrapping/Python/vtk/util/vtkImage{ImportFrom,ExportTo}Array.py

cheers,
prabhu



More information about the vtkusers mailing list