[vtkusers] vtk, Python and C/C++

tutu lamotte tutulamotte at yahoo.com
Mon Sep 29 15:34:29 EDT 2003


Mr Chou,

Please keep in mind the fact introduced in David
Gobbi’s last message.
If your need is to allow interaction between python
and C++ vtk filters you would have made, you should
then use CMake to generate the wrappers code.

If you need to allow information to be exchanged
between Python and your own C++ “Not vtk-related”
code, then the thing would be to SIP the data
structure you need to pass and you’ll be able to pass
it on a pointer\ref based. (i.e. There will be not
copies of the actual values.)

But I feel like the SIP mailing list would be more
appropriate for this discussion since it no longer
relates to VTK.

Get some practice with SIP before starting any real
implementations.

Write me directly if you still have questions the
SIP-Python mailing list can’t help you with. 



--- Yi-Yu Chou <chouyiyu at hotmail.com> wrote:
> Thanks for your information Tutu.
> Now I have a new problem !!!
> 
> The structure of my code is as below :
>          ------------         ----------       
> ----------
>          |              |        |            |     
>   |           |
>          |  Python  |  <-->| wrapper| <--> |   vtk  
>  |
>          |   (GUI)    |        |            |       
> |           |
>          |              |        -----------       
> ----------
>          ------------                               
>      |
>                 ^                                   
>         | ??  
>                 |                ----------         
> ----------
>                 |                |            |     
>    |   My    |
>                 ------------>| wrapper|  <--->|  
> C++   |
>                                  |            |     
>    |           |
>                                  ----------         
> ----------
> 
> I use python to do the GUI and use vtkImageData to 
> display the image. Now I want to write my C++ class
> to do image processing. My question is how to
> commnuicate 
> between python and my c++ class just using a pointer
> ( or 
> other simple ways) not passing the whole 3D array
> and other
> image information. 
> Or is it possible to communicate directly between
> vtk and my C++
> class ?
> Thanks a lot !!!!!!!!!!!!!!!!!!!!!!!
> 
>
_________________________________________________________________
> ¥[¤J MSN ªÀ¸s¡G¾Ö©ê¸s²³¡B¤À¨É¸gÅç¡Bµo²{¥Í¬¡ªº¼Ö½ì 
> http://groups.msn.com?pgmarket=zh-tw  
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com



More information about the vtkusers mailing list