[ITK-users] WrapITK question: how to cast images with RGB or complex float pixel types to a Numpy array?

Edwin Bennink hebennink at gmail.com
Mon Jun 20 09:49:58 EDT 2016


Hello,


I am searching for a way to access pixel data of unsigned char RGBPixel
images and complex float images in Numpy through PyBuffer.

I guess that it should be possible to cast these images to a vector type
and access the data without copying, but I can't figure out how. PyBuffer
doesn't support RGB or complex images, and it feels stupid to decompose and
recompose into a vector image.

What would be a neat solution to this problem? Thanks!


Edwin Bennink
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160620/3e207341/attachment.html>


More information about the Insight-users mailing list