volumewrite, volumenormalize and mri orientations

Marie Smith marie at PSY.GLA.AC.UK
Fri Sep 14 12:35:13 CEST 2007


Dear Jan-Mathijs,

Thanks for your response. The reason for trying to export the data
somewhere else is two-fold. Firstly as you mention to aid
localisation to brain regions and secondly as I want to normalise the
results of several subjects to a template brain.

I've tried both 'analyze' and 'spm' filetype options with quite
varying results (see attached pdf, method spm is first). But as you
can see neither matches the default spm orientation found in T1.mnc
(third).

I also had problems using volumenormalise inside fieldtrip and got
some very strange results again I think due to a mis-match in
orientation between my mri + functional and the T1 template. As I
said yesterday, when I use sourceplot the 3 slices seem to match the
fieldtrip norm (as depicted in the beamformer tutorial), but checking
the .anatomy field of my sourinterpolated data has x running from
right to left, y from front to back and z from top to bottom which
does not match the ctf system co-ordinates. I am not doing anything
to the mri file except loading it in during sourceinterpolate and I
am pretty sure it was created correctly in MRIViewer.

If you have any further suggestions it would be great,

Thanks,

Marie

P.s. Implementing the brain region matching into sourceplot would be
really handy, i tried it out with an older version of the soureplot
code but it failed in reading the afni TTaltas file.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Various_Vol_write.pdf
Type: application/pdf
Size: 97396 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20070914/b2d396ee/attachment-0001.pdf>
-------------- next part --------------

On 13 Sep 2007, at 21:27, Jan Mathijs Schoffelen wrote:

> Dear Marie,
>
> Handling of volume-data is a tricky business, and in particular when
> different coordinate systems are used. As far as I can see, I'd
> advice you
> to use the following configuration, although I am not used to using
> the
> volumewrite function (because who would want to visualize the data
> otherwise
> than using sourceplot?).
> cfg.coordinates = 'ctf' (true?): this means that the x-axis runs from
> back-to-front, the y-axis from right-to-left, and the z-axis from
> bottom-to-top.
> On the other hand, an 'spm' coordinate system has it x-axis running
> from
> left to right, and the y-axis from back-to-front. This means that
> at least
> the first two dimensions of the data-matrix should be swapped, in
> combination with a subsequent affine-transformation (I suspect some
> info
> about transformation-matrices in on the fieldtrip website).
> This is done when you specify cfg.filetype = 'analyze' instead of
> 'spm'
> (relevant code is on the lines beyond line 282 in volumewrite.m.
> Why this
> swapping is not applied when specifying cfg.filetype='spm' is a
> mystery to
> m, but I guess there's a good reason for it.
> Summarizing: cfg.coordinates = 'ctf', and cfg.filetype = 'analyze'
> might
> help. On the other hand you could stick to sourceplot, which I
> guess is
> lacking some functionality, and which is the reason for you to
> convert it
> back to analyze (does it by any chance has to do with matching
> voxels with
> brain regions ;-)?). Let's implement this soon then.
>
> Yours,
>
> Jan-Mathijs
>
> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]
> On Behalf
> Of Marie Smith
> Sent: Thursday, September 13, 2007 7:23 PM
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] volumewrite
>
> Hi,
>
> I am trying to output the results of sourceinterpolate to analyze
> format to read in afni / spm2. The volumewrite function does seem to
> do this but the orientation of the output mri is not correct when
> viewed in spm2 / afni (coronal is axial and rotated 90degrees,
> sagittal is coronal also rotated and axial is sagittal also rotated).
> I have checked and it seems to display correctly in sourceplot (in
> that it matches the images shown in the tutorial documentation for
> beamforming).
>
> I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in
> volumewrite and leaving the rest to the defaults.
> Could there be an orientation error coming in from somewhere and how
> can I fix it ?
>
> Also on a related point, i also tried cfg.filetype = 'analyze' and
> got quite a different output when viewed in spm. The slices seemed to
> have been rotated in some way in addition to errors in the
> orientation.
>
> Any advice would be appreciated,
>
> Marie
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users
> of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas
> for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/fcdonders/fieldtrip.
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users
> of the FieldTrip  toolbox, to share experiences and to discuss new
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/
> archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.


More information about the fieldtrip mailing list