[FieldTrip] Axes mismatch switching from Fieldtrip to Freesurfer

Paolo Belardinelli paolo.belardinelli at gmail.com
Thu Mar 5 10:48:44 CET 2020


Dear Jan-Mathijs,

in the meantime, I discovering the following:
1. The mismatch was due to the absence of my declaration of
cfg.coordsys before ft_volumerealign. Despite the nifti file being in
RAS, ft_volumerealign imposed an ALS coordinate system to the image.
This was conflicting with some other information coming from the nifti
file that freesurfer uses.
     The previous call to ft_determine_coordinate_system did not
assign the mri.coordsys field.
2. After correctly loading the image (Fig. Before) I am now declaring
cfg.coordsys = 'neuromag' before calling ft_volumerealign. This makes
the axes right but imposes a rotation of the head towards the inferior
side of the figure of about 30° (Fig. After: I guess the horizontal
plane is forced to be constituted by the plane which pass through LPA,
RPA and Nasion).
Is there a simple fix to this?

Best wishes,

Paolo

On Thu, Mar 5, 2020 at 8:15 AM Schoffelen, J.M. (Jan Mathijs)
<jan.schoffelen at donders.ru.nl> wrote:
>
> Hi Paolo,
>
> I would check:
>
> 1) whether the coordinate system in the aligned MR images is correct. Don’t use freeview, but do this with ft_determine_coordsys, and check whether the x/y/z axes are pointing into the expected direction
> 2) what information freeview uses to ‘guess’ the a/p etc. directions. If this is anything else than the primary transformation matrix in the file (e.g. if it uses some magic variable such as slice order or so) then this might cause your reported discrepancy.
> 3) (again) check whether the first step into the freesurfer pipeline script, i.e. the call to mri_convert is yielding the expected results. It is well known that freesurfer is very picky about the FOV and the orientation of the voxel space.
>
> Best wishes,
> Jan-Mathijs
>
>
> > On 4 Mar 2020, at 15:06, Paolo Belardinelli <paolo.belardinelli at gmail.com> wrote:
> >
> > Dear Fieldtrippers,
> >
> > still about the source pipeline using both Fieldtrip and Freesurfer:
> > - I load my nifti file with ft_readmri, without changing the axes
> > - I reslice the voxels
> > - I define the fiducials for sensor and acpc space definition.
> > - I save in mgz format
> > Then, if I visualize the mgz files with freeview the axes directions
> > appear wrong  (L-R shown in the P-A window and so on)
> > If I visualize the original .nii file, the projections appear correct.
> > The mismatch appears nor to depend on the file format (I tried to
> > save from FT in both mgz and nifti) neither on LPA and RPA
> > definition (I tried to swap the 2 points).
> > This has consequences on FS white matter segmentation: FS segments
> > correctly the .nii file but it fails when using the mgz file I
> > generated with FT.
> > Did someone experience the same issue?
> >
> > Best,
> >
> > Paolo
> >
> >
> > --
> > --
> > Paolo Belardinelli, PhD
> > Neurology Department
> > University Hospital Tuebingen
> > Eberhard Karls University Tuebingen
> > Hoppe-Seyler Str. 3
> > D-72076 Tuebingen
> > Tel: +49 7071 / 29 80478
> > _______________________________________________
> > fieldtrip mailing list
> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > https://doi.org/10.1371/journal.pcbi.1002202
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202



--
--
Paolo Belardinelli, PhD
Neurology Department
University Hospital Tuebingen
Eberhard Karls University Tuebingen
Hoppe-Seyler Str. 3
D-72076 Tuebingen
Tel: +49 7071 / 29 80478
-------------- next part --------------
A non-text attachment was scrubbed...
Name: After.jpg
Type: image/jpeg
Size: 264346 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200305/26e40967/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Before.jpg
Type: image/jpeg
Size: 301929 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200305/26e40967/attachment-0003.jpg>


More information about the fieldtrip mailing list