[FieldTrip] Fwd:

Pelt, S. van (Stan) stan.vanpelt at donders.ru.nl
Wed Dec 7 08:39:17 CET 2016


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



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


More information about the fieldtrip mailing list