<h3>Running probtrackx from freesurfer cortical surfaces</h3>
<p>
In probtrackx, it is possible to use a seed that is described as a surface patch from a FreeSurfer cortical reconstruction. In order to do this, you simply need to (i) define your seed as a FreeSurfer label file, (ii) provide a transformation from FreeSurfer conformed space to diffusion space, and (iii) provide a description of the overall surface that the seed patch lives in. Below we describe each of these steps in more details.
<p>
Before you proceed, make sure that FreeSurfer is installed correctly on your computer.<br>
We will assume that you have already ran recon_all on a subject (that we will call john), and already have a surface model for that subject's cortex. We will also assume that you have provided recon_all with a structural image called struct.nii.gz. <br>
Finally, you will need to create a directory in $SUBJECTS_DIR/john/mri called nifti, and convert the conformed FreeSurfer-type structural image into a nifti file:<br><br>
You also need to convert the grey/white surface into ascii format (assuming you use the recommended option of tracking from this surface). For example, if you track from the left hemisphere:<br><br>
<h4>1. Registering FreeSurfer conformed structural space to diffusion space</h4>
Here we assume that you have ran dtifit on your diffusion data with an FA map called dti_FA.nii.gz (we recommend using an FA map to register to T1 structural images), and also that you have a file called struct.nii.gz that you have used as an input to FreeSurfer recon_all program.<br><br>
We will carry on a few steps that aim at calculating the following transformations: fa<->struct<->freesurfer. Then we will concatenate these transformations to get fa<->freesurfer. <br>
Now for transforming FA to struct, we can either calculate a linear transformation (with FLIRT), or a nonlinear warpfield (with FNIRT). This second option is only recommended when the FA data is of good quality (e.g. at least 2mm isotropic resolution).<br>
You can create a label file (text file that contains labels of vertices on a surface) using tksurfer. <br>
Alternatively, you might have defined a cortical ROI on a T1 structural image, and want to project that onto a FreeSurfer cortical surface, and turn that into a label file. <br>
The first thing to do is to transform this ROI from T1 to the conformed space using the transformation that you have calculated in the previous step. for example: <br><br>
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>
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).
<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]
</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]
</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>
Running find_the_biggest using matrix_seeds_to_all_targets:<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: