[ITK] [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/community/attachments/20160620/3e207341/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list