diff --git a/qim3d/__init__.py b/qim3d/__init__.py index eca0e61d44941f7bc6503eb6d00d4454d669960c..c51e707e84951b7f23725fcfbe3e4ade6a3aea8b 100644 --- a/qim3d/__init__.py +++ b/qim3d/__init__.py @@ -6,4 +6,3 @@ import qim3d.models as models import logging examples = io.ImgExamples() -downloader = io.Downloader() diff --git a/qim3d/gui/local_thickness.py b/qim3d/gui/local_thickness.py index ae4b625b942d4b0318f57129a1e4ba4f535b347e..632db4dbe37d2209956ace9b237051ce9ff89793 100644 --- a/qim3d/gui/local_thickness.py +++ b/qim3d/gui/local_thickness.py @@ -71,7 +71,7 @@ class Interface: session.zpos = zpos return session - def launch(self, img=None): + def launch(self, img=None,**kwargs): # Show header if self.show_header: internal_tools.gradio_header(self.title, self.port) @@ -90,6 +90,7 @@ class Interface: quiet=quiet, height=self.height, width=self.width, + **kwargs ) return diff --git a/qim3d/io/downloader.py b/qim3d/io/downloader.py index d619c78e4d8e84c57ab10045e0907a35477d9bf0..b4644a49cd4cae49d4d8899254aa65fff2c0b512 100644 --- a/qim3d/io/downloader.py +++ b/qim3d/io/downloader.py @@ -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. Example: - dl = Downloader() + dl = qim3d.io.Downloader() # Downloads and Loads (optional) image: img = dl.Corals.Coral2_DOWNSAMPLED(load = True) """ diff --git a/qim3d/utils/cli.py b/qim3d/utils/cli.py index f48a5b81c974fdcf73110b5f517a0f7c49d6c6d0..2b6e3bd008f3896a88cbab9c1863bf7800ddb19d 100644 --- a/qim3d/utils/cli.py +++ b/qim3d/utils/cli.py @@ -13,23 +13,39 @@ def main(): 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('--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() if args.subcommand == 'gui': arghost = args.host if args.data_explorer: - - data_explorer.run_interface(arghost) + if args.platform: + data_explorer.run_interface(arghost) + else: + interface = data_explorer.Interface() + interface.launch() + elif args.iso3d: - iso3d.run_interface(arghost) + if args.platform: + iso3d.run_interface(arghost) + else: + interface = iso3d.Interface() + interface.launch() elif args.annotation_tool: - annotation_tool.run_interface(arghost) - + if args.platform: + annotation_tool.run_interface(arghost) + else: + interface = annotation_tool.Interface() + interface.launch() elif args.local_thickness: - local_thickness.run_interface(arghost) - + if args.platform: + local_thickness.run_interface(arghost) + else: + interface = local_thickness.Interface() + interface.launch() if __name__ == '__main__': main() \ No newline at end of file