Detailed step two of ENIGMA DTI protocol

Source: Internet
Author: User
Tags gz file

Enigma-dti skeletonization

1. Rename the dti_FA.nii.gz under each folder to subject*_fa.nii.gz with the following code:

For subj in {1..89} domv./subject${subj}/dti_fa.nii.gz./subject${subj}/Subject${subj}_fa.nii.gzdone 

2, in the same directory with subject* to create a new folder/tbss/run_tbss, and a subject in the FA data copied to RUN_TBSS, the code is as follows:

For subj in {1..89}DOCP./subject*/subject*_fa.nii.gz./tbss/run_tbss/done

3, Erode images

Enter the RUN_TBSS directory, enter Tbss_1_preproc *.nii.gz in the terminal (for erode images), this step will create a new two folder in the RUN_TBSS directory:

    • FA: Storing processed data
    • Origdata: Storing raw data

4, registration to the template

(1) in the TBSS directory, create a new folder, named Enigma_targets, download the following links in the file, and stored in the Enigma_targets: http://enigma.ini.usc.edu/wp-content/ Uploads/2013/02/enigmadti.zip. The compressed file contains a total of 5 nii.gz files:

    • ENIGMA_DTI_FA.nii.gz
    • ENIGMA_DTI_FA_mask.nii.gz
    • ENIGMA_DTI_FA_skeleton.nii.gz
    • ENIGMA_DTI_FA_skeleton_mask.nii.gz
    • ENIGMA_DTI_FA_skeleton_mask_dst.nii.gz

(2) Copy the ENIGMA_DTI_FA.nii.gz file to the RUN_TBSS directory and enter the following two commands in the terminal:

Tbss_2_reg–t enigma_dti_fa.nii.gztbss_3_postreg-s

The first command is to register the data in the FA folder with the Enigma template, which takes 5-10 minutes per data.

Second command: The Tbss_3_postreg script applies these registrations to take all subjects into 1x1x1mm standard space. Next, all subjects ' standard space nonlinearly aligned images is merged into a single 4D image file called All_fa, create D in a new subdirectory called stats. The mean of all FA images are created, called Mean_fa, and this was then fed into the FA skeletonisation program to create M Ean_fa_skeleton. A new stats folder will be created in the RUN_TBSS directory with 4 files in the folder:

    • All_FA.nii.gz
    • Mean_FA.nii.gz
    • Mean_fa_mask
    • mean_FA_skeleton.nii.gz

5. Generate masked_FAskel.nii.gz for each subject

(1) Under RUN_TBSS, create a new folder named Fa_individ, and under Fa_individ to create a folder subject1...subjectn, each subject to create a new FA folder and stats folder, Copy the nii.gz file under the FA folder to the FA folder under each newly created subject, which can be implemented with the following code:

For subj in {1..89}domkdir-p./fa_individ/subject${subj}/stats/mkdir-p./fa_individ/subject${subj}/fa/cp./FA/ subject${subj}_*.nii.gz./fa_individ/subject${subj}/fa/####[optional/recommended]####${fsldir}/bin/ Fslmaths./fa_individ/subject${subj}/fa/subject${subj}_*FA_to_target.nii.gz-mas ENIGMA_DTI_FA.nii.gz./fa _individ/subject${subj}/fa/subject${subj}_masked_fa.nii.gzdone     

(2) Skeletonize images

For subj in {1..89}do${fsldir}/bin/tbss_skeleton-i./fa_individ/subject${subj}/fa/subject${subj}_masked_ Fa.nii.gz-p 0.049 ENIGMA_DTI_FA_skeleton_mask_dst.nii.gz LowerCingulum_1mm.nii.gz./fa_individ/subject${subj}/  fa/subject${subj}_masked_fa.nii.gz./fa_individ/subject${subj}/stats/subject${subj}_masked_faskel.nii.gz- s ENIGMA_DTI_FA_skeleton_mask.nii.gzdone    

Where Fsldir is the variable that is set when the FSL is installed. After running the above script, a subject*_masked_faskel.nii.gz file is generated under each Subject Stats folder (this is the only file under that folder).

PS: Because of the large amount of data, you often need to modify the file name, the following command is used to replace the file name of the files in the same folder with the subject89 string subject87 string. This command is in the form of an Ubuntu command, unlike other Linux systems.

Rename ' s/subject89/subject87/' subject89*

Detailed step two of ENIGMA DTI protocol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.