Previous changeset 7:e5c8e7e72373 (2024-04-04) |
Commit message:
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/2d_auto_threshold/ commit c86a1b93cb7732f7331a981d13465653cc1a2790 |
modified:
auto_threshold.py auto_threshold.xml |
added:
test-data/out5.tif test-data/sample2.tif |
b |
diff -r e5c8e7e72373 -r 699a5e9146b3 auto_threshold.py --- a/auto_threshold.py Thu Apr 04 15:23:18 2024 +0000 +++ b/auto_threshold.py Wed Apr 24 08:11:33 2024 +0000 |
b |
@@ -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 |
b |
diff -r e5c8e7e72373 -r 699a5e9146b3 auto_threshold.xml --- a/auto_threshold.xml Thu Apr 04 15:23:18 2024 +0000 +++ b/auto_threshold.xml Wed Apr 24 08:11:33 2024 +0000 |
[ |
@@ -4,7 +4,7 @@ <import>creators.xml</import> <import>tests.xml</import> <token name="@TOOL_VERSION@">0.18.1</token> - <token name="@VERSION_SUFFIX@">2</token> + <token name="@VERSION_SUFFIX@">3</token> <xml name="inputs/offset"> <param name="offset" type="float" value="0" label="Offset" help="Offset to be added to the automatically determined threshold value. Positive values will increase the threshold (and thus reduce the amount of values above the threshold)." /> </xml> @@ -22,6 +22,7 @@ <requirements> <requirement type="package" version="@TOOL_VERSION@">scikit-image</requirement> <requirement type="package" version="2020.10.1">tifffile</requirement> + <requirement type="package" version="0.1">giatools</requirement> </requirements> <command detect_errors="aggressive"> <![CDATA[ @@ -124,6 +125,13 @@ <param name="invert_output" value="True"/> <expand macro="tests/binary_image_diff" name="output" value="out4.tif" ftype="tiff"/> </test> + <!-- Tests for irregular files --> + <test> + <param name="input" value="sample2.tif"/> + <param name="method_id" value="otsu"/> + <param name="invert_output" value="False"/> + <expand macro="tests/binary_image_diff" name="output" value="out5.tif" ftype="tiff"/> + </test> <!-- Tests for multi-channel images --> <test expect_failure="true"> <param name="input" value="rgb.png"/> |
b |
diff -r e5c8e7e72373 -r 699a5e9146b3 test-data/out5.tif |
b |
Binary file test-data/out5.tif has changed |
b |
diff -r e5c8e7e72373 -r 699a5e9146b3 test-data/sample2.tif |
b |
Binary file test-data/sample2.tif has changed |