Ejemplo n.º 1
0
def get_hemi_data(subject, hemi, source, surf_name="pial", name=None, sign="abs", min=None, max=None):
    brain = Brain(subject, hemi, surf_name, curv=False)
    hemi = brain._check_hemi(hemi)
    # load data here
    scalar_data, name = brain._read_scalar_data(source, hemi, name=name)
    min, max = brain._get_display_range(scalar_data, min, max, sign)
    if sign not in ["abs", "pos", "neg"]:
        raise ValueError("Overlay sign must be 'abs', 'pos', or 'neg'")
    old = viz.OverlayData(scalar_data, brain.geo[hemi], min, max, sign)
    return old.mlab_data, brain
Ejemplo n.º 2
0
def get_hemi_data(subject, hemi, source, surf_name="pial", name=None, sign="abs", min=None, max=None):
    brain = Brain(subject, hemi, surf_name, curv=False, offscreen=True)
    print("Brain {} verts: {}".format(hemi, brain.geo[hemi].coords.shape[0]))
    hemi = brain._check_hemi(hemi)
    # load data here
    scalar_data, name = brain._read_scalar_data(source, hemi, name=name)
    print("fMRI constrast map vertices: {}".format(len(scalar_data)))
    min, max = brain._get_display_range(scalar_data, min, max, sign)
    if sign not in ["abs", "pos", "neg"]:
        raise ValueError("Overlay sign must be 'abs', 'pos', or 'neg'")
    old = viz.OverlayData(scalar_data, brain.geo[hemi], min, max, sign)
    return old, brain
Ejemplo n.º 3
0
def get_hemi_data(subject, hemi, source, surf_name='pial', name=None, sign="abs", min=None, max=None):
    brain = Brain(subject, hemi, surf_name, curv=False, offscreen=True)
    print('Brain {} verts: {}'.format(hemi, brain.geo[hemi].coords.shape[0]))
    hemi = brain._check_hemi(hemi)
    # load data here
    scalar_data, name = brain._read_scalar_data(source, hemi, name=name)
    print('fMRI constrast map vertices: {}'.format(len(scalar_data)))
    min, max = brain._get_display_range(scalar_data, min, max, sign)
    if sign not in ["abs", "pos", "neg"]:
        raise ValueError("Overlay sign must be 'abs', 'pos', or 'neg'")
    old = viz.OverlayData(scalar_data, brain.geo[hemi], min, max, sign)
    return old, brain
Ejemplo n.º 4
0
def get_hemi_data(subject,
                  hemi,
                  source,
                  surf_name='pial',
                  name=None,
                  sign="abs",
                  min=None,
                  max=None):
    brain = Brain(subject, hemi, surf_name, curv=False)
    hemi = brain._check_hemi(hemi)
    # load data here
    scalar_data, name = brain._read_scalar_data(source, hemi, name=name)
    min, max = brain._get_display_range(scalar_data, min, max, sign)
    if sign not in ["abs", "pos", "neg"]:
        raise ValueError("Overlay sign must be 'abs', 'pos', or 'neg'")
    old = viz.OverlayData(scalar_data, brain.geo[hemi], min, max, sign)
    return old.mlab_data, brain