External Email - Use Caution
Hi Douglas,
thank you for your time; I am trying to get the ribbon at functional space resolution (I need it to extract the white matter from my ROIs)
Here I am copying the 2 commands (one using .reg file, the second using .lta) I am using, and the terminal terminal outputs. Attached you will also find 3 screenshots from freeview with 1) original ribbon
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://owncloud.gwdg.de/index.php/s/fzFUAyWh5dbwyCb
2) ribbon transformed in functional space using the .reg file
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://owncloud.gwdg.de/index.php/s/0S0UJIoUdRk9IxK
and 3) ribbon transformed using the .lta file MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://owncloud.gwdg.de/index.php/s/hvTEs3zRrRvskoX
.
(Please Note: I am using Matlab to integrate this analysis in the general pipeline, so the command are started by the s=system() function )
%%%%%%REG
s=system(['mri_vol2vol --reg ' regpath ' --mov ' inputvol ' --targ ' funcTemp ' --o ' outputvol ]);
regio_read_register: loading lta
Matrix from regfile:
0.99982 -0.01069 -0.01533 -0.11505;
0.01423 -0.09676 0.99521 -0.84297;
0.01212 0.99525 0.09659 -5.72961;
0.00000 0.00000 0.00000 1.00000;
movvol Anatomy_Processed/hum_15477.long.long002/mri/lh.ribbon.mgz
targvol FSfast_struc/all_sub/f02_Sess03/bold/ecc_lh/conjunction_pe/v1_trai_vol.nii
outvol Anatomy_Processed/hum_15477.long.long002/mri/lh.ribbon_func.mgz
regfile FSfast_struc/all_sub/f02_Sess03/bold/register.dof6.lta
invert 0
tal 0
talres 2
regheader 0
noresample 0
interp trilinear (1)
precision float (3)
Gdiag_no -1
Synth 0
SynthSeed 1649422337
Final tkRAS-to-tkRAS Matrix is:
0.99982 -0.01069 -0.01533 -0.11505;
0.01423 -0.09676 0.99521 -0.84297;
0.01212 0.99525 0.09659 -5.72961;
0.00000 0.00000 0.00000 1.00000;
Vox2Vox Matrix is:
2.01888 -0.03096 0.02351 23.93213;
0.02447 0.19504 -2.18955 197.85437;
-0.02873 -2.00955 -0.21287 240.49161;
0.00000 0.00000 0.00000 1.00000;
Resampling
Output registration matrix is identity
mri_vol2vol done
%%%%%%LTA
s=system(['mri_vol2vol --lta ' ltapath ' --mov ' inputvol ' --targ ' funcTemp ' --o ' outputvol ]);
Matrix from LTA:
0.99983 -0.01069 -0.01533 -0.11505;
0.01423 -0.09676 0.99521 -0.84293;
0.01212 0.99525 0.09659 -5.72960;
0.00000 0.00000 0.00000 1.00000;
Anatomy_Processed/hum_15477.long.long002/mri/lh.ribbon.mgz FSfast_struc/all_sub/f02_Sess03/bold/ecc_lh/conjunction_pe/v1_trai_vol.nii
INFO: src volume info differs from the one stored in lta. gets modified now.
volume geometry:
extent : (256, 256, 256)
voxel : ( 1.0000, 1.0000, 1.0000)
x_(ras) : (-1.0000, -0.0000, -0.0000)
y_(ras) : ( 0.0000, 0.0000, -1.0000)
z_(ras) : (-0.0000, 1.0000, 0.0000)
c_(ras) : ( 0.2540, 9.2232, 8.1562)
file : Anatomy_Processed/hum_15477.long.long002/mri/lh.ribbon.mgz
volume geometry:
extent : (104, 104, 69)
voxel : ( 2.0192, 2.0192, 2.2000)
x_(ras) : (-0.9995, -0.0137, 0.0296)
y_(ras) : ( 0.0126, -0.9991, -0.0397)
z_(ras) : ( 0.0301, -0.0393, 0.9988)
c_(ras) : ( 1.5530, 16.4346, 14.9788)
file : bold/template.nii.gz
INFO: dst volume info differs from the one stored in lta. gets modified now.
volume geometry:
extent : (104, 104, 69)
voxel : ( 2.0192, 2.0192, 2.2000)
x_(ras) : (-0.9995, -0.0137, 0.0296)
y_(ras) : ( 0.0126, -0.9991, -0.0397)
z_(ras) : ( 0.0301, -0.0393, 0.9988)
c_(ras) : ( 1.5530, 16.4345, 14.9788)
file : FSfast_struc/all_sub/f02_Sess03/bold/ecc_lh/conjunction_pe/v1_trai_vol.nii
volume geometry:
extent : (256, 256, 256)
voxel : ( 1.0000, 1.0000, 1.0000)
x_(ras) : (-1.0000, -0.0000, -0.0000)
y_(ras) : ( 0.0000, 0.0000, -1.0000)
z_(ras) : (-0.0000, 1.0000, 0.0000)
c_(ras) : ( 0.2540, 9.2232, 8.1562)
file : Anatomy_Processed/hum_15496.long.long002/mri/orig.mgz
movvol Anatomy_Processed/hum_15477.long.long002/mri/lh.ribbon.mgz
targvol FSfast_struc/all_sub/f02_Sess03/bold/ecc_lh/conjunction_pe/v1_trai_vol.nii
outvol Anatomy_Processed/hum_15477.long.long002/mri/lh.ribbon_func.mgz
regfile FSfast_struc/all_sub/f02_Sess03/bold/register.dof6.lta
invert 0
tal 0
talres 2
regheader 0
noresample 0
interp trilinear (1)
precision float (3)
Gdiag_no -1
Synth 0
SynthSeed 1649445621
Final tkRAS-to-tkRAS Matrix is:
0.99828 0.04446 -0.03809 2.43217;
0.03729 0.01869 0.99913 9.13850;
-0.04513 0.99884 -0.01700 12.13850;
0.00000 0.00000 0.00000 1.00000;
Vox2Vox Matrix is:
2.01577 -0.07692 -0.09781 28.12225;
-0.09113 -0.03433 -2.19744 198.19705;
-0.07530 -2.01747 0.04112 244.54424;
0.00000 0.00000 0.00000 1.00000;
Resampling
Output registration matrix is identity
mri_vol2vol done
Many thanks again,
Best
Giorgio
Message: 10
Date: Sun, 27 Mar 2022 17:16:25 -0400
From: "Douglas N. Greve" <dgreve@mgh.harvard.edu>
Subject: Re: [Freesurfer] mri_vol2vol anatomical to functional
To: freesurfer@nmr.mgh.harvard.edu
Message-ID: <50029d97-24be-17a3-2358-3c93982dea41@mgh.harvard.edu>
Content-Type: text/plain; charset=UTF-8; format=flowed
I'm not sure I understand what you are saying or what the problem is.
Can you provide the actual command line you are using, all the terminal
output, and a picture that shows what the problem is?
On 3/23/2022 2:46 PM, Manenti, Giorgio wrote:
> External Email - Use Caution
>
> Dear Freesurfer experts,
>
> I am getting problems to transform my xh.ribbon.mgh from anatomical 256x256x256 to functional 104x104x69 space.
>
> When converting the ribbon via ? mri_vol2vol ?reg REGfile ?mov INPUT ?targ funcTEMPLATE ?o OUTPUT ? and checking via freeview, i am getting the right functional space dimensions but the INPUT and OUTPUT .mgz are never
overlapping. Why am i getting this misplacement ? Is this problem due to the register file i provide or maybe it is just a visualisation error (perhaps freeview is not the best way to check the conversion).
>
> I tried to change REGfile by providing the 1) init.register.dof6.dat and 2) register.dof6.lta (changing ??reg with ?lta?). I am getting an almost perfect merge when using the .lta file but still the two volumes are
misaligned.
> I tried mri_label2vol as well, but as expected i got worse results.
>
> To provide a minimum more detail, after recon-all i process the anatomy with the longitudinal recon. At that point i use the longitudinal anatomy to register the functional data, which i process by 1) mk-template 2)
topup & applytopup.
>
> Many thanks in advance
> Warm regards
>
> Giorgio
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer