[ITK] [ITK-users] SimpleITK, read MHD volume and convert it into a numpy array respecting its transformation

fausto milletarì fausto.milletari at gmail.com
Wed May 4 13:14:37 EDT 2016


Hello everyone,

I have a probably naive question about simpleITK. I find simpleITK extremely useful to process medical data such as MRI scans but I would like also to enjoy being able to convert my images in numpy format while respecting the transformation of the volume.

In other words I would like to get the MRI image in numpy rotated by the correct amount around each axis with zero padding for example.

when i do simply sitk.GetArrayFromImage(imgResampledCropped)I get back the raw data itself, but what I would like to do is to have a numpy array that contains the data “ready to visualise” by simple slicing of the array itself.

Do you think this is doable? Is there a standard way of doing it?



Kind regards,

Fausto

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160504/1e08367f/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