[FieldTrip] Volume Reslice Question

JT Galla jeffrey.galla at duke.edu
Mon Apr 4 23:25:38 CEST 2022


Thank you so much for the response. I attempted the realignment using all of the other coordinate systems, and the only one that did not produce the same problem during my reslice was the ACPC coordinate system. However, even though I did not lose any slices during the reslice, I am now having a weird problem occur when I generate my source model. It appears that the top of the head is “wrapping” to the bottom and I am not quite sure why that is happening. I am generating the source model using the FEM and the Simbio toolbox using this tutorial: https://www.fieldtriptoolbox.org/workshop/ohbm2018/forward/
The code I use to generate the head model and the source model is as follows:

cfg               = [];
cfg.method        = 'simbio';
cfg.conductivity  = [0.43 0.01 1.79 0.33 14];
cfg.tissuelabel   = {'scalp', 'skull', 'csf', 'gray','white'};
headmodel_fem_eeg = ft_prepare_headmodel(cfg, mesh_fem);

cfg                 = [];
cfg.resolution = 5; %in mm
cfg.headmodel       = headmodel_fem_eeg;
cfg.inwardshift     = 1; %shifts dipoles away from surfaces
sourcemodel         = ft_prepare_sourcemodel(cfg, headmodel_fem_eeg);

For troubleshooting, here are some images that might help.

Image of my resliced MRI using the ACPC coordinate system:


Image of my head model, which appears fine:


Image of the incorrect source model, that is “wrapping”:


Any suggestions you might have would be greatly appreciated. One potential problem might be that, unfortunately, due to a problem with the MRI acquisition set-up, all of of MRI images have a few mm missing from the top of the subject’s head, Could this be what is causing the problem?

JT Galla

On Mar 30, 2022, at 3:12 AM, Schoffelen, J.M. (Jan Mathijs) via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hi JT,

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.

If you search the documentation for coordinate systems I think there should be plenty of information that will get you on the road.

Best wishes,

On 30 Mar 2022, at 05:45, JT Galla via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:


I am trying to reslice my MRI image for the purposes of EEG Source Reconstruction using the following code:

cfg          = [];
mri_resliced = ft_volumereslice(cfg, mri_realigned);

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.

<Screen Shot 2022-03-29 at 11.38.25 PM.png>

Thank you for your time!

JT Galla
Duke University c/o ’23
Neuroscience Major, Chemistry & Computational Biology Minor
fieldtrip mailing list

fieldtrip mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220404/b1c444d1/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2022-04-04 at 1.29.38 PM.png
Type: image/png
Size: 66801 bytes
Desc: Screen Shot 2022-04-04 at 1.29.38 PM.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220404/b1c444d1/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2022-04-04 at 1.29.11 PM.png
Type: image/png
Size: 32254 bytes
Desc: Screen Shot 2022-04-04 at 1.29.11 PM.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220404/b1c444d1/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2022-04-04 at 2.13.38 PM.png
Type: image/png
Size: 111485 bytes
Desc: Screen Shot 2022-04-04 at 2.13.38 PM.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220404/b1c444d1/attachment-0005.png>

More information about the fieldtrip mailing list