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 https://secure-web.cisco.com/1jGfE_s0T0UpZC_37qNgkpXRnP-y87LEZivCMZpnxa5A-PLJaON5EIL0IC_EN7mKQNzbHq0QZHwpCsG6V73ho9Fl-3E1wGcLe4m5d2Oskria0Nr5fR0kMqLrOOjv08KrLngE1D6M3wN2MPqmVNu3LDe9gJ7-SymN7n5FTJVJ1Zvhw6qeB4la4n1XzqPvqKDHQuxQ_rgn9DoHUrRBEPGvgTZFcSI48EJQjf-4cAbKTkv9XhrGKAXJnVNMS9uwWyIL06FTGig35j2pF_tzH6mhPZ8YqNVYKLZd4eRvAeS5t0mur29M-YZlbTdEoMCi2diAub-RJWLgdr56AT1ys7kUYjg/https%3A%2F%2Fowncloud.gwdg.de%2Findex.php%2Fs%2FfzFUAyWh5dbwyCb 2) ribbon transformed in functional space using the .reg file https://secure-web.cisco.com/1W46SeJXfyvYiIdzN0-Mgw8u9m_sVqChPLDxI9ZFbN355RDo8fIlV49vK-d1t8qCIa8ngoKGx_0A5N2RTAMxyVtMh7KMl0x9v_49U5SeVCqoC8yXt0aC8S-7LEB-hZBO3PnbwdljXcr0gVHHBkD9AAp8JKD-8GpB4TwA6yMx0VMHIE1ZyfSL6XxSDOyRuFNEXrl1IRrii23yDhboOF7F7gUAk6TCVFxPoQTe-q-BdxZKYcjmVy2RP-IZcrh5ohDbgK4IiiJZ2nuhFfvEq-aNAdBgNGniYgx-YhdrGRC5d8w_W1O2sfFbBSq8BgkBb1q3BJPlJ8fkdXcbN9TJHLejarw/https%3A%2F%2Fowncloud.gwdg.de%2Findex.php%2Fs%2F0S0UJIoUdRk9IxK and 3) ribbon transformed using the .lta file https://secure-web.cisco.com/1D0QDP9T6GVwkO7J6BbTviZB6BzyWoBMt6z9cMQuKWuK6-31hsqa1xQytMVEwNRp8ZjimWMMiuYdSiNC8Q23me_HNfoRhLGx8oLIGyKOSbqX3m5QVjw-IqzTFj1TBCj6rSvmPUy9Okra1zpQuJvcNHIHYaIrQKdNfy02vShcX81QasaI3KVdP4wotaeJLW2dpOFW0TZ0K-YihMeDa_szP-duA-swuUR24oSMwNOUL8WyUBsEdZojf2FaV0d53ZrXnLom5fguot7J5_hr49GUADEjPjR3cSfKRszFY4_icBo0iftSmSW2-PYWOBvbYENvfk5Rxc405dTrEgnCJ4AIpwA/https%3A%2F%2Fowncloud.gwdg.de%2Findex.php%2Fs%2FhvTEs3zRrRvskoX . (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" <dgr...@mgh.harvard.edu> Subject: Re: [Freesurfer] mri_vol2vol anatomical to functional To: freesurfer@nmr.mgh.harvard.edu Message-ID: <50029d97-24be-17a3-2358-3c93982de...@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://secure-web.cisco.com/1hfmecYxKY1NpcMzDGJ7lJmVMNisZgCocWDE73UzXQE8q4mm0QSGi1Dj2DGAXX4mFVbj8Xpww4NAqs7bf-khmUQDJbdXj8fHvKay4RdkOrrXG39tQ6VjV5anuuwWK0ZqOs53jZ12UABOfxsk0sQgcIopnmuvP-gZu1rRlJnpwqzzcdHcbu6jWINL1H-vawsD7u4e3-exmR75H74JanQK8QuvhbJceKdTKtj80srvqy1jvhmEUS0RRS9FNw1cCvXS7Gn53g7yg8kQBz43GzXtdQfxzcd6eSE6VpHrCNSrqVicVx7v1JpHciO7yZUZGsnj8Y6w1J7ZKHyxscw1CKJc0ig/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline <https://www.massgeneralbrigham.org/complianceline> . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.