Skip to content
Snippets Groups Projects
Commit 8ef7e066 authored by s184058's avatar s184058 Committed by fima
Browse files

Change gui launch pipeline

parent caede17f
Branches
No related tags found
1 merge request!51Change gui launch pipeline
...@@ -6,4 +6,3 @@ import qim3d.models as models ...@@ -6,4 +6,3 @@ import qim3d.models as models
import logging import logging
examples = io.ImgExamples() examples = io.ImgExamples()
downloader = io.Downloader()
...@@ -71,7 +71,7 @@ class Interface: ...@@ -71,7 +71,7 @@ class Interface:
session.zpos = zpos session.zpos = zpos
return session return session
def launch(self, img=None): def launch(self, img=None,**kwargs):
# Show header # Show header
if self.show_header: if self.show_header:
internal_tools.gradio_header(self.title, self.port) internal_tools.gradio_header(self.title, self.port)
...@@ -90,6 +90,7 @@ class Interface: ...@@ -90,6 +90,7 @@ class Interface:
quiet=quiet, quiet=quiet,
height=self.height, height=self.height,
width=self.width, width=self.width,
**kwargs
) )
return return
......
...@@ -22,7 +22,7 @@ class Downloader: ...@@ -22,7 +22,7 @@ class Downloader:
[folder_name_n] (str): folder class with the name of the n-th folder in the QIM data repository. [folder_name_n] (str): folder class with the name of the n-th folder in the QIM data repository.
Example: Example:
dl = Downloader() dl = qim3d.io.Downloader()
# Downloads and Loads (optional) image: # Downloads and Loads (optional) image:
img = dl.Corals.Coral2_DOWNSAMPLED(load = True) img = dl.Corals.Coral2_DOWNSAMPLED(load = True)
""" """
......
...@@ -13,23 +13,39 @@ def main(): ...@@ -13,23 +13,39 @@ def main():
gui_parser.add_argument('--annotation-tool', action='store_true', help='Run annotation tool.') gui_parser.add_argument('--annotation-tool', action='store_true', help='Run annotation tool.')
gui_parser.add_argument('--local-thickness', action='store_true', help='Run local thickness tool.') 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('--host', default='0.0.0.0', help='Desired host.')
gui_parser.add_argument('--platform', action='store_true', help='Use QIM platform address')
args = parser.parse_args() args = parser.parse_args()
if args.subcommand == 'gui': if args.subcommand == 'gui':
arghost = args.host arghost = args.host
if args.data_explorer: if args.data_explorer:
if args.platform:
data_explorer.run_interface(arghost) data_explorer.run_interface(arghost)
else:
interface = data_explorer.Interface()
interface.launch()
elif args.iso3d: elif args.iso3d:
if args.platform:
iso3d.run_interface(arghost) iso3d.run_interface(arghost)
else:
interface = iso3d.Interface()
interface.launch()
elif args.annotation_tool: elif args.annotation_tool:
if args.platform:
annotation_tool.run_interface(arghost) annotation_tool.run_interface(arghost)
else:
interface = annotation_tool.Interface()
interface.launch()
elif args.local_thickness: elif args.local_thickness:
if args.platform:
local_thickness.run_interface(arghost) local_thickness.run_interface(arghost)
else:
interface = local_thickness.Interface()
interface.launch()
if __name__ == '__main__': if __name__ == '__main__':
main() main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment