<div dir="ltr">Dear Jan-mathijs,<br><div><br></div><div>1. Many thanks for your insights. Adding "sourcemodel.coordsys = ‘mni’" does work now!</div><div><br></div><div>2. No problem! We will look into the code to see if there is something that we may contribute.</div><div><br></div><div>Best,</div><div>Shen-Mou</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 30, 2021 at 6:34 PM Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



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

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>