[vtkusers] Importing Numarray object with vtkImageImport
Bruno
bruno.martin at cenpra.gov.br
Wed Jun 25 12:50:11 EDT 2003
Hi,
I'm trying to import a Numarray object passing it direct do
vtkImageImport
it is like:
import numarray
a = numarray.array([...], 'type')
i = vtkImageImport()
...
i.CopyImportVoidPointer(a, size)
TypeError: argument 1 must be string or read-only buffer, not NumArray
I knowm that's possible to do it with Numeric python(and it was
mentioned
in this list as the 'Numeric trick' some months ago), but when I try
with Numarray, that what happens. But if I do:
i.CopyImportVoidPointer(a._data, size)
it works!!! How can I do to direct pass the numarray object, whithout
messing whith the protected methods (a._data)??? Do I have to change the
numarray implementation or the vtkImageImport.cxx class??
thank's...
Bruno Sousa Martin
Centro de Pesquisas Renato Archer
Campinas - Sao Paulo - Brasil
More information about the vtkusers
mailing list