MCPcopy
hub / github.com/mne-tools/mne-python / _plot_head_surface

Function _plot_head_surface

mne/viz/_3d.py:1159–1174  ·  view source on GitHub ↗

Render a head surface in a 3D scene.

(
    renderer, head, subject, subjects_dir, bem, coord_frame, to_cf_t, alpha, color=None
)

Source from the content-addressed store, hash-verified

1157
1158
1159def _plot_head_surface(
1160 renderer, head, subject, subjects_dir, bem, coord_frame, to_cf_t, alpha, color=None
1161):
1162 """Render a head surface in a 3D scene."""
1163 color = DEFAULTS["coreg"]["head_color"] if color is None else color
1164 actor = None
1165 src_surf = dst_surf = None
1166 if head is not False:
1167 src_surf = _get_head_surface(head, subject, subjects_dir, bem=bem)
1168 src_surf = transform_surface_to(
1169 src_surf, coord_frame, [to_cf_t["mri"], to_cf_t["head"]], copy=True
1170 )
1171 actor, dst_surf = renderer.surface(
1172 surface=src_surf, color=color, opacity=alpha, backface_culling=False
1173 )
1174 return actor, dst_surf, src_surf
1175
1176
1177def _plot_helmet(

Callers 2

_add_head_surfaceMethod · 0.85
plot_alignmentFunction · 0.85

Calls 3

transform_surface_toFunction · 0.85
_get_head_surfaceFunction · 0.50
surfaceMethod · 0.45

Tested by

no test coverage detected