def loadatlas(r=5):
"""Load the atlas from the brainpipe module
"""
B3Dpath = dirname(
abspath(join(getfile(currentframe()), '..', '..', '..', 'atlas')))
# Load talairach atlas :
with open(B3Dpath + '/atlas/labels/talairach_atlas.pickle', "rb") as f:
TAL = pickle.load(f)
label = TAL['label']
strGM = ['No Gray Matter found within +/-'+str(r)+'mm']
label = concat([label, DataFrame({'hemisphere': [strGM], 'lobe':[
strGM], 'gyrus':[strGM], 'matter':[strGM], 'brodmann':[
0]})])
label = label.set_index([list(n.arange(label.shape[0]))])
return TAL['hdr'], TAL['mask'], TAL['gray'], label
评论列表
文章目录