Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
WEISS
Software Repositories
SNAPPY
scikit-surgerydavinci
Commits
91e29b8f
Commit
91e29b8f
authored
May 23, 2019
by
Eddie Edwards
Browse files
Issue
#18
- got it working with videos
parent
3d2c0dfe
Pipeline
#2356
failed with stages
in 24 minutes and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
sksurgerydavinci/ui/sksurgerydavinci_demo.py
View file @
91e29b8f
...
...
@@ -32,17 +32,31 @@ def run_demo(args):
vtk_models
=
create_sample_model
()
num_of_input_sources
=
len
(
video_sources
)
if
video_sources
[
0
].
isdigit
():
print
(
'Video 0 will come from a camera'
)
else
:
print
(
'Video 0 will come from a file'
)
if
num_of_input_sources
==
1
:
viewer
=
MonoViewer
(
int
(
video_sources
[
0
]))
if
video_sources
[
0
].
isdigit
():
viewer
=
MonoViewer
(
int
(
video_sources
[
0
]))
else
:
viewer
=
MonoViewer
(
video_sources
[
0
])
elif
int
(
video_sources
[
1
])
==
-
1
:
viewer
=
MockStereoViewer
(
int
(
video_sources
[
0
]))
if
video_sources
[
0
].
isdigit
():
viewer
=
MockStereoViewer
(
int
(
video_sources
[
0
]))
else
:
viewer
=
MockStereoViewer
(
video_sources
[
0
])
viewer
.
set_external_screens
(
output_screens
)
else
:
left_source
=
int
(
video_sources
[
0
])
right_source
=
int
(
video_sources
[
1
])
if
video_sources
[
0
].
isdigit
():
left_source
=
int
(
video_sources
[
0
])
else
:
left_source
=
int
(
video_sources
[
0
])
if
video_sources
[
1
].
isdigit
():
right_source
=
int
(
video_sources
[
1
])
else
:
right_source
=
video_sources
[
1
]
viewer
=
StereoViewer
(
left_source
,
right_source
)
viewer
.
set_external_screens
(
output_screens
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment