[FieldTrip] a problem with creating a ROI mask

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Tue Mar 30 12:09:33 CEST 2021


Hi Shen-Mou,

I think that you need to ensure that:

-the metrical units in both atlas and sourcemodel are the same, consider calling ft_convert_units(sourcemodel, ‘mm’); before proceeding.
-the coordinate systems of both objects are the same.

I see that, upon loading the atlas, that the coordsys field is ‘mni’. Sourcemodel does not have a coordsys field, which explains why you need to change the anatomical labels (from unknown to something more meaningful). I expect that ‘mni’ is not a coordsys that is outputted after this step (most likely it will be ‘acpc’). This is subsequently detected as a mismatch, and may have contributed to the error you got.

What happens if you explicitly state sourcemodel.coordsys = ‘mni’ (in addition to the metric units conversion)?

Note, ft_volumelookup is a very ‘old’ function (and rarely used by people that are close to the core developers), thus it might not have grown along with the rest of the codebase in terms of data bookkeeping and overall code consistency. If you see room for improvement, we look forward to suggested code changes as Pull Requests in the FieldTrip github repository!

Best wishes,
Jan-mathijs



On 29 Mar 2021, at 12:14, Shen-Mou Hsu <explena at gmail.com<mailto:explena at gmail.com>> wrote:

Dear FieldTrip community,

I try to follow this instruction (https://www.fieldtriptoolbox.org/tutorial/salzburg/#perform-sourcanalysis) to create a ROI mask as follows:

atlas = ft_read_atlas(fullfile(ftpath, 'template/atlas/aal/ROI_MNI_V4.nii'));
sourcemodel = load(fullfile(ftpath, 'template/sourcemodel/standard_sourcemodel3d10mm'));

cfg = [];
cfg.atlas = atlas;
cfg.roi = atlas.tissuelabel(43);
mask = ft_volumelookup(cfg, sourcemodel);

However, after executing these lines, an instruction popped out and asked "Do you want to change the anatomical labels for the axes [Y, n]?". After specifying  the MNI system, there was still an error message "Error using ft_volumelookup (line 248) the mismatch between the coordinate system in the atlas and the coordinate system in the data cannot be resolved"

Any help will be much appreciated!
Shen-Mou Hsu


_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210330/9974b976/attachment.htm>


More information about the fieldtrip mailing list