From 792ca5d0a7ede8c12ce65fbb834c64db723d1a91 Mon Sep 17 00:00:00 2001 From: Saad Jbabdi <saad@fmrib.ox.ac.uk> Date: Thu, 26 Nov 2009 09:31:17 +0000 Subject: [PATCH] freesurfer tracking --- doc/fdt_surface.html | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/doc/fdt_surface.html b/doc/fdt_surface.html index 7e5a998..56b6c61 100644 --- a/doc/fdt_surface.html +++ b/doc/fdt_surface.html @@ -3,7 +3,7 @@ <HTML><HEAD><meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <link REL="stylesheet" TYPE="text/css" -href="../.fsl/fsl.css"><TITLE>FSL</TITLE></HEAD> +href="../fsl.css"><TITLE>FSL</TITLE></HEAD> <BODY><IFRAME width="100%" scrolling="no" frameborder="0" src="fdt_top.html">Broken</IFRAME> <h3>Running probtrackx from freesurfer cortical surfaces</h3> @@ -76,38 +76,44 @@ flirt -in myroi -ref $SUBJECTS_DIR/john/mri/nifti/brain -out myconformedroi -app The next thing to do is to project this ROI into a FreeSurfer surface. We recommend using the grey/white interface to seed tractography from the cortex: (assuming the ROI is in the left hemisphere)<br><br> <code> printf "john\n1\n1\n1\n1 0 0 0\n0 1 0 0\n0 0 1 0\n0 0 0 1\n" > reg.dat <br> -mri_vol2surf --src myconformedroi --srcreg reg.dat --projfrac 0.5 --hemi lh --out myroi2surf.mgh <br> +mri_vol2surf --src myconformedroi.nii.gz --srcreg reg.dat --projfrac 0.5 --hemi lh --out myroi2surf.mgh <br> mri_binarize --i myroi2surf.mgh --min 0.5 --o myroi2surf.mgh <br> -mri_cor2label --i myroi2surf.mgh --surf john lh white --id 1 --l myroilabel <br> +mri_cor2label --i myroi2surf.mgh --surf john lh white --id 1 --l ./myroilabel <br> </code> <br> -This will create a file called <code>myroilabel.label</code> that you can use directly in probtrackx (see following section). +This will create a file called <code>myroilabel.label</code> that you can use directly in probtrackx (see following section). We recommend checking the label file by loading it onto a freesurfer surface using tksurfer. E.g.: +<br><br> +<code> +tksurfer john lh white +</code> +<br><br>Then File->Label->Load labels +<br><br> <h4>3. Running probtrackx using surfaces</h4> All you need to do now, is to run probtrackx specifying four things: (1) the label file as a seed, (2) a description of the whole cortical surface for the corresponding hemisphere [e.g. surf.white.asc], (3) provide a transformation from conformed FreeSurfer space to diffusion space, and (4) a conformed FreeSurfer volume as a reference space: <br><br> <code> -probtrackx -x myroilabel.label --mesh=$SUBJECTS_DIR/john/surf/lh.white.asc --xfm=freesurfer2fa.mat --ref=$SUBJECTS_DIR/john/mri/nifti/brain [+all the other options] +probtrackx -x myroilabel.label --mesh=$SUBJECTS_DIR/john/surf/lh.white.asc --xfm=freesurfer2fa.mat --seedref=$SUBJECTS_DIR/john/mri/nifti/brain [+all the other options] </code> <br><br> You can also run probtrackx using a nonlinear warpfield to get from freesurfer space to diffusion space (if you had used FNIRT in step 1 above):<br><br> <code> -probtrackx -x myroilabel.label --mesh=$SUBJECTS_DIR/john/surf/lh.white.asc --xfm=freesurfer2fa_warp --invxfm=fa2freesurfer_warp --ref=$SUBJECTS_DIR/john/mri/nifti/brain [+all the other options] +probtrackx -x myroilabel.label --mesh=$SUBJECTS_DIR/john/surf/lh.white.asc --xfm=freesurfer2fa_warp --invxfm=fa2freesurfer_warp --seedref=$SUBJECTS_DIR/john/mri/nifti/brain [+all the other options] </code> <br><br> Note: in this last case, we need both forward and backward transforms fa<-->freesurfer. <h4>4. Using some of the outputs</h4> -When using classification targets in probtrackx, together with a surface-based seed, an output is created in the form of a matrix called matrix_seeds_to_all_targets. You can use this file to run find_the_biggest and produce label files for each of the hard-classified clusters. You can also use it to produce overlay files containing connectivity scores to each target.<br><br> +When using classification targets in probtrackx, together with a surface-based seed, you may use the probtrackx option <code>--seedcountastext</code>, in which case an output is created in the form of a matrix called matrix_seeds_to_all_targets. You can use this file to run find_the_biggest and produce label files for each of the hard-classified clusters. You can also use it to produce overlay files containing connectivity scores to each target.<br><br> Running find_the_biggest using matrix_seeds_to_all_targets:<br><br> <code> find_the_biggest matrix_seeds_to_all_targets myroilabel.label myclusters </code> <br><br> -The output of this command will be a set of files called myclusters<i>.label, i.e. one label file per cluster. You can combine these to produce a single annotation file: +The output of this command will be a set of files called myclusters<i>.label, i.e. one label file per cluster. You can combine these to produce a single annotation file: <br><br> <code> -mris_label2annot --s john --h lh --ctab $FSLDIR/etc/luts/fsrandlut.txt --a myannot --l myclusters_1.label --l myclusters_2.label [etc.] +mris_label2annot --s john --h lh --ctab $FSLDIR/etc/luts/fsrandlut.txt --a myannot `ls myclusters_*.label | awk '{print "--l " $1}'` </code> <br><br> Once this is done, you can load the result myannot.annot onto tksurfer. Just type:<br><br> -- GitLab