[FieldTrip] ft_volumereslice shifts the brain

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Fri Mar 25 10:18:30 CET 2016

Hi Jens,

If not instructed otherwise, ft_volumereslice attempts to realign the ‘box-with-anatomical-data’ in such a way that the origin of the coordinate system (as specified in the .transform of the input image) is in the centre of the volume. In your image it seems that the origin is in the posterior commissure, which does not leave sufficient space toward the nose to fit the whole head. Had your origin been in the anterior commissure instead, 128 1mm voxels towards the front would probably have been sufficient to include the nose. You can specify a bounding box in the cfg to get the origin off-center. Otherwise (and I suspect that this was your intention from the start) you should first realign your input image to a proper AC-origin based coordinate system, and put the origin where it should be according to convention. This can of course be achieved with ft_volumerealign.
With respect to the documentation, could you give a suggestion for a revised chunk of text which is more clear in your view?


On 23 Mar 2016, at 23:52, Jens Klinzing, Universität Tübingen <jens.klinzing at uni-tuebingen.de> wrote:
> Hi everyone,
> I have a problem with ft_volumereslice, applied to Nifti MRIs (haven't tested it on other formats). The function shifts the image to bring the brain in the center, as announced in the documentation.
> However, this is done
> a) in a way that the nose of my MRI is cut off (s. below), which is suboptimal since I register EEG electrodes and fiducials in relation to the MRI and the cut is done close to the nasion, 
> b) in contrast to the documentation it shifts the brain whether or not a coordinate system (.coordsys) is given. I guess this happens during ft_sourceinterpolate which is called inside ft_volumereslice (line 180). The shift that could be done in ft_volumereslice (line 103ff) is not performed if there is no .coordsys, but the shift in the returned MRI is still there.
> Before and After (without an mri.coordsys):
> <image.png>
> Sure I can just increase the dimensions of the MRI, then I get the nose back, but I was wondering if anyone can explain this behavior of ft_volumereslice and whether it is a genuine bug or not.
> Thanks and greetings,
> Jens
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

More information about the fieldtrip mailing list