-
Notifications
You must be signed in to change notification settings - Fork 0
/
label和ROI序号检查.R
26 lines (21 loc) · 929 Bytes
/
label和ROI序号检查.R
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
library(freesurferformats)
hcp.l = read.fs.annot.gii('fsaverage5_template/label/fsaverage5_lh_HCP-MMP1.label.gii')
code = hcp.l$colortable_df$code
name = hcp.l$colortable_df$struct_name
mydata = data.frame(code=code, name=name)
write.csv(mydata, 'HCP_L.csv')
hcp.r = read.fs.annot.gii('fsaverage5_template/label/fsaverage5_rh_HCP-MMP1.label.gii')
code = hcp.r$colortable_df$code
name = hcp.r$colortable_df$struct_name
mydata = data.frame(code=code, name=name)
write.csv(mydata, 'HCP_R.csv')
des.l = read.fs.annot('fsaverage5_template/label/lh.aparc.a2009s.annot')
code = des.l$colortable_df$code
name = des.l$colortable_df$struct_name
mydata = data.frame(code=code, name=name)
write.csv(mydata, 'Des_L.csv')
des.r = read.fs.annot('fsaverage5_template/label/rh.aparc.a2009s.annot')
code = des.r$colortable_df$code
name = des.r$colortable_df$struct_name
mydata = data.frame(code=code, name=name)
write.csv(mydata, 'Des_R.csv')