<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Shen-Mou,
<div class=""><br class="">
</div>
<div class="">I think that you need to ensure that:</div>
<div class=""><br class="">
</div>
<div class="">-the metrical units in both atlas and sourcemodel are the same, consider calling ft_convert_units(sourcemodel, ‘mm’); before proceeding.</div>
<div class="">-the coordinate systems of both objects are the same.</div>
<div class=""><br class="">
</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">What happens if you explicitly state sourcemodel.coordsys = ‘mni’ (in addition to the metric units conversion)?</div>
<div class=""><br class="">
</div>
<div class="">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!</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 29 Mar 2021, at 12:14, Shen-Mou Hsu <<a href="mailto:explena@gmail.com" class="">explena@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Dear FieldTrip community,
<div class=""><br class="">
</div>
<div class="">I try to follow this instruction (<a href="https://www.fieldtriptoolbox.org/tutorial/salzburg/#perform-sourcanalysis" class="">https://www.fieldtriptoolbox.org/tutorial/salzburg/#perform-sourcanalysis</a>) to create a ROI mask as follows:
<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">atlas = ft_read_atlas(fullfile(ftpath, 'template/atlas/aal/ROI_MNI_V4.nii'));</div>
<div class="">sourcemodel = load(fullfile(ftpath, 'template/sourcemodel/standard_sourcemodel3d10mm'));<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">cfg = [];<br class="">
cfg.atlas = atlas;<br class="">
cfg.roi = atlas.tissuelabel(43);<br class="">
mask = ft_volumelookup(cfg, sourcemodel);<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">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"</div>
<div class=""><br class="">
</div>
<div class="">Any help will be much appreciated!</div>
<div class="">Shen-Mou Hsu</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>