Mercurial > repos > imgteam > 2d_auto_threshold
diff auto_threshold.py @ 8:699a5e9146b3 draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/2d_auto_threshold/ commit c86a1b93cb7732f7331a981d13465653cc1a2790
author | imgteam |
---|---|
date | Wed, 24 Apr 2024 08:11:33 +0000 |
parents | e5c8e7e72373 |
children |
line wrap: on
line diff
--- a/auto_threshold.py Thu Apr 04 15:23:18 2024 +0000 +++ b/auto_threshold.py Wed Apr 24 08:11:33 2024 +0000 @@ -7,12 +7,13 @@ import argparse +import giatools.io import numpy as np import skimage.filters -import skimage.io import skimage.util import tifffile + th_methods = { 'manual': lambda thres, **kwargs: thres, @@ -28,7 +29,7 @@ def do_thresholding(in_fn, out_fn, th_method, block_size, offset, threshold, invert_output=False): - img = skimage.io.imread(in_fn) + img = giatools.io.imread(in_fn) img = np.squeeze(img) assert img.ndim == 2