[FieldTrip] question about coregistration

Joram van Driel joramvandriel at gmail.com
Wed Nov 6 10:06:39 CET 2013


Hi Nicola,

I also did coregistration in MRI-lab using isotrak data.
Importing the fif files in fieldtrip worked fine, I don’t think you have to apply ft_volumerealign again. I suspect ft_volumereslice is a crucial ingredient.
This worked for me:

    mri = ft_read_mri(<mri.fif>);            %%% read the MRI; the fif file is in mm but FT changes it into meters    
    mri = ft_convert_units(mri,'mm');        %%% make it mm as it originally was
    mri = ft_volumereslice([], mri);         %%% after this function the ficual points in the MEG header match the coordinates in the MRI

Then you should indeed check this with ft_sourceplot, where in the cfg you can fill in fiducial points to check if they make sense, e.g.:

    cfg = [];
    cfg.location = [0 90.5 0];          %%% fill in a fiducial point from the current subject by hand, to check if coregistration went correctly
    cfg.locationcoordinates = 'head';
    
    ft_sourceplot(cfg,mri);

Hope this helps.
Best,
Joram

On 05 Nov 2013, at 09:43, jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl> wrote:

> Dear Nicola,
> 
> I am forwarding your question to the list, "ter lering ende vermaak":
> 
> Begin forwarded message:
> 
>> From: Nicola Molinaro <nicolaml at gmail.com>
>> Date: November 4, 2013 2:16:20 PM GMT+01:00
>> To: jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl>
>> Subject: mm -> voxels ??
>> 
>> Hi Jan,
>> I am trying to align the T1 images with isotrak data using MRIlab and then import the coregistrated image to fieldtrip. Comparing the headshape points with the volume, we can see that Fieldtrip is not taking into account the coregistration. Thus, we are trying to do the corregistration applying the ft_volumerealign function with the method='fiducial' in Fieldtrip.  I have the information of the landmarks' position obtained with MRIlab in 'mm' and the function ft_volumerealign need them in voxel index. How can you convert that?
>> I don´t know if you ever used MRIlab to obtain this information or another software (MNE?).
>> 
>> Thanks
>> 
>> Nicola
> 
> 
> Indeed I have never used MRIlab for coregistration purposes, so I may not be of much help here. However, I suspect that the coregistration procedure in MRIlab allows you to export your MRI after coregistration, thus creating an file with an anatomical image in register with what you want to achieve. If this is the case, then I don't think that you need FieldTrip to coregister again. I am therefore a bit confused with respect to your remark that 'FieldTrip is not taking into account the coregistration'. If you read in an MRI into FieldTrip, the resulting MRI-structure will contain a transform field, that provides the mapping from voxel space into a more meaningful coordinate system. FieldTrip will not 'guess' the nature of this coordinate system: it just takes the values as they are in the file. Once you have read in your MRI, you can use the ft_sourceplot function for visualization. With cfg.method = 'ortho', the figure will also display the coordinates that you click on (both in voxel indices and in real world coordinates). Now, do you mean by 'FieldTrip does not take into account the coregistration' that these real world coordinates are not as expected?
> To answer your question regarding the conversion of landmark positions in 'mm' back into voxel indices: this requires information from the mri.transform matrix, but this implies that the mri is already in register, so there would be no need anymore to call ft_volumerealign.
> Either way, you could also do the coregistration entirely in FieldTrip. This requires a two-step approach, calling ft_volumerealign twice (starting from the raw DICOM files, i.e. prior to having used MRIlab). In the first step you will use cfg.interactive = 'yes' and identify the fiducials that define your corodinate system. Assuming that you are working with your MEG data acquired at BCBL, you should also specify cfg.coordsys = 'neuromag'). The output to this funcion call is an MRI structure that is approximately in register with the MEG-device. In the next step you can refine this coregistration by calling ft_volumerealign (with the approximately registered MRI in the input, and) with cfg.method = 'headshape', and cfg.headshape = 'XXX.pos' (the filename of your polhemus file). This should result (providing that the isotrak data can be read ;-) ) in an interactive figure, that allows you to further align the MRI with the polhemus point cloud that describes the headshape. Once you are happy enough, the figure can be closed, and an iterative-closest-point algorithm is applied for further refinement of the coregistration. 
> I hope this helps, and might inspire you to try out the coregistration in FieldTrip (and give feedback to us about it, in order to make the procedure more robust).
> 
> Best wishes,
> 
> 
> Jan-Mathijs Schoffelen, MD PhD 
> 
> Donders Institute for Brain, Cognition and Behaviour, 
> Centre for Cognitive Neuroimaging,
> Radboud University Nijmegen, The Netherlands
> 
> Max Planck Institute for Psycholinguistics,
> Nijmegen, The Netherlands
> 
> J.Schoffelen at donders.ru.nl
> Telephone: +31-24-3614793
> 
> http://www.hettaligebrein.nl
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131106/72d11158/attachment.html>


More information about the fieldtrip mailing list