On Tue, May 19, 2009 at 12:30 PM, Chris Colbert <[email protected]> wrote:
> this message got sent before it was finished.
>
> At any rate, am I on the right track here? I'll need a way, at the very
> least to expose the data buffer of the image to python so I can display on
> the screen via wxPython.
>

IMHO, that's definitely the right track. However, take into account
name clashing (between your cdef class and the C handles).


> Chris
>
> On Tue, May 19, 2009 at 11:29 AM, Chris Colbert <[email protected]> wrote:
>>
>> I think i'm starting to wrap my head around all of this, but I have a
>> question about expose a C data type to python.
>>
>> I'm interfacing with the OpenCV library whose fundamental data structure
>> is an IplImage. Most of the functional code passes around pointers to these
>> types and can do this in cython with no problem. I hit the wall when I try
>> to get my final result back into python. I have been trying to just pass the
>> pointer back which obviously wont work. Now, I am thinking the right way to
>> go about it is to write an extension type that interfacing with the
>> structure on the C level.
>>
>> i.e. something like:
>>
>> cdef class IplImage:
>>       cdef IplImage* img
>>
>>       def __init__(
>>
>>
>
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
>



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to