[FieldTrip] ft_volumerealign

Markus Butz Markus.Butz at uni-duesseldorf.de
Wed Oct 10 11:04:48 CEST 2012


Dear Lilla 
 
thank you very much for your response. Swapping lpa and rpa does the trick.
Now my brain looks much better. ;-)

The extra zpoint does not really help and I had it already implemented in my initial code.
 
All the best 
Markus 
 
 
 
Am 09.10.12, schrieb Lilla.Magyari at mpi.nl:

> 
> hi Markus,
> 
> When you use the ft_volumerealign function it doesn't necessarily will
> show the right side of the brain on the right side of the image.
> Orientation of the image depends on the coordinate system of the mri you
> read in.
> 
>  I tried also align the template mri to the fiducials, and I got the same
> problem as you (z+ going to inferior in the aligned volume), but when I
> switched the lpa with the rpa the orientation was fine. So, my conclusion
> is that the right side shows up on the left of the image when you use
> ft_volumerealign. Therefore, you have to mark the lpa on the right side
> of the image and the rpa on the left side of the image. But there is also
> another option implemented exactly because of this left/right flipping:
> You can determine also a "z-point" (by pressing z in the image) that can
> be anywhere at the top of the head. Then, the function will give you the
> right alignment even if  you did not determine the lpa and rpa on the
> right side of the brain.
> For this, you just have to do this:
> cfg.fiducial.zpoint  = [i j k], position of zpoint
> when you also determine  the positions for the nasion, lpa and rpa.
> 
> And one more remark: I do not know if you have realized this yourself, and
> I have just misunderstood your email: When you call ft_volumerealign in
> interactive mode like this:
> 
> cfg=[];
> cfg.method='interactive';
> mri_realigned=ft_volumerealign(cfg,mri);
> 
> And you press the keys r/l/n/z at the right places in the volume (and quit
> with q), the output (mri_realigned) will be the already aligned volume,
> you do not need to call ft_volumerealign again with method 'fiducials'.
> 
> Best,
> Lilla
> 
> > Dear list
> >
> > when running ft_volumerealign with the spm template MRI in the interactive
> > mode, I get something like: 
> >
> >
> > ===========================================================================voxel
> > 838065, indices [46 54 85], location [0.0 -20.0 96.0] mm
> > nas_voxel = [46.000000 104.000000 11.000000], nas_head = [0.000000
> > 80.000000 -52.000000]
> > lpa_voxel = [5.000000 54.000000 11.000000], lpa_head = [82.000000
> > -20.000000 -52.000000]
> > rpa_voxel = [85.000000 54.000000 11.000000], rpa_head = [-78.000000
> > -20.000000 -52.000000]
> > xzpoint_voxel = [46.000000 54.000000 85.000000], xzpoint_head = [0.000000
> > -20.000000 96.000000]
> > the call to "ft_volumerealign" took 136 seconds and an estimated 39 MB
> >
> >
> > Now I would like to rerun it in the fiducial mode, using the above
> > information.
> > According to help, I need to do this:
> >
> >
> > For realigning to the fiducials, you should specify the position of
> > the fiducials in voxel indices.
> >     cfg.fiducial.nas  = [i j k], position of nasion
> >     cfg.fiducial.lpa  = [i j k], position of LPA
> >     cfg.fiducial.rpa  = [i j k], position of RPA
> >
> >
> >
> > I used the voxel indices (code below), but ended up with the MRI
> > upside-down (see attached picture).
> > Trying the landmark mode was also without success.
> >
> >
> > Am I doing something silly here?
> >
> >
> >
> > Thanks in advance
> > Markus
> >
> >
> >
> >
> > % Load SPM8 T1 template 
> >
> >
> >  template     = '/Documents/MATLAB/spm8/templates/T1.nii';
> >
> >
> >  template_mri = ft_read_mri(template);
> >
> >
> >  disp(template_mri)
> >
> >
> >  
> >
> >
> >  % 2. Realign the coordinate system
> >
> >
> >  cfg                = []; 
> >
> >
> >  cfg.method         = 'fiducial'; % 'interactive';
> >
> >
> >  cfg.fiducial.nas   = [46 104 11];
> >
> >
> >  cfg.fiducial.lpa   = [5 54 11];
> >
> >
> >  cfg.fiducial.rpa   = [85 54 12];
> >
> >
> >  cfg.fiducial.zpoint= [46 54 85];
> >
> >
> >  cfg.coordsys       = 'ctf';
> >
> >
> >  template_mri_realigned  = ft_volumerealign(cfg, template_mri);
> >
> >
> >
> >
> >
> >
> >  
> >
> >
> >  % 3. Check the coordinate system
> >
> >
> >  cfg                     = [];
> >
> >
> >  cfg.interactive         = 'yes';
> >
> >
> >  template_mri_checked    = ft_determine_coordsys(template_mri_realigned);
> >
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> 
> _______________________________________________
> fieldtrip mailing list
> 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/20121010/b2cb3a25/attachment-0002.html>


More information about the fieldtrip mailing list