[FieldTrip] Fwd:

Arjen Stolk a.stolk8 at gmail.com
Wed Dec 7 08:57:26 CET 2016


Hey Cris,

The transform field typically describes how to get from ijk to your coord system of interest, ras in this case. You may want to doublecheck this by looking at how it's done in ft_volumerealign, but you'll need to first go from ras to ijk in image1 (inv(mri.transform)) in order to go from ijk to ras in image2.

Ciao,
Arjen

> On Dec 6, 2016, at 11:39 PM, Pelt, S. van (Stan) <stan.vanpelt at donders.ru.nl> wrote:
> 
> Hi Cris,
>  
> Have you tried changing the volume dimensions manually, and then perform the coregistration? E.g.:
>  
>        %change grid dimensions
>         mri_orig2=mri_orig;
>         mri_orig2.anatomy=zeros(256,256,256);
>         diff1=(256-mri_orig.dim(1))/2;
>         diff2=(256-mri_orig.dim(2))/2;
>         diff3=(256-mri_orig.dim(3))/2;
>         mri_orig2.anatomy(diff1+1:256-diff1,diff2+1:256-diff2,diff3+1:256-diff3)=mri_orig.anatomy;
>         mri_orig2.anatomy=int16(mri_orig2.anatomy);
>         mri_orig2.dim=[256 256 256];
>         mri_orig=mri_orig2;
>  
> Best,
> Stan
>  
> From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Cristiano Micheli
> Sent: dinsdag 6 december 2016 18:00
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: [FieldTrip] Fwd:
>  
> Dear List
>  
> I recently got slowed down by a tedious problem regarding the compatibility of world coordinates of volumetric MRI images with different number of voxels.
> Say image1 (in FieldTrip format) contains a /dim/ field of dimensions [256 256 180] and image2 is a resliced version of image1 with dimensions [256 256 256] to make it Freesurfer compatible. Both Image1 and Image2 are defined according to the RAS conventions, although they have different voxel orders in the 3D image box.
>  
> I need to coregister world coordinates (in mm) between the image1 and image2 spaces. However a multiplication of image2 coordinates by the transformation matrices in this form
>  
> M = image1.transform/image2.transform
>  
> would not correctly convert world-coordinate points from the system of reference defined in the space of image2 to the space of image1. I think this is due to the different number of voxels in the two volumes.
>  
> Did anyone else stumble across this problem before and found a solution ?
>  
> Cheers,
> Cris
>  
>  
>  
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161206/f8fd411a/attachment-0001.html>


More information about the fieldtrip mailing list