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

Function _plot_helmet

mne/viz/_3d.py:1177–1201  ·  view source on GitHub ↗
(
    renderer,
    info,
    to_cf_t,
    head_mri_t,
    coord_frame,
    *,
    alpha=0.25,
    scale=1.0,
)

Source from the content-addressed store, hash-verified

1175
1176
1177def _plot_helmet(
1178 renderer,
1179 info,
1180 to_cf_t,
1181 head_mri_t,
1182 coord_frame,
1183 *,
1184 alpha=0.25,
1185 scale=1.0,
1186):
1187 color = DEFAULTS["coreg"]["helmet_color"]
1188 src_surf = get_meg_helmet_surf(info, head_mri_t)
1189 assert src_surf["coord_frame"] == FIFF.FIFFV_COORD_MRI
1190 if to_cf_t is not None:
1191 src_surf = transform_surface_to(
1192 src_surf, coord_frame, [to_cf_t["mri"], to_cf_t["head"]], copy=True
1193 )
1194 actor, dst_surf = renderer.surface(
1195 surface=src_surf,
1196 color=color,
1197 opacity=alpha,
1198 backface_culling=False,
1199 name="helmet",
1200 )
1201 return actor, dst_surf, src_surf
1202
1203
1204def _plot_axes(renderer, info, to_cf_t, head_mri_t):

Callers 3

_add_helmetMethod · 0.85
plot_alignmentFunction · 0.85
add_sensorsMethod · 0.85

Calls 3

get_meg_helmet_surfFunction · 0.85
transform_surface_toFunction · 0.85
surfaceMethod · 0.45

Tested by

no test coverage detected