[vtkusers] Passing data between VTK and NumPy.
Donna Hanlon
donna at v1.wustl.edu
Wed Sep 18 13:18:56 EDT 2002
Hi Maurice,
[didn't see your original post, but saw Prabhu's response to it]
>>>>> "MvdR" == Maurice van de Rijzen <maurice at akst.tn.tudelft.nl> writes:
MvdR> using NumPy(A fast Numerical Extension of python). The
MvdR> problem is that I don't know how to get the data from the
MvdR> SetExecuteMethod into NumPy. Afaik know NumPy can read from
MvdR> strings and files.
MvdR> Do I need to convert the data into a string? Is there a way
MvdR> to 'say' to NumPy where in memory the 5D-dataset starts?
MvdR> Does someone has experience in using NumPy in combination
MvdR> with VTK?
Have a look at David Gobbi's vtkMINCReader example. He uses python,
Numeric, and vtk. I found it in one of the vtkusers archives
(http://public.kitware.com/pipermail/vtkusers/2001-July/007213.html) and
found it very helpful. From David's 13 Jul 2001 post:
>The vtkMINCReader is available from
>ftp://ftp.irus.rri.on.ca/pub/minc/python_minc/
>and is also part of the 'atamai' package at http://www.atamai.com/
>Apologies about the ftp site, you must use active (not passive)
>ftp to access it. #(&$(& sysadmins and their #$()*&* firewalls.
>I'll set up a better link when I get back from vacation.
Donna Hanlon
On 10 Jul 2001, Alexandre Guimond wrote:
> Nice. Would it be possible for me to get the vtkMINCReader and
> vtkDICOMReader you reference in the code?
The vtkMINCReader is available from
ftp://ftp.irus.rri.on.ca/pub/minc/python_minc/
and is also part of the 'atamai' package at http://www.atamai.com/
Apologies about the ftp site, you must use active (not passive)
ftp to access it. #(&$(& sysadmins and their #$()*&* firewalls.
I'll set up a better link when I get back from vacation.
- David
More information about the vtkusers
mailing list