# HG changeset patch # User imgteam # Date 1645283839 0 # Node ID be2d3ce89c0f0ebfdbc6c4318cae98bd69326a3d # Parent 497dcd834bb3c3359a4d58b535bec53af50bc7bf "planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/2d_auto_local_threshold/ commit b1b3c63ab021aa77875c3b04127f6836024812f9" diff -r 497dcd834bb3 -r be2d3ce89c0f auto_local_threshold.py --- a/auto_local_threshold.py Wed Dec 18 05:00:26 2019 -0500 +++ b/auto_local_threshold.py Sat Feb 19 15:17:19 2022 +0000 @@ -1,9 +1,10 @@ import argparse import sys -import skimage.io + +import numpy as np import skimage.filters +import skimage.io import skimage.util -import numpy as np threshOptions = { 'gaussian': lambda img_raw, bz: skimage.filters.threshold_local(img_raw, bz, method='gaussian'), @@ -24,7 +25,7 @@ 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: + if args.dark_background: res = img_in > thresh else: res = img_in <= thresh diff -r 497dcd834bb3 -r be2d3ce89c0f auto_local_threshold.xml --- a/auto_local_threshold.xml Wed Dec 18 05:00:26 2019 -0500 +++ b/auto_local_threshold.xml Sat Feb 19 15:17:19 2022 +0000 @@ -1,4 +1,4 @@ - + applies a local threshold algorithm to an image scikit-image @@ -35,6 +35,8 @@ Applies a local threshold algorithm to an image. + + Note: This tool is deprecated and may not be supported in future. Please use the tool "Auto Threshold" instead. 10.1016/j.jbiotec.2017.07.019