[Neuroimaging] Strange offset plotting MRIs with plot_glass_brain

Ioan-Andrei Bârsan andrei.ioan.barsan at gmail.com
Tue Oct 25 14:29:41 EDT 2016


Dear members of the Python Neuroimaging list,

I'm having some difficulties analyzing some MRI data using nilearn, and I
would be very grateful for some pointers.

I'm using nilearn (nipype==0.12.1). Right now, I'm working on visualizing
some things, and later I plan on doing age predictions using regression.

However, when I plot my own data using e.g.
`nilearn.plotting.plot_glass_brain` I notice a strange offset. I've
attached a screenshot showing what happens. This does not happen when using
e.g. data from the sample OASIS dataset, in which case the brain aligns
correctly with the template.

Could it be that the images use different coordinate system conventions?
I've read about MNI vs Talairach coordinates, and how they differ, but I'm
not sure whether this really is the problem I'm having, or how I should
proceed in order to gain more information.

My .nii files 'headers don't seem to specify what kind of coordinates are
being used. I've attached the contents of a sample header in case there's
something there that I'm missing.

I would be very grateful for some advice. Please let me know if I should
provide any other information!

Kind regards,
Andrei Bârsan

[image: Screen Shot 2016-10-25 at 7.41.55 PM.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20161025/56537873/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2016-10-25 at 7.41.55 PM.png
Type: image/png
Size: 728007 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20161025/56537873/attachment-0001.png>
-------------- next part --------------
<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'
sizeof_hdr      : 348
data_type       : b''
db_name         : b''
extents         : 16384
session_error   : 0
regular         : b'r'
dim_info        : 0
dim             : [  4 176 208 176   1   1   1   1]
intent_p1       : 0.0
intent_p2       : 0.0
intent_p3       : 0.0
intent_code     : none
datatype        : int16
bitpix          : 16
slice_start     : 0
pixdim          : [ 1.  1.  1.  1.  0.  1.  1.  1.]
vox_offset      : 0.0
scl_slope       : nan
scl_inter       : nan
slice_end       : 0
slice_code      : unknown
xyzt_units      : 0
cal_max         : 0.0
cal_min         : 0.0
slice_duration  : 0.0
toffset         : 0.0
glmax           : 2965
glmin           : 0
descrip         : b'                                                                               '
aux_file        : b'                       '
qform_code      : unknown
sform_code      : unknown
quatern_b       : 0.0
quatern_c       : 0.0
quatern_d       : 0.0
qoffset_x       : 0.0
qoffset_y       : 0.0
qoffset_z       : 0.0
srow_x          : [ 0.  0.  0.  0.]
srow_y          : [ 0.  0.  0.  0.]
srow_z          : [ 0.  0.  0.  0.]
intent_name     : b''
magic           : b'n+1'


More information about the Neuroimaging mailing list