comparison image_math.py @ 2:48fa3ac55df2 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c86a1b93cb7732f7331a981d13465653cc1a2790
author imgteam
date Wed, 24 Apr 2024 08:12:29 +0000
parents 33b2ca53a566
children
comparison
equal deleted inserted replaced
1:f8b7770cbca5 2:48fa3ac55df2
1 import argparse 1 import argparse
2 import ast 2 import ast
3 import operator 3 import operator
4 4
5 import giatools.io
5 import numpy as np 6 import numpy as np
6 import skimage.io 7 import skimage.io
7 8
8 9
9 supported_operators = { 10 supported_operators = {
75 76
76 inputs = dict() 77 inputs = dict()
77 im_shape = None 78 im_shape = None
78 for input in args.input: 79 for input in args.input:
79 name, filepath = input.split(':') 80 name, filepath = input.split(':')
80 im = skimage.io.imread(filepath) 81 im = giatools.io.imread(filepath)
81 assert name not in inputs, 'Input name "{name}" is ambiguous.' 82 assert name not in inputs, 'Input name "{name}" is ambiguous.'
82 inputs[name] = im 83 inputs[name] = im
83 if im_shape is None: 84 if im_shape is None:
84 im_shape = im.shape 85 im_shape = im.shape
85 else: 86 else: