Mercurial > repos > imgteam > 2d_local_threshold
changeset 1:f03398bea281 draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/2d_auto_local_threshold/ commit 8a2a5763d1ac38b3c7974bd7c2da4d5c1101a0a9
author | imgteam |
---|---|
date | Tue, 23 Jul 2019 05:08:18 -0400 |
parents | 81b3d18678ed |
children | d070576c6286 |
files | auto_local_threshold.py auto_local_threshold.xml |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/auto_local_threshold.py Thu Jul 18 09:21:44 2019 -0400 +++ b/auto_local_threshold.py Tue Jul 23 05:08:18 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:
--- a/auto_local_threshold.xml Thu Jul 18 09:21:44 2019 -0400 +++ b/auto_local_threshold.xml Tue Jul 23 05:08:18 2019 -0400 @@ -1,5 +1,5 @@ -<tool id="ip_localthreshold" name="Local Threshold" version="0.0.1"> - <description>applies a local threshold algorithm to an image</description> +<tool id="ip_localthreshold" name="Local Threshold" version="0.0.2"> + <description>applies a local threshold algorithm to an image</description> <requirements> <requirement type="package" version="0.14.2">scikit-image</requirement> <requirement type="package" version="1.15.4">numpy</requirement>