Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface-based connectivity #9

Open
pcamach2 opened this issue Jun 9, 2022 · 0 comments
Open

Surface-based connectivity #9

pcamach2 opened this issue Jun 9, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@pcamach2
Copy link
Collaborator

pcamach2 commented Jun 9, 2022

GIFTI-format surface-based connectivity with probtrackx2.0 GPU

https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FDT/UserGuide#PROBTRACKX_-_probabilistic_tracking_with_crossing_fibres

Using FreeSurfer surfaces

In order to use FreeSurfer-generated surfaces as masks in probtrackx, you need to add the following command line options (which can also be set in the GUI):

--meshspace=freesurfer --seedref=orig.nii.gz

Where the orig.nii.gz file can be generated by converting the orig.mgz file (found in the FreeSurfer output directories) using FreeSurfer's mri_convert.

Additionally, using FreeSurfer with probtrackx requires a few specific steps that we describe below.

FreeSurfer Registration

FreeSurfer operates in a conformed space, which is different from the original structural image space that it has received as an input. When tracking from FreeSurfer surfaces, it is necessary to provide a transformation between conformed space and diffusion space. Below are a few steps that show how to achieve this.

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.

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.

Let us start with struct<->freesufer (assuming john is the subject's name):

tkregister2 --mov $SUBJECTS_DIR/john/mri/orig.mgz --targ $SUBJECTS_DIR/john/mri/rawavg.mgz --regheader --reg junk --fslregout freesurfer2struct.mat --noedit
convert_xfm -omat struct2freesurfer.mat -inverse freesurfer2struct.mat

Now transforming FA to struct:

flirt -in dti_FA -ref struct_brain -omat fa2struct.mat
convert_xfm -omat struct2fa.mat -inverse fa2struct.mat

The final stage is to concatenate these transformations:

convert_xfm -omat fa2freesurfer.mat -concat struct2freesurfer.mat fa2struct.mat
convert_xfm -omat freesurfer2fa.mat -inverse fa2freesurfer.mat

@pcamach2 pcamach2 added the enhancement New feature or request label Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant