comparison run-superdsm.py @ 6:79ec3263686a draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/superdsm/ commit c86a1b93cb7732f7331a981d13465653cc1a2790
author imgteam
date Wed, 24 Apr 2024 08:13:34 +0000
parents dc5f72f6b1e9
children
comparison
equal deleted inserted replaced
5:9b4830300f3a 6:79ec3263686a
78 num_processes = 1 78 num_processes = 1
79 79
80 os.environ['MKL_NUM_THREADS'] = str(num_threads_per_process) 80 os.environ['MKL_NUM_THREADS'] = str(num_threads_per_process)
81 os.environ['OPENBLAS_NUM_THREADS'] = str(num_threads_per_process) 81 os.environ['OPENBLAS_NUM_THREADS'] = str(num_threads_per_process)
82 82
83 import giatools.io
83 import ray 84 import ray
84 import superdsm.automation 85 import superdsm.automation
85 import superdsm.io 86 import superdsm.io
86 import superdsm.render 87 import superdsm.render
87 88
93 img_filepath = tmpdir / f'input.{img_ext}' 94 img_filepath = tmpdir / f'input.{img_ext}'
94 shutil.copy(str(args.image), img_filepath) 95 shutil.copy(str(args.image), img_filepath)
95 96
96 pipeline = superdsm.pipeline.create_default_pipeline() 97 pipeline = superdsm.pipeline.create_default_pipeline()
97 cfg = create_config(args) 98 cfg = create_config(args)
98 img = superdsm.io.imread(img_filepath) 99 img = giatools.io.imread(img_filepath, impl=superdsm.io.imread)
99 100
100 # Create configuration if it is required: 101 # Create configuration if it is required:
101 if args.do_cfg or args.do_overlay or args.do_masks: 102 if args.do_cfg or args.do_overlay or args.do_masks:
102 cfg, _ = superdsm.automation.create_config(pipeline, cfg, img) 103 cfg, _ = superdsm.automation.create_config(pipeline, cfg, img)
103 104