comparison orientationpy-cli.py @ 2:cc8fe984ec3e draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/orientationpy commit c86a1b93cb7732f7331a981d13465653cc1a2790
author imgteam
date Wed, 24 Apr 2024 08:12:45 +0000
parents 214f548481eb
children
comparison
equal deleted inserted replaced
1:df211f6b5cf2 2:cc8fe984ec3e
1 import argparse 1 import argparse
2 import csv 2 import csv
3 3
4 import giatools.io
4 import numpy as np 5 import numpy as np
5 import orientationpy 6 import orientationpy
6 import skimage.io 7 import skimage.io
7 import skimage.util 8 import skimage.util
8 9
17 parser.add_argument('--min_energy', type=float, required=True) 18 parser.add_argument('--min_energy', type=float, required=True)
18 parser.add_argument('--max_precision', type=int, required=True) 19 parser.add_argument('--max_precision', type=int, required=True)
19 parser.add_argument('--output_angle_tsv', type=str, default=None) 20 parser.add_argument('--output_angle_tsv', type=str, default=None)
20 args = parser.parse_args() 21 args = parser.parse_args()
21 22
22 im = skimage.io.imread(args.input) 23 im = giatools.io.imread(args.input)
23 im = skimage.util.img_as_float(im) 24 im = skimage.util.img_as_float(im)
24 im = np.squeeze(im) 25 im = np.squeeze(im)
25 assert im.ndim == 2 26 assert im.ndim == 2
26 27
27 Gy, Gx = orientationpy.computeGradient(im, mode=args.mode) 28 Gy, Gx = orientationpy.computeGradient(im, mode=args.mode)