[Neuroimaging] Troubles with plotting of data from fMRI

Ruben Branco ruben.branco at di.fc.ul.pt
Tue Apr 3 10:29:10 EDT 2018

Dear Cristophe,

I indeed only have the SPM.mat and have no access to the map that you 
have mentioned. I did, however, revisit documentation and realized that 
I was misinterpreting the some of the information provided with the 
SPM.mat, and built the 3D array just like you recommended and it indeed 

Thank you very much for your help!

Best Regards,

Ruben Branco
University of Lisbon
NLX - Natural Language and Speech Group, Department of Informatics
Faculdade de Ciências

On 04/03/2018 02:23 PM, Christophe Pallier wrote:
> If I understand correctly, you do not have the map as an image 
> (analyze: img, hdr, ot nifti: nii), but only the values of a stat for 
> suprathreshold voxels as a series of triplets (coordinates) and values.
> It looks like you only have the SPM.mat file but it would be nicer to 
> have the spmT*.{img,hdr} and con*.{img,hdr} files. Check first if you 
> can have those.
> If you only have the SPM.mat file, you could create a Niftiimage by 
> creating a 3D numpy array and filling the voxels with the values.
> Then, once you have the image, you will be able to use plot_glass_brain.
> Hope this helps and is not too off the mark.
> On Tue, Apr 3, 2018 at 3:03 PM, Ruben Branco <ruben.branco at di.fc.ul.pt 
> <mailto:ruben.branco at di.fc.ul.pt>> wrote:
>     Dear all,
>     I was recently handed a task with a component which has to do with
>     neuro imaging, completely left-field from my field, which is NLP.
>     I have been trying to plot activation in the brain from fMRI data
>     using the package Nilearn, but to no avail.
>     The data structure is in an old format, SPM99, containing an array
>     of vectors, each vector having 3 integers, which are the
>     coordinates in voxel space for each voxel. I also have the
>     affinity matrix and the activation values for each voxel. When
>     trying to visualize it using glass brain plotting, I am unsure
>     where to include activation and surprisingly, without even
>     accounting for activation values, just providing the voxel data
>     and the affinity matrix yields a single line, which seems like the
>     way I am providing the image only accounts for one slice. Despite
>     being an SPM99 image, I have tried to convert it to Nifti and the
>     same line was the output.
>     I was wondering whether anyone could spot the culprit in the
>     process that is causing these issues and perhaps even pointing me
>     in the right direction with relevant articles. The articles I have
>     read regarding this issue and the specification of the Nifti
>     format were unhelpful, perhaps(or definitely!) because of my
>     inexperience with the field.
>     I apologize if this sounds like a very naive plead of help, it's
>     something I've never have dealt with before that's for sure!
>     Thank you so much for your time,
>     Ruben Branco
>     University of Lisbon
>     NLX - Natural Language and Speech Group, Department of Informatics
>     Faculdade de Ciências
>     _______________________________________________
>     Neuroimaging mailing list
>     Neuroimaging at python.org <mailto:Neuroimaging at python.org>
>     https://mail.python.org/mailman/listinfo/neuroimaging
>     <https://mail.python.org/mailman/listinfo/neuroimaging>
> -- 
> --
> Christophe Pallier <christophe at pallier.org 
> <mailto:christophe at pallier.org>>
> INSERM-CEA Cognitive Neuroimaging Lab, Neurospin, bat 145,
> 91191 Gif-sur-Yvette Cedex, France
> Tel: 00 33 1 69 08 79 34
> Personal web site: http://www.pallier.org
> Lab web site: http://www.unicog.org
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20180403/d8192e5e/attachment.html>

More information about the Neuroimaging mailing list