# HG changeset patch # User imgteam # Date 1563872944 14400 # Node ID c90b91f4a07b0e0def9a004fa506856c08fa5f8f # Parent a20c14eb5f9843a842c40b83bebf259ea6eb82b3 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/2d_auto_local_threshold/ commit 8a2a5763d1ac38b3c7974bd7c2da4d5c1101a0a9 diff -r a20c14eb5f98 -r c90b91f4a07b auto_local_threshold.py --- a/auto_local_threshold.py Thu Jul 18 09:22:07 2019 -0400 +++ b/auto_local_threshold.py Tue Jul 23 05:09:04 2019 -0400 @@ -3,6 +3,7 @@ import skimage.io import skimage.filters import skimage.util +import numpy as np threshOptions = { 'gaussian': lambda img_raw, bz: skimage.filters.threshold_local(img_raw, bz, method='gaussian'), @@ -20,6 +21,7 @@ args = parser.parse_args() img_in = skimage.io.imread(args.input_file.name) + img_in = np.reshape(img_in, [img_in.shape[0], img_in.shape[1]]) thresh = threshOptions[args.thresh_type](img_in, args.block_size) if args.dark_background: diff -r a20c14eb5f98 -r c90b91f4a07b auto_local_threshold.xml --- a/auto_local_threshold.xml Thu Jul 18 09:22:07 2019 -0400 +++ b/auto_local_threshold.xml Tue Jul 23 05:09:04 2019 -0400 @@ -1,5 +1,5 @@ - - applies a local threshold algorithm to an image + + applies a local threshold algorithm to an image scikit-image numpy