[vtkusers] VTK <--> NumPy <--> VTK Integration

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Mon Feb 3 13:40:37 EST 2003


>>>>> "Bruno" == bruno martin <Bruno> writes:

[snip]

    Bruno> using vtkImageExportToArray.py and
    Bruno> vtkImageImportFromArray.py with some adjust (the Numerical
    Bruno> array->void* trick, and so on, as mentioned in some
    Bruno> messages here end there...). I'm using VTK 3.2.  Someone
    Bruno> knows anything about it? Should I do it and test or it
    Bruno> doesn't make any sense (this VTK to array to VTK)?  thank's
    Bruno> anyway...

Both these classes are available in recent VTK nightlies (i.e. VTK
CVS) and will be part of VTK 4.2.  They are in the
Wrapping/Python/vtk/util/ directory and can be accessed as part of the
vtk.util package.  They should work but are not tested completely.
I've just created a simple test
(Imaging/Testing/Python/TestNumericArrayImageData.py) for the classes.
The test is definitely not exhaustive but does pass.

Try it out and let us know if it works or gives you problems.

cheers,
prabhu



More information about the vtkusers mailing list