-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.py
89 lines (65 loc) · 2.66 KB
/
test.py
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#__author__ = 'kcho'
##import matplotlib.pyplot as plt
##plt.style.use('ggplot')
### from freesurfer_summary import openStatsTable
##import read_freesurfer_stats
###df = read_freesurfer_stats.openStatsTable('/Users/kcho/T1/FREESURFER')
###print df
##ICV = read_freesurfer_stats.getICV('/Users/kcho/T1/FREESURFER')
##print ICV
##df = read_freesurfer_stats.openStatsTable_big('/Users/kcho/T1/FREESURFER')
##print df
##fig = read_freesurfer_stats.graph_ind(df, 'surfarea')
##plt.show()
#from freesurfer_summary import *
#import os
## freesurfer_dir = '/Users/kcho/T1/FREESURFER'
## os.environ["FREESURFER_HOME"] = '/Applications/freesurfer'
## os.environ["SUBJECTS_DIR"] = '{0}'.format(os.path.dirname(freesurfer_dir))
##
## print freesurfer_summary.collectStats_v2('/Users/kcho/T1/FREESURFER')
## roiDict = freesurfer_summary.get_cortical_rois()
## print roiDict
## roiDict2 = freesurfer_summary.get_cortical_rois_detailed()
## print roiDict2
##
## print 'range(len(roiDict.keys())*2)', range(len(roiDict.keys())*2)
##
## freesurfer_summary.makeLabel(freesurfer_dir)
## freesurfer_summary.mergeLabel(freesurfer_dir, roiDict)
##
##
## freesurfer_summary.mergeLabel(freesurfer_dir,roiDict)
## infoDict = freesurfer_summary.getInfoFromLabel(freesurfer_dir, roiDict)
## infoDf = freesurfer_summary.dictWithTuple2df(infoDict)
##
## print infoDf
##main_freesurferDir = '/Users/kcho/T1/FREESURFER'
#main_freesurferDir = '/Volumes/promise/nas_BackUp/CCNC_MRI_3T/DNO/DNO46_KJU'
#main_freesurferDir = get_freesurferDir(main_freesurferDir)
#print main_freesurferDir
#os.environ["FREESURFER_HOME"] = '/Applications/freesurfer'
#os.environ["SUBJECTS_DIR"] = '{0}'.format(os.path.dirname(main_freesurferDir))
#meanDf = pd.read_csv('/ccnc_bin/meanThickness/detailed_mean_2015_12_28.csv', index_col=0)
#roiDict = get_cortical_rois()
#infoDf = collectStats_v2(main_freesurferDir)#background_subject_locs)
#print infoDf
#subjName = 'ha'
## print infoDf
#freesuferList = subjDirs_to_fsDirs(['/Volumes/promise/nas_BackUp/CCNC_MRI_3T/DNO/DNO46_KJU',
#'/Volumes/promise/nas_BackUp/CCNC_MRI_3T/DNO/DNO46_KJU'])
#print freesuferList
#concatDf = concatFsDf(freesuferList)
#meanDf = concatDf_to_meanDf(concatDf)
#draw_thickness_detailed(infoDf,
#meanDf,
#'prac_subj',
#'CCNC_mean')
##pd.concat((df1, df2), axis=1).mean(axis=1)
## draw_thickness_detailed(infoDf,
## meanDf,
## subjName,
## 'HCs')
## valueSwap.main(main_freesurferDir,
## os.path.join(main_freesurferDir,
## 'tmp/thick_kev_detailed_new.csv'))