Validate surface type and load if a file name
(surf)
| 14 | from .surf import plot_surf |
| 15 | |
| 16 | def _check_surf(surf): |
| 17 | """Validate surface type and load if a file name""" |
| 18 | if isinstance(surf, (str, pathlib.Path)): |
| 19 | return read_surface(str(surf)) |
| 20 | elif isinstance(surf, BSPolyData) or (surf is None): |
| 21 | return surf |
| 22 | else: |
| 23 | raise ValueError('Surface be a path-like string, an instance of ' |
| 24 | 'BSPolyData, or None') |
| 25 | |
| 26 | |
| 27 | def _set_layout(lh, rh, layout, views, mirror=False): |