bb_FS_run.sh 602 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

. $BB_BIN_DIR/bb_pipeline_tools/bb_set_header 

if [ ! -f $1/T1/T1_unbiased.nii.gz ] ; then 

    echo "There is no T1/T1_unbiased.nii.gz -- FreeSurfer cannot run"
    exit -1

else

    if [ "$2" == "" ] ; then 
        export SUBJECTS_DIR=`pwd`/$1/
    else
        export SUBJECTS_DIR=$2
    fi

    optFLAIR=""

    if [ -f $1/T2_FLAIR/T2_FLAIR_unbiased.nii.gz ] ; then
        optFLAIR=" -FLAIR $1/T2_FLAIR/T2_FLAIR_unbiased.nii.gz -FLAIRpial"    
    fi 

    recon-all -all -s FS_$1 -i $1/T1/T1_unbiased.nii.gz $optFLAIR

fi

. $BB_BIN_DIR/bb_pipeline_tools/bb_set_footer 

set +x