<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 JT,
<div class=""><br class="">
</div>
<div class="">You’d first need to ensure that ‘mri_realigned’ is correctly realigned. Since the resliced MRI image is upside down, this suggests that the coordinate system information that is used by FieldTrip (i.e. the mri_realigned.coordsys -> it looks like
 ‘ctf’ ) is not compatible with what’s in the data.</div>
<div class=""><br class="">
</div>
<div class="">If you search the documentation for coordinate systems I think there should be plenty of information that will get you on the road.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">JM</div>
<div class=""><br class="">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 30 Mar 2022, at 05:45, JT Galla 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 style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<span style="caret-color: rgb(0, 0, 0);" class="">Hello!</span>
<div class="" style="caret-color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0);">I am trying to reslice my MRI image for the purposes of EEG Source Reconstruction using the following code:</div>
<div class="" style="caret-color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0);">
<pre class="highlight" style="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; color: rgb(33, 37, 41); background-color: rgb(240, 240, 240); font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial;"><code class="" 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;"><span class="n" style="box-sizing: border-box;">cfg</span>          <span class="o" style="box-sizing: border-box; color: rgb(102, 102, 102);">=</span> <span class="p" style="box-sizing: border-box;">[];</span>
<span class="n" style="box-sizing: border-box;">mri_resliced</span> <span class="o" style="box-sizing: border-box; color: rgb(102, 102, 102);">=</span> <span class="n" style="box-sizing: border-box;">ft_volumereslice</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">cfg</span><span class="p" style="box-sizing: border-box;">,</span> <span class="n" style="box-sizing: border-box;">mri_realigned</span><span class="p" style="box-sizing: border-box;">);</span></code></pre>
<div class=""><br class="">
</div>
</div>
<div class="" style="caret-color: rgb(0, 0, 0);">However, when I go to view the output of this command I see that the reslice method has completely removed axial slices and has inverted coronal and sagittal slices. This is, of course, ruining subsequent head
 model generations so any guidance that could be provided on why this might be happening and how to fix it would be greatly appreciated. Attached is a screenshot of what my replaced image looks like.</div>
<div class="" style="caret-color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0);"><span id="cid:DF98F78D-F6AE-4658-AC9E-D5A8944051B6"><Screen Shot 2022-03-29 at 11.38.25 PM.png></span></div>
<div class="" style="caret-color: rgb(0, 0, 0);"><br class="">
<br class="">
</div>
<span style="caret-color: rgb(0, 0, 0);" class="">Thank you for your time!</span><br class="" style="caret-color: rgb(0, 0, 0);">
<br class="" style="caret-color: rgb(0, 0, 0);">
<div class="" style="caret-color: rgb(0, 0, 0);">
<div dir="auto" class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div dir="auto" class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<b class="">JT Galla</b>
<div class="">Duke University c/o ’23</div>
<div class="">Neuroscience Major, Chemistry & Computational Biology Minor</div>
</div>
</div>
</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://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!6VeM6ulnnoPWj9YzzXC2iwz3vUayVv0lqRR_Y5ejucd-ilqk-ByihIVsmRT3y87wRsROZSh9D0p8TICvD4tfGgsU622H5RT-oRNQRA$
<br class="">
</div>
</blockquote>
</div>
<br class="">
</body>
</html>