forked from BNUCNL/GBC
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.py
33 lines (21 loc) · 864 Bytes
/
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
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:l
"Test for connectivity pattern analysis"
from cpa import *
targ_img_file = './data/S0001_obj_004.nii.gz'
node_img_file = './data/face.nii.gz'
label_img_file = None
cond_file = './data/design.mat'
# define dataset
ds = DataSet(ftarg_img = targ_img_file, fnode_img = node_img_file, flabel_img=node_img_file, level='voxel')
# define and compute connectivity
conn = Connectivity(ds, metric='pearson').compute()
# define and compute global measures
# glob_meas = Measure(conn, metric='sum').compute()
# glob_meas.save()
# define and compute local measures
# local_meas = LocalMeasure(conn, radius=6, metric='sum').compute()
# local_meas.save()
# define and compute spatial measures
spat_meas = SpatialMeasure(conn).compute()
spat_meas.save()