[Neuroimaging] Save file as .img

Christopher Markiewicz markiewicz at stanford.edu
Mon Aug 13 09:20:08 EDT 2018

Hi Smail,

There isn't enough information to answer your question, here. What sort of data is in your matrix, and what do you typically use .img files for? Are there associated .hdr files? If not, you're unlikely to be using neuroimages, and I'm not sure we will be very useful to you on the neuroimaging mailing list. If so, could you give a demonstration of how you're constructing your matrix? For instance,

    import nibabel as nb

    img = nib.load('input.img')

    data_matrix = some_function(img.get_fdata())

Also, this is a pretty broad set of mailing lists that you're cross-posting to. I would suggest you try to limit your posts specifically to the relevant mailing list(s).



From: Neuroimaging <neuroimaging-bounces+markiewicz=stanford.edu at python.org> on behalf of SMAIL Tayeb <st_gc at hotmail.fr>
Sent: Sunday, August 12, 2018 4:21:44 PM
To: edu-sig at python.org; db-sig at python.org; datetime-sig at python.org; neuroimaging at python.org; image-sig at python.org; import-sig at python.org; stdlib-sig at python.org; scipy-user at python.org; web-sig at python.org
Subject: [Neuroimaging] TR: Save file as .img


I need to know if I can save a matrix (array)

as  Disc Image File .img

My best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20180813/e474878e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 38462795_1898950803495966_5739267782923517952_n.jpg
Type: image/jpeg
Size: 6172 bytes
Desc: 38462795_1898950803495966_5739267782923517952_n.jpg
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20180813/e474878e/attachment.jpg>

More information about the Neuroimaging mailing list