comparison auto_threshold.xml @ 5:7db4fc31dbee draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/2d_auto_threshold/ commit 8b9f24cbfaf54f140705f0bf4b6732269bd401da
author imgteam
date Mon, 11 Mar 2024 17:12:33 +0000
parents 3df9f0a4bf34
children 8bccb36e055a
comparison
equal deleted inserted replaced
4:3df9f0a4bf34 5:7db4fc31dbee
1 <tool id="ip_threshold" name="Threshold image" version="0.0.5-2" profile="20.05"> 1 <tool id="ip_threshold" name="Threshold image" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05">
2 <description>with scikit-image</description> 2 <description>with scikit-image</description>
3 <macros>
4 <token name="@TOOL_VERSION@">0.18.1</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 </macros>
3 <edam_operations> 7 <edam_operations>
4 <edam_operation>operation_3443</edam_operation> 8 <edam_operation>operation_3443</edam_operation>
5 </edam_operations> 9 </edam_operations>
6 <xrefs> 10 <xrefs>
7 <xref type="bio.tools">scikit-image</xref> 11 <xref type="bio.tools">scikit-image</xref>
14 <command detect_errors="aggressive"> 18 <command detect_errors="aggressive">
15 <![CDATA[ 19 <![CDATA[
16 python '$__tool_directory__/auto_threshold.py' 20 python '$__tool_directory__/auto_threshold.py'
17 '$input' 21 '$input'
18 ./out.tif 22 ./out.tif
19 '$th_method' 23 '$th_method.method_id'
20 '$block_size' 24 '$th_method.block_size'
21 '$dark_bg' 25 '$th_method.threshold'
26 '$invert_output'
22 ]]> 27 ]]>
23 </command> 28 </command>
24 <inputs> 29 <inputs>
25 <param name="input" type="data" format="tiff,png" label="Input image" /> 30 <param name="input" type="data" format="tiff,png" label="Input image" />
26 <param name="th_method" type="select" label="Thresholding method"> 31 <conditional name="th_method">
27 <option value="otsu" selected="True">Otsu</option> 32 <param name="method_id" type="select" label="Thresholding method">
28 <option value="li">Li's Minimum Cross Entropy</option> 33 <option value="manual">Manual</option>
29 <option value="isodata">Isodata</option> 34 <option value="otsu" selected="True">Globally adaptive / Otsu</option>
30 <option value="yen">Yen</option> 35 <option value="li">Globally adaptive / Li's Minimum Cross Entropy</option>
31 <option value="loc_gaussian">Adaptive (Gaussian)</option> 36 <option value="isodata">Globally adaptive / Isodata</option>
32 <option value="loc_median">Adaptive (Median)</option> 37 <option value="yen">Globally adaptive / Yen</option>
33 <option value="loc_mean">Adaptive (Mean)</option> 38 <option value="loc_gaussian">Locally adaptive / Gaussian</option>
34 </param> 39 <option value="loc_median">Locally adaptive / Median</option>
35 <param name="block_size" type="integer" value="5" label="Odd size of pixel neighborhood for determining the threshold (only valid for adaptive thresholding methods)" /> 40 <option value="loc_mean">Locally adaptive / Mean</option>
36 <param name="dark_bg" type="boolean" checked="true" truevalue="True" falsevalue="False" label="Dark Background" /> 41 </param>
42 <when value="manual">
43 <param name="threshold" type="float" value="0" label="Threshold value" />
44 <param name="block_size" type="hidden" value="0" />
45 </when>
46 <when value="otsu">
47 <param name="threshold" type="hidden" value="0" />
48 <param name="block_size" type="hidden" value="0" />
49 </when>
50 <when value="li">
51 <param name="threshold" type="hidden" value="0" />
52 <param name="block_size" type="hidden" value="0" />
53 </when>
54 <when value="isodata">
55 <param name="threshold" type="hidden" value="0" />
56 <param name="block_size" type="hidden" value="0" />
57 </when>
58 <when value="yen">
59 <param name="threshold" type="hidden" value="0" />
60 <param name="block_size" type="hidden" value="0" />
61 </when>
62 <when value="loc_gaussian">
63 <param name="threshold" type="hidden" value="0" />
64 <param name="block_size" type="integer" value="5" label="Odd size of pixel neighborhood for determining the threshold" />
65 </when>
66 <when value="loc_median">
67 <param name="threshold" type="hidden" value="0" />
68 <param name="block_size" type="integer" value="5" label="Odd size of pixel neighborhood for determining the threshold" />
69 </when>
70 <when value="loc_mean">
71 <param name="threshold" type="hidden" value="0" />
72 <param name="block_size" type="integer" value="5" label="Odd size of pixel neighborhood for determining the threshold" />
73 </when>
74 </conditional>
75 <param name="invert_output" type="boolean" checked="false" truevalue="True" falsevalue="False" label="Invert output labels" help="Pixels are usually assigned the label 0 if the pixel value is below (or equal to) the threshold, and 255 if it is above the threshold. If this option is activated, pixels are assigned the label 255 if the pixel value is below (or equal to) the threshold, and 0 if it is above the threshold." />
37 </inputs> 76 </inputs>
38 <outputs> 77 <outputs>
39 <data format="tiff" name="output" from_work_dir="out.tif" /> 78 <data format="tiff" name="output" from_work_dir="out.tif" />
40 </outputs> 79 </outputs>
41 <tests> 80 <tests>
42 <test> 81 <test>
43 <param name="input" value="sample.tif"/> 82 <param name="input" value="sample.tif"/>
44 <output name="output" value="out.tif" ftype="tiff" compare="sim_size"/> 83 <output name="output" value="out.tif" ftype="tiff" compare="sim_size" delta="10"/>
45 <param name="th_method" value="loc_gaussian"/> 84 <param name="method_id" value="loc_gaussian"/>
46 <param name="block_size" value="3"/> 85 <param name="block_size" value="3"/>
47 <param name="dark_bg" value="True"/> 86 <param name="invert_output" value="False"/>
48 </test> 87 </test>
49 <test> 88 <test>
50 <param name="input" value="sample.tif"/> 89 <param name="input" value="sample.tif"/>
51 <output name="output" value="out2.tif" ftype="tiff" compare="sim_size"/> 90 <output name="output" value="out2.tif" ftype="tiff" compare="sim_size" delta="10"/>
52 <param name="th_method" value="otsu"/> 91 <param name="method_id" value="otsu"/>
53 <param name="block_size" value="5"/> 92 <param name="block_size" value="5"/>
54 <param name="dark_bg" value="True"/> 93 <param name="invert_output" value="False"/>
94 </test>
95 <test>
96 <param name="input" value="sample.tif"/>
97 <output name="output" value="out3.tif" ftype="tiff" compare="sim_size" delta="10"/>
98 <param name="method_id" value="manual"/>
99 <param name="threshold" value="64"/>
100 <param name="invert_output" value="True"/>
55 </test> 101 </test>
56 </tests> 102 </tests>
57 <help> 103 <help>
58 Applies a standard thresholding algorithm to an image. 104 Applies a standard thresholding algorithm to an image.
105
106 The thresholding algorithm automatically determines a threshold value (unless manual thresholding is used).
107 The input image is then thresholded, by assigning white (pixel value 255) to image regions above the determined threshold,
108 and black (pixel value 0) to image regions below or equal to the determined threshold.
109
110 The assignment of black and white to image regions below and above the threshold is inverted, if the corresponding option is set.
59 </help> 111 </help>
60 <citations> 112 <citations>
61 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> 113 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation>
62 </citations> 114 </citations>
63 </tool> 115 </tool>