[FieldTrip] change orientation of MRI or source plot

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Mon Sep 28 17:29:23 CEST 2015


Hi Jia,

RAS is just shorthand for a coordinate system that uses a convention where the X,Y and Z axes of the coordinate system (relative to a meaningful object, in our case: the brain) is pointing to the right, anterior and superior respectively. In order to define the anatomical image in a RAS coordinate system, you should call ft_volumerealign with one of the two following inputs:

case 1):

cfg = [];
cfg.method = ‘interactive’;
cfg.coordsys = ‘neuromag’;
mri = ft_volumerealign(cfg, mri);

then you can click around in the volume, and define the lpa,rpa and nasion fiducials (with the l,r, and n keys)

case 2):

cfg = [];
cfg.method = ‘interactive’;
mri = ft_volumerealign(cfg, mri);

if you now click around, you can define the anterior commissure, the posterior commissure, and a point along the positive z-axis, and a point along the positive x-axis (with, respectively, the keys a, p, z and r).

Either way, you’ll result in an anatomical image that has an RAS-coordinate system (yet both with different origins, as defined and described in the documentation that Tzvetan pointed you to), and I assume that you are after the ‘SPM’-based coordinate system, which uses the anatomical landmarks (anterior and posterior commissures to define the origin and the direction of the y-axis).

Next, you can call ft_volumereslice to align the cardinal voxel axes to the axes of your RAS coordinate system.

As an explanatory note, CTF uses a so-called ALS coordinate system, wher the X-axis points to anterior, the Y axis to the left, and the Z-axis to the top of the head. On the screen, after a ft_volumereslice, this gives a picture with a 90 degree rotation around the z-axis, because the physical interpretation of the x and y axes are different (‘RA' versus ‘AL’).

I realize that there is also a case 3 that you can do, which does not require an interactive step:

case 3):

cfg = [];
cfg.nonlinear = ‘no’;
mrin = ft_volumenormalise(cfg, mri);
mrir = ft_volumereslice([],mrin);

If you call ft_volumenormalise with cfg.nonlinear = ‘no’, the affine transformation is estimated that goes from voxel space to a RAS coordinate system with the origin in the anterior commissure (approximately). This should be more or less equivalent to case 2) above.

Best,
Jan-Mathijs



On Sep 28, 2015, at 4:57 PM, Wu, Jia <jia.wu at yale.edu<mailto:jia.wu at yale.edu>> wrote:

Jan-Mathijs,
Thank you very much for the note. I'm not sure how to impose a RAS coordinate system. I tried the following code and got an error. If you have  a quick moment do you mind pointing me to the right direction? Thank you so much!
-jia

Input:
cfg=[];
cfg.method='spm';
target = 'template/T1.nii';
ft_volumerealign(cfg,mri,target);

Output:
the input is volume data with dimensions [256 256 256]
Warning: defaulting to  coordinate system
> In ft_volumerealign (line 238)
Input volume has coordinate system 'ctf'
Error using ft_convert_units (line 142)
cannot determine geometrical units

Error in ft_determine_coordsys (line 55)
data  = ft_convert_units(data);

Error in ft_convert_coordsys (line 59)
  obj = ft_determine_coordsys(obj, 'interactive', 'yes');

Error in ft_volumerealign (line 827)
      target = ft_convert_coordsys(target);


________________________________
From: fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl> [fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>] on behalf of Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>]
Sent: Monday, September 28, 2015 3:20 AM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] change orientation of MRI or source plot

If you want the anatomical image to be displayed exactly the same as the template image you need to do the following 2 things:

-call ft_volumerealign, and impose a RAS coordinate system.
-call ft_volumereslice, to align the i/j/k voxel axes with the x/y/z coordinate axes (which in the previous step were constructed to be RAS).

Best,
Jan-Mathijs



On Sep 25, 2015, at 4:46 PM, Wu, Jia <jia.wu at yale.edu<mailto:jia.wu at yale.edu>> wrote:

Hi,

I have a question about the orientation of MRI and source plot. I made the some comparison plot as below.
http://imgur.com/a/FoMAH<https://urldefense.proofpoint.com/v2/url?u=http-3A__imgur.com_a_FoMAH&d=AwMFAw&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=9ehCplyXHP0-m9ayYv1FOg&m=zO_2mE8ZYtGGWpMORuQp1nczgv9nyCvAMO2hB87pvOE&s=_D8VLWPcGCa0JhIGjF07gXmcf7jXMhXdzO2ZcpuMrwM&e=>

The top image is a plot of the T1template, which follows the convention that the top left is coronal, top right is sagittal and the bottom left is axial.

The bottom image is from Subject01.mri downloaded from the fieldtrip server and applied volumeslice. (Without using volumeslice the orientation is not correct either). The coronal and sagittal views were switched.

I'm wondering whether there is a way that I can change the orientation of the plot.

best,
-jia
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.science.ru.nl_mailman_listinfo_fieldtrip&d=AwMFAw&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=9ehCplyXHP0-m9ayYv1FOg&m=zO_2mE8ZYtGGWpMORuQp1nczgv9nyCvAMO2hB87pvOE&s=ax2Y-_AsQyRp9juX7DFVHwFlLb95AQ5w13xAWfKpV8Q&e=>

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150928/717fe2d1/attachment-0001.html>


More information about the fieldtrip mailing list