forked from kwagstyl/FCDdetection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScript4_smooth_Doughnut_LCD.sh
61 lines (42 loc) · 2.22 KB
/
Script4_smooth_Doughnut_LCD.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
########################### SCRIPT 4 ###################################################
# This script can be run after local cortical deformation and doughnut measures have been calculated
#Run on patients and controls. There will be some errors for controls who don’t have or need doughnut measures. Just ignore these.
# It does the following:
# 1. Smooth LCD and Doughnut measures
## Change to your subjects direction ##
SUBJECTS_DIR = "~/Desktop/FCD_study/"
cd "$SUBJECTS_DIR"
export SUBJECTS_DIR=~/Desktop/FCD_study/
## Change to list your subjects
sub = "FCD_01 FCD_02 FCD_03 FCD_04"
## Insert radius used for Doughnut measures;
r = "6"
# For each subject
for s in $sub
do
# For each hemisphere
H = "lh rh"
for h in $H
do
# Smooth LCD
mris_fwhm --s "$s" --hemi "$h" --cortex --smooth-only --fwhm 10\
--i "$s"/surf/"$h".LCD.mgh --o "$s"/surf/"$h".LCD.sm10.mgh
# Smooth Doughnut measures
mris_fwhm --s "$s" --hemi "$h" --cortex --smooth-only --fwhm 10\
--i "$s"/surf/"$h".Doughnut_FLAIR_0_"$r".mgh --o "$s"/surf/"$h".Doughnut_FLAIR_0_"$r".sm10.mgh
mris_fwhm --s "$s" --hemi "$h" --cortex --smooth-only --fwhm 10\
--i "$s"/surf/"$h".Doughnut_FLAIR_0.25_"$r".mgh --o "$s"/surf/"$h".Doughnut_FLAIR_0.25_"$r".sm10.mgh
mris_fwhm --s "$s" --hemi "$h" --cortex --smooth-only --fwhm 10\
--i "$s"/surf/"$h".Doughnut_FLAIR_0.5_"$r".mgh --o "$s"/surf/"$h".Doughnut_FLAIR_0.5_"$r".sm10.mgh
mris_fwhm --s "$s" --hemi "$h" --cortex --smooth-only --fwhm 10\
--i "$s"/surf/"$h".Doughnut_FLAIR_0.75_"$r".mgh --o "$s"/surf/"$h".Doughnut_FLAIR_0.75_"$r".sm10.mgh
mris_fwhm --s "$s" --hemi "$h" --cortex --smooth-only --fwhm 10\
--i "$s"/surf/"$h".Doughnut_wm_FLAIR_0.5_"$r".mgh --o "$s"/surf/"$h".Doughnut_wm_FLAIR_0.5_"$r".sm10.mgh
mris_fwhm --s "$s" --hemi "$h" --cortex --smooth-only --fwhm 10\
--i "$s"/surf/"$h".Doughnut_wm_FLAIR_1_"$r".mgh --o "$s"/surf/"$h".Doughnut_wm_FLAIR_1_"$r".sm10.mgh
mris_fwhm --s "$s" --hemi "$h" --cortex --smooth-only --fwhm 10\
--i "$s"/surf/"$h".Doughnut_thickness_"$r".mgh --o "$s"/surf/"$h".Doughnut_thickness_"$r".sm10.mgh
mris_fwhm --s "$s" --hemi "$h" --cortex --smooth-only --fwhm 10\
--i "$s"/surf/"$h".Doughnut_intensity_contrast_"$r".mgh --o "$s"/surf/"$h".Doughnut_intensity_contrast_"$r".sm10.mgh
done
done