Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Coreg GUI #9689

Merged
merged 238 commits into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from 236 commits
Commits
Show all changes
238 commits
Select commit Hold shift + click to select a range
9c09a49
add gui
GuillaumeFavelier Aug 23, 2021
3683ba2
Do not trigger CIs [ci skip]
GuillaumeFavelier Aug 23, 2021
74d6973
add widgets [ci skip]
GuillaumeFavelier Aug 23, 2021
21fd559
improve dock file button [ci skip]
GuillaumeFavelier Aug 23, 2021
df55c5d
comment
GuillaumeFavelier Aug 23, 2021
7f8b474
update desc
GuillaumeFavelier Aug 23, 2021
26f09d0
simplify [ci skip]
GuillaumeFavelier Aug 23, 2021
662cbf3
reorder [ci skip]
GuillaumeFavelier Aug 23, 2021
45e0e6b
add directory filter
GuillaumeFavelier Aug 23, 2021
e89c45b
add support for directory [ci skip]
GuillaumeFavelier Aug 23, 2021
b9b91a8
set minimal [ci skip]
GuillaumeFavelier Aug 23, 2021
069d87c
sync file button widget -> file text widget [ci skip]
GuillaumeFavelier Aug 23, 2021
474c704
proto: transparent skin surface [ci skip]
GuillaumeFavelier Aug 24, 2021
1138729
workaround for plot_alignment
GuillaumeFavelier Aug 24, 2021
8fcf701
refactor
GuillaumeFavelier Aug 24, 2021
52d098e
proto: switch subject [ci skip]
GuillaumeFavelier Aug 24, 2021
9524602
plot(verbose=False)
GuillaumeFavelier Aug 24, 2021
2bbbb8c
proto: switch subjects dir [ci skip]
GuillaumeFavelier Aug 24, 2021
6b2021d
remove groupbox
GuillaumeFavelier Aug 24, 2021
93bb9a6
comment
GuillaumeFavelier Aug 24, 2021
a0a1ae4
proto: fit_icp [ci skip]
GuillaumeFavelier Aug 24, 2021
e0feee7
refactor
GuillaumeFavelier Aug 24, 2021
118af69
proto: dig weights [ci skip]
GuillaumeFavelier Aug 24, 2021
20b8070
comment
GuillaumeFavelier Aug 24, 2021
46be57c
add self._verbose
GuillaumeFavelier Aug 24, 2021
1c078a1
proto: display parameters with 4 decimals [ci skip]
GuillaumeFavelier Aug 25, 2021
adf8249
proto: omit hsp
GuillaumeFavelier Aug 25, 2021
7253431
fix [ci skip]
GuillaumeFavelier Aug 25, 2021
6ade890
proto: reset [ci skip]
GuillaumeFavelier Aug 25, 2021
c939181
proto: set scale mode
GuillaumeFavelier Aug 25, 2021
5f26bfe
refactor to fix
GuillaumeFavelier Aug 25, 2021
dfdde9f
refactor [ci skip]
GuillaumeFavelier Aug 25, 2021
d5f683c
proto: lock fids [ci skip]
GuillaumeFavelier Aug 25, 2021
9c255d4
Merge branch 'main' into enh/coreg_gui [ci skip]
GuillaumeFavelier Aug 26, 2021
4af8d3a
move ui elements [ci skip]
GuillaumeFavelier Aug 26, 2021
22fdc46
move ui elements
GuillaumeFavelier Aug 26, 2021
e1bf6ec
rename [ci skip]
GuillaumeFavelier Aug 26, 2021
13f23a8
proto: high res head [ci skip]
GuillaumeFavelier Aug 26, 2021
3b14e93
add more point weights [ci skip]
GuillaumeFavelier Aug 26, 2021
f0b9b2e
proto: save trans [ci skip]
GuillaumeFavelier Aug 26, 2021
04d20e4
proto: read trans [ci skip]
GuillaumeFavelier Aug 26, 2021
b7ca609
proto: icp fid match
GuillaumeFavelier Aug 26, 2021
6bbc771
rename
GuillaumeFavelier Aug 26, 2021
dcf4673
newline
GuillaumeFavelier Aug 26, 2021
ca4c48a
proto: load info [ci skip]
GuillaumeFavelier Aug 26, 2021
1c8f409
rename
GuillaumeFavelier Aug 26, 2021
a42e55c
TST: change units to mm [ci skip]
GuillaumeFavelier Aug 26, 2021
bd6b435
fix radio buttons [ci skip]
GuillaumeFavelier Aug 27, 2021
d57a698
proto: display fids
GuillaumeFavelier Aug 27, 2021
396ae09
fix [ci skip]
GuillaumeFavelier Aug 27, 2021
b8f7eb2
proto: set fiducial file [ci skip]
GuillaumeFavelier Aug 27, 2021
e0f32f1
refactor
GuillaumeFavelier Aug 27, 2021
c09c80c
refactor
GuillaumeFavelier Aug 27, 2021
359c47f
refactor
GuillaumeFavelier Aug 27, 2021
08d95cb
migrate to traitlets [ci skip]
GuillaumeFavelier Aug 30, 2021
d99d7b6
migrate to traitlets [ci skip]
GuillaumeFavelier Aug 31, 2021
2202125
fix [ci skip]
GuillaumeFavelier Sep 1, 2021
dc959a5
proto: edit parameters [ci skip]
GuillaumeFavelier Sep 1, 2021
6d86c96
proto: edit other weights [ci skip]
GuillaumeFavelier Sep 1, 2021
2348199
fix [ci skip]
GuillaumeFavelier Sep 1, 2021
9955440
Fix notebook [ci skip]
GuillaumeFavelier Sep 1, 2021
d69edfe
Merge branch 'main' into enh/coreg_gui [ci skip]
GuillaumeFavelier Sep 7, 2021
dd16992
tst: plot_head_surface [ci skip]
GuillaumeFavelier Sep 7, 2021
580b96a
add _update_head
GuillaumeFavelier Sep 8, 2021
382aaa3
add _add_head_fiducials [ci skip]
GuillaumeFavelier Sep 8, 2021
ee75069
Merge branch 'main' into enh/coreg_gui
GuillaumeFavelier Sep 27, 2021
90ab1be
add traitlets dep
GuillaumeFavelier Sep 27, 2021
d5d077a
fix
GuillaumeFavelier Sep 27, 2021
ec548b9
Add _add_head_shape_points [ci skip]
GuillaumeFavelier Sep 27, 2021
11a9bd9
fix [ci skip]
GuillaumeFavelier Sep 27, 2021
4a42281
fix [ci skip]
GuillaumeFavelier Sep 27, 2021
b8abeb3
Add _emit_coreg_modified [ci skip]
GuillaumeFavelier Sep 27, 2021
10a8785
refactor [ci skip]
GuillaumeFavelier Sep 27, 2021
115b17e
fix [ci skip]
GuillaumeFavelier Sep 27, 2021
280b92c
add _plot_hpi_coils [ci skip]
GuillaumeFavelier Sep 28, 2021
067947c
refactor
GuillaumeFavelier Sep 28, 2021
263b81e
refactor [ci skip]
GuillaumeFavelier Sep 28, 2021
c9fdf53
nitpick
GuillaumeFavelier Sep 28, 2021
cc6ba70
nitpick
GuillaumeFavelier Sep 28, 2021
2ae04e1
add _add_mri_fiducials [ci skip]
GuillaumeFavelier Sep 28, 2021
4f2c39b
refactor
GuillaumeFavelier Sep 28, 2021
167fab5
improve mri fids [ci skip]
GuillaumeFavelier Sep 28, 2021
f26cf65
improve mri fids [ci skip]
GuillaumeFavelier Sep 28, 2021
6f79a84
refactor [ci skip]
GuillaumeFavelier Sep 28, 2021
d2db266
remove cruft [ci skip]
GuillaumeFavelier Sep 28, 2021
3489766
add _grow_hair_changed [ci skip]
GuillaumeFavelier Sep 29, 2021
0cecb68
fix
GuillaumeFavelier Sep 29, 2021
36ad5be
change bgcolor [ci skip]
GuillaumeFavelier Sep 29, 2021
690d2a0
prepare lock_fids UX [ci skip]
GuillaumeFavelier Sep 29, 2021
26d8708
prepare picking [ci skip]
GuillaumeFavelier Sep 29, 2021
14c7506
enable cell -> vertex picking [ci skip]
GuillaumeFavelier Sep 29, 2021
77d8c17
display picking msg [ci skip]
GuillaumeFavelier Sep 30, 2021
2f56ebc
rename [ci skip]
GuillaumeFavelier Sep 30, 2021
188e039
nitpick
GuillaumeFavelier Sep 30, 2021
6b8eb5b
refactor [ci skip]
GuillaumeFavelier Sep 30, 2021
7b55b8c
improve picking [ci skip]
GuillaumeFavelier Sep 30, 2021
c8742e2
improve UX consistency [ci skip]
GuillaumeFavelier Sep 30, 2021
aebade4
add _add_hpi_coils [ci skip]
GuillaumeFavelier Sep 30, 2021
7f960a3
refactor [ci skip]
GuillaumeFavelier Sep 30, 2021
9f3548d
improve UX consistency [ci skip]
GuillaumeFavelier Sep 30, 2021
e086cf6
improve UX consistency [ci skip]
GuillaumeFavelier Sep 30, 2021
4fb40ab
prepare for glyph scaling [ci skip]
GuillaumeFavelier Oct 1, 2021
723a926
add _orient_glyphs_changed
GuillaumeFavelier Oct 1, 2021
d051353
improve UX consistency
GuillaumeFavelier Oct 1, 2021
79ea34b
fix opacity [ci skip]
GuillaumeFavelier Oct 1, 2021
a487402
orient hpi coils too
GuillaumeFavelier Oct 1, 2021
0f91e5a
fix
GuillaumeFavelier Oct 1, 2021
c7a8917
refactor [ci skip]
GuillaumeFavelier Oct 1, 2021
15a5ef7
Merge branch 'main' into enh/coreg_gui [ci skip]
GuillaumeFavelier Oct 1, 2021
fb4dce8
update picking UX [ci skip]
GuillaumeFavelier Oct 4, 2021
9e00fec
improve glyph scaling [ci skip]
GuillaumeFavelier Oct 4, 2021
3ce8197
TST: lock scale parameters
GuillaumeFavelier Oct 4, 2021
6af2c40
fix
GuillaumeFavelier Oct 4, 2021
f5de425
allow partial update
GuillaumeFavelier Oct 4, 2021
0b5455e
refactor [ci skip]
GuillaumeFavelier Oct 4, 2021
725a115
rename [ci skip]
GuillaumeFavelier Oct 4, 2021
29f1035
Merge branch 'main' into enh/coreg_gui [ci skip]
GuillaumeFavelier Oct 5, 2021
64d36ca
fix
GuillaumeFavelier Oct 5, 2021
749318c
add support for hsp mask
GuillaumeFavelier Oct 5, 2021
ac0f78d
add _reset_omit_hsp_filter [ci skip]
GuillaumeFavelier Oct 5, 2021
815067f
prepare for plotting EEG channels
GuillaumeFavelier Oct 5, 2021
9dbde18
add _add_eeg_channels [ci skip]
GuillaumeFavelier Oct 5, 2021
1ff2098
improve UX consistency [ci skip]
GuillaumeFavelier Oct 5, 2021
3ea0f9f
TMP: faster init
GuillaumeFavelier Oct 6, 2021
cc23513
better init [ci skip]
GuillaumeFavelier Oct 6, 2021
2659d20
refactor [ci skip]
GuillaumeFavelier Oct 6, 2021
f613ce3
add _update_parameters [ci skip]
GuillaumeFavelier Oct 6, 2021
58b3360
refactor
GuillaumeFavelier Oct 6, 2021
32a3519
refactor [ci skip]
GuillaumeFavelier Oct 6, 2021
e66413d
fix plot sensors
GuillaumeFavelier Oct 6, 2021
bc3f5a3
fix sensor opacity
GuillaumeFavelier Oct 6, 2021
62c7571
allow extra renderer kwargs [ci skip]
GuillaumeFavelier Oct 6, 2021
58ae760
selecting a fiducial updates the view [ci skip]
GuillaumeFavelier Oct 6, 2021
a1eb8ab
connect scale combo boxes
GuillaumeFavelier Oct 6, 2021
26b4d9b
add _lock_plot
GuillaumeFavelier Oct 6, 2021
d712f79
add _set_fiducial [ci skip]
GuillaumeFavelier Oct 6, 2021
b8b5a98
nitpick
GuillaumeFavelier Oct 6, 2021
7d6965b
fix [ci skip]
GuillaumeFavelier Oct 6, 2021
020bce2
add _set_sensors_visibility [ci skip]
GuillaumeFavelier Oct 7, 2021
85e6afa
add _forward_widget_command [ci skip]
GuillaumeFavelier Oct 7, 2021
f68d604
refactor [ci skip]
GuillaumeFavelier Oct 7, 2021
510f5a6
refactor
GuillaumeFavelier Oct 7, 2021
9014460
refactor [ci skip]
GuillaumeFavelier Oct 7, 2021
b94aea1
improve UX consistency [ci skip]
GuillaumeFavelier Oct 7, 2021
8e791b8
refactor [ci skip]
GuillaumeFavelier Oct 7, 2021
18d5351
TST: add mne coreg --pyvista [ci skip]
GuillaumeFavelier Oct 11, 2021
1a0cdc3
fix [ci skip]
GuillaumeFavelier Oct 11, 2021
fdbe4ab
fix opacity [ci skip]
GuillaumeFavelier Oct 11, 2021
4414da7
update default value
GuillaumeFavelier Oct 11, 2021
d12501d
add support for trans option [ci skip]
GuillaumeFavelier Oct 11, 2021
37a88a6
refactor [ci skip]
GuillaumeFavelier Oct 11, 2021
118f9bf
revert toolbar changes
GuillaumeFavelier Oct 12, 2021
bc09fa9
mark head surface for picking
GuillaumeFavelier Oct 12, 2021
3d4cc30
refactor
GuillaumeFavelier Oct 12, 2021
dbbca80
fix fids [ci skip]
GuillaumeFavelier Oct 12, 2021
4aa1013
use _defaults [ci skip]
GuillaumeFavelier Oct 12, 2021
54643ed
nitpick [ci skip]
GuillaumeFavelier Oct 12, 2021
04fb3ff
change spin box step
GuillaumeFavelier Oct 13, 2021
5d1f537
update plot at each fit_icp iteration [ci skip]
GuillaumeFavelier Oct 13, 2021
bcd3f65
nitpick
GuillaumeFavelier Oct 13, 2021
999cdff
move to mne/gui [ci skip]
GuillaumeFavelier Oct 13, 2021
fbe7247
fix toolbar [ci skip]
GuillaumeFavelier Oct 13, 2021
01ea534
add _display_message [ci skip]
GuillaumeFavelier Oct 13, 2021
ebc6ba5
fix notebook [ci skip]
GuillaumeFavelier Oct 14, 2021
0e2219a
Merge branch 'main' into enh/coreg_gui
GuillaumeFavelier Oct 14, 2021
392b0d1
allow micro adjustments during picking
GuillaumeFavelier Oct 14, 2021
010f362
add doc
GuillaumeFavelier Oct 14, 2021
b17abe0
TST: fix compat/minimal
GuillaumeFavelier Oct 14, 2021
daf1cd7
nitpick
GuillaumeFavelier Oct 14, 2021
8235f32
reduce number of actors
GuillaumeFavelier Oct 15, 2021
921c955
orient eeg channels glyphs
GuillaumeFavelier Oct 15, 2021
229eaaf
refactor
GuillaumeFavelier Oct 15, 2021
84cf036
change default
GuillaumeFavelier Oct 15, 2021
d9e5b47
refactor
GuillaumeFavelier Oct 15, 2021
01ed71e
restore temporarily
GuillaumeFavelier Oct 15, 2021
18b9009
fix
GuillaumeFavelier Oct 15, 2021
e790d18
update doc
GuillaumeFavelier Oct 15, 2021
808dc4f
update doc conf
GuillaumeFavelier Oct 15, 2021
28f8551
fix
GuillaumeFavelier Oct 15, 2021
3172797
restore
GuillaumeFavelier Oct 15, 2021
775296b
update layout
GuillaumeFavelier Oct 15, 2021
d9a45bd
revert 01ed71e
GuillaumeFavelier Oct 15, 2021
e96a2ff
add support for info_file=None [ci skip]
GuillaumeFavelier Oct 18, 2021
9b1fef6
refine requirements [ci skip]
GuillaumeFavelier Oct 18, 2021
8e800be
refactor [ci skip]
GuillaumeFavelier Oct 18, 2021
43e7ff8
refactor
GuillaumeFavelier Oct 18, 2021
9eb3286
refactor to_cf_t
GuillaumeFavelier Oct 18, 2021
209ebef
add _sensor_opacity [ci skip]
GuillaumeFavelier Oct 18, 2021
23efc86
remove cruft
GuillaumeFavelier Oct 18, 2021
507307e
refactor defaults [ci skip]
GuillaumeFavelier Oct 18, 2021
e95fcb6
expose sensor_opacity [ci skip]
GuillaumeFavelier Oct 18, 2021
c088f9f
backward compatibility with mayavi opacity at init [ci skip]
GuillaumeFavelier Oct 18, 2021
886e0a4
fix [ci skip]
GuillaumeFavelier Oct 18, 2021
bb36394
finalize _lock_head_opacity [ci skip]
GuillaumeFavelier Oct 18, 2021
5083b15
use getOpenFileName [ci skip]
GuillaumeFavelier Oct 19, 2021
9bf49ac
refactor
GuillaumeFavelier Oct 19, 2021
0e2a06d
unlock fids at init
GuillaumeFavelier Oct 19, 2021
83230e7
fix head surf
GuillaumeFavelier Oct 19, 2021
c6d18bb
restore temporarily
GuillaumeFavelier Oct 19, 2021
b60d51e
fix sensors
GuillaumeFavelier Oct 19, 2021
86be997
disable eeg in test_plot_alignment_meg temporarily
GuillaumeFavelier Oct 19, 2021
b5863e5
do not support --head-opacity
GuillaumeFavelier Oct 19, 2021
d398be3
allow fids picking when info is none
GuillaumeFavelier Oct 19, 2021
a989958
update sensor list
GuillaumeFavelier Oct 19, 2021
fe22e82
update sensor list
GuillaumeFavelier Oct 19, 2021
148013a
use getSaveFileName
GuillaumeFavelier Oct 19, 2021
58ecb13
fix
GuillaumeFavelier Oct 19, 2021
8c3ee83
Merge branch 'main' into enh/coreg_gui
GuillaumeFavelier Oct 20, 2021
9395ee4
Merge branch 'main' into enh/coreg_gui
GuillaumeFavelier Oct 21, 2021
03d8cb6
Merge branch 'main' into enh/coreg_gui
GuillaumeFavelier Oct 22, 2021
d9a41f6
Merge branch 'main' into enh/coreg_gui
GuillaumeFavelier Oct 23, 2021
759c0b7
improve coverage
GuillaumeFavelier Oct 25, 2021
874b34d
add a close function
GuillaumeFavelier Oct 25, 2021
b3f20d9
fix import
GuillaumeFavelier Oct 25, 2021
ade5c68
requires pyvistaqt
GuillaumeFavelier Oct 25, 2021
46bcd53
move to existing file
GuillaumeFavelier Oct 25, 2021
6111b89
nitpick
GuillaumeFavelier Oct 25, 2021
f5458bc
check defaults too
GuillaumeFavelier Oct 25, 2021
afb9791
Merge branch 'main' into enh/coreg_gui
GuillaumeFavelier Oct 25, 2021
773a58f
use _get_3d_backend
GuillaumeFavelier Oct 25, 2021
08db55c
use coregistration
GuillaumeFavelier Oct 25, 2021
c04a859
reorder imports
GuillaumeFavelier Oct 25, 2021
09b18f2
fix
GuillaumeFavelier Oct 25, 2021
e0c4960
restore
GuillaumeFavelier Oct 25, 2021
f4deaa8
add basic support for verbose
GuillaumeFavelier Oct 25, 2021
5ba4527
fix
GuillaumeFavelier Oct 25, 2021
f77c172
warn unsupported parameters
GuillaumeFavelier Oct 25, 2021
3b7b28f
TST: show the renderer
GuillaumeFavelier Oct 26, 2021
bbf00ce
Revert "TST: show the renderer"
GuillaumeFavelier Oct 26, 2021
1eb4448
TST: use get_config
GuillaumeFavelier Oct 26, 2021
1fa6e51
use config
GuillaumeFavelier Oct 26, 2021
6379605
fix
GuillaumeFavelier Oct 26, 2021
6bcc9a8
restore lighting
GuillaumeFavelier Oct 26, 2021
d3a0195
Merge branch 'main' into enh/coreg_gui
GuillaumeFavelier Oct 26, 2021
8710097
add _check_fif
GuillaumeFavelier Oct 26, 2021
dafb4fc
fix style
GuillaumeFavelier Oct 26, 2021
bc3a739
reverse _check_fif logic
GuillaumeFavelier Oct 26, 2021
edc70f9
Merge branch 'main' into enh/coreg_gui
GuillaumeFavelier Oct 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
'mapping', 'to', 'any',
# unlinkable
'mayavi.mlab.pipeline.surface',
'CoregFrame', 'Kit2FiffFrame', 'FiducialsFrame',
'CoregFrame', 'Kit2FiffFrame', 'FiducialsFrame', 'CoregistrationUI',
'IntracranialElectrodeLocator'
}
numpydoc_validate = True
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies:
- spyder-kernels>=1.10.0
- imageio-ffmpeg>=0.4.1
- vtk>=9.0.1
- traitlets
- pyvista>=0.30
- pyvistaqt>=0.4
- qdarkstyle
Expand Down
70 changes: 54 additions & 16 deletions mne/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import os

from ..utils import _check_mayavi_version, verbose, get_config
from ..utils import _check_mayavi_version, verbose, get_config, warn
from ._backend import _testing_mode


Expand Down Expand Up @@ -117,7 +117,7 @@ def coregistration(tabbed=False, split=True, width=None, inst=None,

Returns
-------
frame : instance of CoregFrame
frame : instance of CoregFrame or CoregistrationUI
The coregistration frame.

Notes
Expand All @@ -132,6 +132,32 @@ def coregistration(tabbed=False, split=True, width=None, inst=None,
subjects for which no MRI is available
<https://www.slideshare.net/mne-python/mnepython-scale-mri>`_.
"""
from ..viz.backends.renderer import _get_3d_backend
pyvistaqt = _get_3d_backend() == 'pyvistaqt'
if pyvistaqt:
# unsupported parameters
params = {
'tabbed': (tabbed, False),
'split': (split, True),
'scrollable': (scrollable, True),
'head_inside': (head_inside, True),
'guess_mri_subject': guess_mri_subject,
'head_opacity': head_opacity,
'project_eeg': project_eeg,
'scale_by_distance': scale_by_distance,
'mark_inside': mark_inside,
'interaction': interaction,
'scale': scale,
'advanced_rendering': advanced_rendering,
}
for key, val in params.items():
if isinstance(val, tuple):
to_raise = val[0] != val[1]
else:
to_raise = val is not None
if to_raise:
warn(f"The parameter {key} is not supported with"
" the pyvistaqt 3d backend. It will be ignored.")
config = get_config(home_dir=os.environ.get('_MNE_FAKE_HOME_DIR'))
if guess_mri_subject is None:
guess_mri_subject = config.get(
Expand Down Expand Up @@ -174,20 +200,32 @@ def coregistration(tabbed=False, split=True, width=None, inst=None,
width = int(width)
height = int(height)
scale = float(scale)
_check_mayavi_version()
from ._backend import _check_backend
_check_backend()
from ._coreg_gui import CoregFrame, _make_view
view = _make_view(tabbed, split, width, height, scrollable)
frame = CoregFrame(inst, subject, subjects_dir, guess_mri_subject,
head_opacity, head_high_res, trans, config,
project_eeg=project_eeg,
orient_to_surface=orient_to_surface,
scale_by_distance=scale_by_distance,
mark_inside=mark_inside, interaction=interaction,
scale=scale, advanced_rendering=advanced_rendering,
head_inside=head_inside)
return _initialize_gui(frame, view)
if pyvistaqt:
from ..viz.backends.renderer import MNE_3D_BACKEND_TESTING
from ._coreg import CoregistrationUI
show = not MNE_3D_BACKEND_TESTING
standalone = not MNE_3D_BACKEND_TESTING
return CoregistrationUI(
info_file=inst, subject=subject, subjects_dir=subjects_dir,
head_resolution=head_high_res, orient_glyphs=orient_to_surface,
trans=trans, size=(width, height), show=show, standalone=standalone,
verbose=verbose
)
larsoner marked this conversation as resolved.
Show resolved Hide resolved
else:
_check_mayavi_version()
from ._backend import _check_backend
_check_backend()
from ._coreg_gui import CoregFrame, _make_view
view = _make_view(tabbed, split, width, height, scrollable)
frame = CoregFrame(inst, subject, subjects_dir, guess_mri_subject,
head_opacity, head_high_res, trans, config,
project_eeg=project_eeg,
orient_to_surface=orient_to_surface,
scale_by_distance=scale_by_distance,
mark_inside=mark_inside, interaction=interaction,
scale=scale, advanced_rendering=advanced_rendering,
head_inside=head_inside)
return _initialize_gui(frame, view)


def fiducials(subject=None, fid_file=None, subjects_dir=None):
Expand Down
Loading