[FieldTrip] MNE-sample data set on Fieldtrip.

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Sun May 1 18:44:16 CEST 2016


Dear Parham,


> I was hoping to perform a complete source analysis using FieldTrip on the MNE-sample data set.
> The link to the MNE data set link is given below:
>  http://martinos.org/mne/dev/manual/sample_dataset.html#babdhifj

That sounds like a great exercise! I am not aware of anybody having done this already.

> I am terribly confused on how to align the MRI coordinates to MEG.

Yes, coordinate systems are confusing and annoying.

> The MEG system is a neuromag306. The function  hdr=ft_read_header(raw_data_set_filename) reads fiducial marks
> HPI. It is contained in hdr.orig.dig.
> Also shape = ft_read_headshape(raw_data_set_filename) gives a structure
> shape =
> 
>         pos: [143x3 double]
>         fid: [1x1 struct]
>       label: {143x1 cell}
>    coordsys: 'neuromag'
>        unit: 'cm'
>         pnt: [143x3 double]
> 
> where the shape.fid has the nasion, lpa and rpa. I have the following questions:
> 1. It appears to me that the MRI coordinate system is already spm.
>  Axis X :Left to right.
>  Axis Y: Posterior to Anterior.
>  Axis Z: bottom to top.

>From the direction of the axes one cannot strictly conclude the coordinate system. Both the Elekta-based coordinates, and the SPM-based coordinates have their X/Y/Z axes pointing into R(ight)/A(nterior)/S(uperior). They differ in their origin.
If however the shape.fid.pnt/pos (I am not sure whether the positions are represented in the pnt or pos field nowadays) for the ‘nas’ fiducial is [0 somevalue 0] (or at least the x and z coordinates are close to 0), you can be sure that this is defined in ‘MEG’ coordinates.

> 2. How can I realign the MRI to MEG?
>              a) Interactively: ft_volumerealign
>                      or
>              b) Should I use the information in shape to have it done automatically?
> I think, it would be unwise to define my own lpa, rpa and nasion.

Indeed, it adds error when trying to ‘click’ the lpa/rpa/nasion once more, because they are bound to end up at a slightly different location. Since you seem to have a digitized headshape, you could try and align this headshape to the surface reconstruction of the anatomical MRI (which I assume you have), using ft_volumerealign and the ‘headshape’ method. I would typically do the alignment manually (rather than relying on the automatic icp-based algorithm), particularly if you have only few points in the headshape. 

> 3. What is the relationship between HPI coil coordinates and the lpa, rpa and nasion coordinates? Are there scripts that relate the two.

I don’t know. Sometimes there’s a one-to-one match between specific coils and the three fiducial locations, sometimes there isn’t :o(. Depends on the specifics of the data.

> 4. Has anyone ever created a script to use Fieldtrip to analyze this specific data set?

I am not aware of this, but I think it would be valuable to have this documented somewhere (and available to the wider community).

> 5. The MEG sensors are in a different coordinate frame "1" as opposed to head coordinates (Electrodes). Do I have to make sure that these coordinates are transformed to head coordinates prior to ft_prepare_leadfield calculations? or is this done automatically by fieldtrip?

I am not so familiar with the meaning of the different coordinate frames employed by the neuromag software (at least not with respect to how the numbers map onto specific conventions). Yet, in the end of the day you need to ensure that all the data-objects that represent geometrical information (sensors, volume conduction model, source model)  are expressed in the same coordinate system. Fieldtrip will not automagically convert anything for you.

> I just have the feeling that it would be unwise to do this interactively because of the existence of the fiducial markers.

Yes, but if there’s no alternative, there’s no way around this. Yet, it could be that the different coordinate transformations are already represented in the data (and that the low-level reading routines know how to deal with this: perhaps you can specify a certain input argument that returns the coordinates in a specified coordinate system)

So, in sum, perhaps not too helpful, but it may provide some clues to the solution. Also, perhaps some elekta people may want to chime in here. It would be great if you could get this going, and perhaps we could ask you to collaborate on providing some documentation about your endeavours on the fieldtrip wiki in due time.

Best wishes,
Jan-Mathijs



> Many thanks if you are able to help me.
> 
> -- 
> best regards
> Parham Hashemzadeh
> Research Associate
> Department of Applied Mathematics and Theoretical Physics
> University of Cambridge, UK.
> email: hashemzadeh at damtp.cam.ac.uk
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip





More information about the fieldtrip mailing list