Print

Print


Dear Saad,

Thank you so much for taking a look at our data and providing the correct command to fix our surface transformation into DWI space, it's now running without issues. For anyone interested in running probtrackx2 in DWI space using Freesurfer surfaces, here are the necessary processing steps:

# transform Freesurfer-generated aparc+aseg volume into DWI space using flirt:
flirt -in aparc+aseg_anatorig_space.nii.gz -ref dtifit_FA.nii.gz -applyxfm -init anatorig2diff.bbr.mat -out aparc+aseg_DWI_space.nii.gz -interp nearestneighbour

# generate individual Freesurfer label files using mri_annotation2label

# convert Freesurfer ?h.white surface file to .gii surface:
mris_convert ?h.white ?h.white.gii

# transform ?h.white.gii surface to DWI space using surf2surf
surf2surf --surfin=?h.white.gii --surfout=?h.white_DWI_space.gii --volin=orig.nii.gz --volout=dtifit_FA.nii.gz --xfm=anatorig2diff.bbr.mat --convin=freesurfer --convout=caret

# generate individual ROI .gii files using label2surf:
label2surf -s ?h.white_DWI_space.gii -o ?h_[ROI]_DWI_space.gii -l ?h_[ROI].txt
-> where ?h_[ROI].txt contains the full path to the Freesurfer ?h.[ROI].label file generated above using Freesurfer's mri_annotation2label command

# the following command turns the transformed [ROI] surface file into a nifti volume so one can check that it's correctly registered etc.:
surf2volume ?h.[ROI]_DWI_space.gii dtifit_FA.nii.gz ?h_[ROI]_DWI_space_vol_for_visualization.nii.gz
fslview_deprecated dtifit_FA.nii.gz ?h_[ROI]_DWI_space_vol_for_visualization.nii.gz -l Red
# it's also possible to view the volume file in Freesurfer's freeview:
freeview ?h.white_DWI_space_vol_for_visualization.nii.gz dtifit_FA.nii.gz 

# and finally the correct probtrackx2 command when using stop & waypoints masks as target ROI:
probtrackx2 -s [bedpostxdir] -x ?h_[ROI}_DWI_space.gii --stop=$d/SJ/lh_H_DWI_space.gii \-m $bedpostxdir/nodif_brain_mask.nii.gz --avoid=CC_ventricles_CSF_mask_DWI_space.nii.gz \--waypoints=$d/SJ/lh_H_DWI_space.gii --meshspace=caret --seedref=$d/dtifit_FA --dir=$outpudir --opd --loopcheck --cthr=0.2 --nsteps=2000 --steplength=0.5 --nsamples=5000 --fibthresh=0.01 --distthresh=0.0 --sampvox=0.0 --omatrix1 --forcedir

Best,
Matthias

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1