Hi Donald - Both your input and output reference volume are in diffusion space and there is no transformation specified, so the output is also in diffusion space. These are voxel, not RAS, coordinates.
Best, a.y
On Jan 22, 2019 7:14 AM, "Krieger, Donald N." kriegerd@upmc.edu wrote:
External Email - Use Caution
I extract the streamlines for each tract from path.pd.trk to an ascii file and then wish to transform the coordinates to RAS T1 coordinates in millimeters.
My results are not correct.
Here is the extraction command I’m using. Is this correct? Perhaps I should be using orig.mgz as the outref volume? I do not understand –inref and --outref
dmri_trk2trk –in path.pd.trk –inref path.pd.nii.gz –outref path.pd.nii.gz –outasc test.streamlines
Given the above command, I am assuming that the output I’m getting is in the diffusion frame in voxel coordinates.
I extract 4x4 transforms and apply them in sequence; I append 1.0 to each 3-vector before applying them of course.
Here is the most compact approach I’ve tried
1st transform: mri_info –in path.pd.nii.gz –vox2ras-tkr
2nd transform: mri_info –in orig.mgz –tkr2scanner
I’ve also tried this:
1st transform: mri_info –in path.pd.nii.gz –vox2ras
2nd transform: mri_info –in path.pd.nii.gz –scanner2tkr
3rd transform: mri_inf –in orig.mgz –tkr2scanner
I’ve tried some other sequence since I’m not sure what frame is the target output for the–vox2ras* transforms stored in path.pd.nii.gz .
Those are the only transforms which contain the multiplication factors needed to get to millimeters from voxels.
Rather than continuing to fumble around, some direction from you who know would be very much appreciated.
Best - Don
External Email - Use Caution
Thanks for getting back so quickly, Anastasia. I assume you are answering a question about what dmri_trk2trk is doing. Could you please confirm?
Could you also please look at the sequence of transforms I am using and confirm that these are correct? Transform from voxel (diffusion space) to RAS coordinates (mm) in the tkraster space: mri_info --vox2ras-tkr –in path.pd.nii.gz Transform from tkraster space to RAS coordinates in the T1 space: mri_info –tkr-scanner –in $FREESURFER/subjects/SubNo/mri/orig.mgz
And that these are equivalent, please confirm: Transform from voxel to RAS coordinates (mm), both in diffusion space: mri_info –vox2ras –in path.pd.nii.gz Transform from diffusion space to tkraster space: mri_info –scanner2tkr –in path.pd.nii.gz Transform from tkraster space to T1 scanner space: mri_info –scanner tkr2scanner –in $FREESURFER/subjects/SubNo/mri/orig.mgz
Thanks – Don
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu On Behalf Of Yendiki, Anastasia Sent: Tuesday, January 22, 2019 8:46 AM To: Freesurfer support list freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Tracula: Transform streamlines to T1 RAS coordinates
Hi Donald - Both your input and output reference volume are in diffusion space and there is no transformation specified, so the output is also in diffusion space. These are voxel, not RAS, coordinates.
Best, a.y
On Jan 22, 2019 7:14 AM, "Krieger, Donald N." <kriegerd@upmc.edumailto:kriegerd@upmc.edu> wrote:
External Email - Use Caution
I extract the streamlines for each tract from path.pd.trk to an ascii file and then wish to transform the coordinates to RAS T1 coordinates in millimeters.
My results are not correct.
Here is the extraction command I’m using. Is this correct? Perhaps I should be using orig.mgz as the outref volume? I do not understand –inref and --outref
dmri_trk2trk –in path.pd.trk –inref path.pd.nii.gz –outref path.pd.nii.gz –outasc test.streamlines
Given the above command, I am assuming that the output I’m getting is in the diffusion frame in voxel coordinates.
I extract 4x4 transforms and apply them in sequence; I append 1.0 to each 3-vector before applying them of course.
Here is the most compact approach I’ve tried
1st transform: mri_info –in path.pd.nii.gz –vox2ras-tkr
2nd transform: mri_info –in orig.mgz –tkr2scanner
I’ve also tried this:
1st transform: mri_info –in path.pd.nii.gz –vox2ras
2nd transform: mri_info –in path.pd.nii.gz –scanner2tkr
3rd transform: mri_inf –in orig.mgz –tkr2scanner
I’ve tried some other sequence since I’m not sure what frame is the target output for the–vox2ras* transforms stored in path.pd.nii.gz .
Those are the only transforms which contain the multiplication factors needed to get to millimeters from voxels.
Rather than continuing to fumble around, some direction from you who know would be very much appreciated.
Best - Don
freesurfer@nmr.mgh.harvard.edu