Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qim3d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QIM
Tools
qim3d
Commits
749dc096
Commit
749dc096
authored
1 year ago
by
Christian Kento Rasmussen
Browse files
Options
Downloads
Patches
Plain Diff
added argpass for no-browser
parent
f2a23b41
No related branches found
No related tags found
1 merge request
!63
added argpass for no-browser
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
qim3d/utils/cli.py
+10
-8
10 additions, 8 deletions
qim3d/utils/cli.py
with
10 additions
and
8 deletions
qim3d/utils/cli.py
+
10
−
8
View file @
749dc096
import
argparse
import
qim3d
import
webbrowser
from
qim3d.gui
import
data_explorer
,
iso3d
,
annotation_tool
,
local_thickness
import
qim3d
from
qim3d.gui
import
annotation_tool
,
data_explorer
,
iso3d
,
local_thickness
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
'
Qim3d command-line interface.
'
)
...
...
@@ -16,6 +18,7 @@ def main():
gui_parser
.
add_argument
(
'
--local-thickness
'
,
action
=
'
store_true
'
,
help
=
'
Run local thickness tool.
'
)
gui_parser
.
add_argument
(
'
--host
'
,
default
=
'
0.0.0.0
'
,
help
=
'
Desired host.
'
)
gui_parser
.
add_argument
(
'
--platform
'
,
action
=
'
store_true
'
,
help
=
'
Use QIM platform address
'
)
gui_parser
.
add_argument
(
'
--no-browser
'
,
action
=
'
store_true
'
,
help
=
'
Do not launch browser.
'
)
# K3D
viz_parser
=
subparsers
.
add_parser
(
'
viz
'
,
help
=
'
Volumetric visualization.
'
)
...
...
@@ -27,33 +30,32 @@ def main():
if
args
.
subcommand
==
'
gui
'
:
arghost
=
args
.
host
inbrowser
=
not
args
.
no_browser
# Should automatically open in browser
if
args
.
data_explorer
:
if
args
.
platform
:
data_explorer
.
run_interface
(
arghost
)
else
:
interface
=
data_explorer
.
Interface
()
interface
.
launch
()
interface
.
launch
(
inbrowser
=
inbrowser
)
elif
args
.
iso3d
:
if
args
.
platform
:
iso3d
.
run_interface
(
arghost
)
else
:
interface
=
iso3d
.
Interface
()
interface
.
launch
(
)
interface
.
launch
(
inbrowser
=
inbrowser
)
elif
args
.
annotation_tool
:
if
args
.
platform
:
annotation_tool
.
run_interface
(
arghost
)
else
:
interface
=
annotation_tool
.
Interface
()
interface
.
launch
()
interface
.
launch
(
inbrowser
=
inbrowser
)
elif
args
.
local_thickness
:
if
args
.
platform
:
local_thickness
.
run_interface
(
arghost
)
else
:
interface
=
local_thickness
.
Interface
()
interface
.
launch
()
interface
.
launch
(
inbrowser
=
inbrowser
)
if
args
.
subcommand
==
"
viz
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment