Render a head surface in a 3D scene.
(
renderer, head, subject, subjects_dir, bem, coord_frame, to_cf_t, alpha, color=None
)
| 1157 | |
| 1158 | |
| 1159 | def _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 | |
| 1177 | def _plot_helmet( |
no test coverage detected