<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 Sara,
<div class=""><br class="">
</div>
<div class="">It looks as if the example/tutorial code is out-of-sync with the fieldtrip code (assuming that you are working with a recent version).</div>
<div class="">The error itself may be solved if you register the MRI image to a supported coordinate system first (i.e. before reslicing etc), using ft_volumerealign with cfg.method = ‘interactive’.</div>
<div class=""><br class="">
</div>
<div class="">Good luck,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 11 Apr 2024, at 17:42, Sara Cinelli via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hello,
<div class="">I would like to explain my problem. I am referring to the tutorial presented in this page: <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Fworkshop%2Fnatmeg2014%2Fdipolefitting%2F%23compare-the-eeg-and-meg-dipole-fits&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C047378e1b34c4c158e3b08dc5abd5303%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638485016381261688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=qfO01iA1QqLUCQw2YMp1kr5IEClcgD0N5RYv39PrqEU%3D&reserved=0" originalsrc="https://www.fieldtriptoolbox.org/workshop/natmeg2014/dipolefitting/#compare-the-eeg-and-meg-dipole-fits" shash="ebZvXuwg32WBj8aKULA6dtuURFYNvb9vbUxpaEEq0VWVt3EL3plHlg6y82JHTS5c3LYqwe966wcnsEhqJqnK6RKVDtmtQ7b5t4hirxkE1bVOOWprUQJEidjfg4Qae+B1vliywJr2Bf9AoqftW+zhGVndRhWpwyRTzgZChP3IcRk=" originalsrc="https://www.fieldtriptoolbox.org/workshop/natmeg2014/dipolefitting/#compare-the-eeg-and-meg-dipole-fits" shash="jfEHqHeAjU9k0+1AQ/GaTybhTLatUAevLKMyyT1+5XkSqKFoyRmaNiKtockEX6Z7P+JV6OizkcbsBZOwRbQOrKJqJMvnbdoN5GMkUNyQCYcsze92eh/Oj/aWWLrLyqlfhfSoqqzRNT34zlnqtDwNVmGdEUHW4kfUrvvpKvTfxSg=" class="">https://www.fieldtriptoolbox.org/workshop/natmeg2014/dipolefitting/#compare-the-eeg-and-meg-dipole-fits</a></div>
<div class="">The issue is that, copying the code in this page, there is an error that I don't understand:</div>
<div class=""><br class="">
</div>
<div class="">
<h3 id="gmail-construct-the-meg-volume-conduction-model" style="box-sizing:border-box;margin-top:0px;margin-bottom:0.5rem;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-weight:500;line-height:1.2;color:rgb(33,37,41);font-size:1rem" class="">
Construct the MEG volume conduction model<a class="gmail-anchorjs-link" aria-label="Anchor" href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Fworkshop%2Fnatmeg2014%2Fdipolefitting%2F%23construct-the-meg-volume-conduction-model&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C047378e1b34c4c158e3b08dc5abd5303%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638485016381261688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=nKhusn27s51IEpHLoyojjOXBX%2FuWO6N3D6hjZ0MSgjM%3D&reserved=0" originalsrc="https://www.fieldtriptoolbox.org/workshop/natmeg2014/dipolefitting/#construct-the-meg-volume-conduction-model" shash="slb7Pe7SEkujwV/RPswomZG4fZ2b6uZ/LBC4I7ZjcCACfh7AWcR1tOUp/vtdxre7aCZKB6i/Mn/zLpC/sK9qWA5aW84Pw2HRU7xTdpjynY/lSqHnKDoSxelprOVzQuNyC0m3L5E3akG9VLhcqQsUr5eG9OuEV7Y2p7klcrGBh50=" originalsrc="https://www.fieldtriptoolbox.org/workshop/natmeg2014/dipolefitting/#construct-the-meg-volume-conduction-model" shash="QCKAUiCGPRQB8OvSfcSL8wUhzrR9pw4rfaBUtyYbRAOHaboWf8KEW+S5+abvii+aAFfAeavO8/DjKC4fa7QXnMn4Nb89PX3u/s8pyZDOuBGZLbNd/cPsqxEsEbvs/bHLpTJU2SrjmZwpVDlIkmOC0dag4ujYEqLSU0BXabPUtHg=" style="box-sizing:border-box;color:rgb(176,37,44);text-decoration-line:none;background-color:transparent;opacity:0;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:1em;line-height:1;font-family:anchorjs-icons;padding-left:0.375em"></a></h3>
<p style="box-sizing:border-box;margin-top:0px;margin-bottom:1rem;text-align:justify;color:rgb(33,37,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px" class="">
Now that we have the anatomical MRI coregistered and resliced in to <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FIsotropy&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C047378e1b34c4c158e3b08dc5abd5303%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638485016381261688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=TOx8IBtLmLgM0gdRi5DvhEuC8mv3f56AdZkmCNhy4aU%3D&reserved=0" originalsrc="https://en.wikipedia.org/wiki/Isotropy" shash="b/5bRk9q44no56Olq9uYKjPF9C0YQWGfV8BZUxXKQb9RdDBsHQcdhitUT/NVmpwUzzQUMdDPMiJE9mhrXwr8g18aD8AiW15T9iYKEkGROdKfrSJKrjJnAALRIqzWT1OOPuhtRcEVQaZUQ8PxP2P53ej0Gq8y6/if1NEQXrm/lGc=" originalsrc="https://en.wikipedia.org/wiki/Isotropy" shash="KQRNTsLCkyWy/+F5CySAobSLB+ObZH7z5seatd/snEY+AO6Zi5Li8dvC+iV4oGGAynx2rlm/8EdiJnZFrrg2TP7mCkY0R/o40JkAXsxxn/JLf4kDi1zDBrXanJIMtNqhlEAf1mD1deePGS1OdAgKXDAOa+bEbnhKo+v3Pm/s49U=" style="box-sizing:border-box;color:rgb(176,37,44);text-decoration-line:none;background-color:transparent" class="">isotropic</a> voxels,
we proceed and segment the brain, skull and scalp tissue.</p>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><code style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:inherit;color:inherit;word-break:normal" class=""><span class="gmail-n" style="box-sizing:border-box">cfg</span> <span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span class="gmail-p" style="box-sizing:border-box">[];</span>
<span class="gmail-n" style="box-sizing:border-box">cfg</span><span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">.</span><span class="gmail-n" style="box-sizing:border-box">output</span> <span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span class="gmail-p" style="box-sizing:border-box">{</span><span class="gmail-s1" style="box-sizing:border-box;color:rgb(64,112,160)">'brain'</span><span class="gmail-p" style="box-sizing:border-box">,</span> <span class="gmail-s1" style="box-sizing:border-box;color:rgb(64,112,160)">'skull'</span><span class="gmail-p" style="box-sizing:border-box">,</span> <span class="gmail-s1" style="box-sizing:border-box;color:rgb(64,112,160)">'scalp'</span><span class="gmail-p" style="box-sizing:border-box">};</span>
<span class="gmail-n" style="box-sizing:border-box">mri_segmented</span> <span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span class="gmail-n" style="box-sizing:border-box">ft_volumesegment</span><span class="gmail-p" style="box-sizing:border-box">(</span><span class="gmail-n" style="box-sizing:border-box">cfg</span><span class="gmail-p" style="box-sizing:border-box">,</span> <span class="gmail-n" style="box-sizing:border-box">mri_resliced</span><span class="gmail-p" style="box-sizing:border-box">);</span></code></pre>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><code style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:inherit;color:inherit;word-break:normal" class=""><span class="gmail-p" style="box-sizing:border-box"><br class=""></span></code></pre>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><code style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:inherit;color:inherit;word-break:normal" class=""><span class="gmail-p" style="box-sizing:border-box">When I run the function ft_volumesegment these errors appears:</span></code></pre>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">Error using ft_affinecoordinates<br class="">converting from scanras to acpc is not supported<br class=""><br class="">Error in ft_convert_coordsys (line 169)<br class=""> initial = ft_affinecoordinates(object.coordsys, target);<br class=""><br class="">Error in ft_volumesegment (line 301)<br class=""> mri = ft_convert_coordsys(mri, 'acpc');<br class=""></pre>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><br class=""></pre>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><br class=""></pre>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">Hope you can help me understanding this issue.</pre>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><br class=""></pre>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">kind regards,</pre>
<pre class="gmail-highlight" style="color:rgb(33,37,41);box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">Sara</pre>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C047378e1b34c4c158e3b08dc5abd5303%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638485016381261688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=96znt3Rz9wjDZ4jn3QMbcEn8%2B9a6ZxmxhGZrIynvPJI%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="zmLbS/DuUa13hLFBLZsYwf4FIcX4S5Y760cR7s+4mq9BqZwMSs61+Ib/byaOgS7xzJ848WCH4N0HPQmCvmYyO9wlENljPoVNu0q5UNh0U0wDJBRQ5w9U4j0b+xiNdruyYVmNhA3FfmP/YYffLFQKFECujx79m/plgsMWGiXPQXE=" 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>