comparison binary2label.xml @ 3:a041e4e9d449 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/binary2labelimage/ commit 48df7d9c58fb88e472caeb4d4a1e14170d79b643
author imgteam
date Mon, 12 May 2025 08:15:32 +0000
parents 37b99b904027
children
comparison
equal deleted inserted replaced
2:938e2358eb80 3:a041e4e9d449
1 <tool id="ip_binary_to_labelimage" name="Binary 2 Label" version="0.4"> 1 <tool id="ip_binary_to_labelimage" name="Convert binary image to label map" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
2 <description>Converts Binary to Label Image</description> 2 <description></description>
3 <macros>
4 <import>creators.xml</import>
5 <token name="@TOOL_VERSION@">0.6</token>
6 <token name="@VERSION_SUFFIX@">0</token>
7 </macros>
8 <creator>
9 <expand macro="creators/bmcv"/>
10 </creator>
11 <edam_operations>
12 <edam_operation>operation_3443</edam_operation>
13 </edam_operations>
14 <xrefs>
15 <xref type="bio.tools">galaxy_image_analysis</xref>
16 </xrefs>
3 <requirements> 17 <requirements>
4 <requirement type="package" version="0.12.3">scikit-image</requirement> 18 <requirement type="package" version="0.4.0">giatools</requirement>
5 <requirement type="package" version="0.15.1">tifffile</requirement> 19 <requirement type="package" version="1.12.0">scipy</requirement>
6 </requirements> 20 </requirements>
7 <command detect_errors="aggressive"> 21 <command detect_errors="aggressive">
8 <![CDATA[ 22 <![CDATA[
9 python '$__tool_directory__/binary2label.py' '$input' '$output' 23 #if str($mode.mode_selector) == 'cca':
24 python '$__tool_directory__/binary2label.py' '$input' '$output'
25 #elif str($mode.mode_selector) == 'watershed':
26 python '$__tool_directory__/2d_split_binaryimage_by_watershed.py' '$input' '$output' $min_distance
27 #end if
10 ]]> 28 ]]>
11 </command> 29 </command>
12 <inputs> 30 <inputs>
13 <param name="input" type="data" format="tiff,png,jpg,bmp" label="Binary Image File"/> 31 <param name="input" type="data" format="tiff,png,jpg,bmp" label="Binary image"/>
32 <conditional name="mode">
33 <param name="mode_selector" type="select" label="Mode">
34 <option value="cca" selected="true">Connected component analysis</option>
35 <option value="watershed">Watershed transform</option>
36 </param>
37 <when value="cca">
38 </when>
39 <when value="watershed">
40 <param name="min_distance" type="integer" min="0" value="5" label="Minimum distance between two objects" />
41 </when>
42 </conditional>
14 </inputs> 43 </inputs>
15 <outputs> 44 <outputs>
16 <data format="tiff" name="output"/> 45 <data format="tiff" name="output"/>
17 </outputs> 46 </outputs>
18 <tests> 47 <tests>
19 <test> 48 <test>
20 <param name="input" value="galaxyIcon_noText.tif" /> 49 <param name="input" value="galaxyIcon_noText.tiff" />
21 <output name="output" value="label.tif" ftype="tiff" compare="sim_size"/> 50 <conditional name="mode">
51 <param name="mode_selector" value="cca" />
52 </conditional>
53 <output name="output" value="label.tiff" ftype="tiff" compare="image_diff"/>
54 </test>
55 <test>
56 <param name="input" value="in.tiff"/>
57 <conditional name="mode">
58 <param name="mode_selector" value="watershed" />
59 <param name="min_distance" value="10" />
60 </conditional>
61 <output name="output" value="out.tiff" ftype="tiff" compare="image_diff"/>
62 </test>
63 <test>
64 <param name="input" value="uint8_z12_x11_y10.tiff"/>
65 <conditional name="mode">
66 <param name="mode_selector" value="cca" />
67 </conditional>
68 <output name="output" value="uint8_z12_x11_y10-output.tiff" ftype="tiff" compare="image_diff">
69 <assert_contents>
70 <has_image_width width="11"/>
71 <has_image_height height="10"/>
72 <has_image_depth depth="12"/>
73 </assert_contents>
74 </output>
22 </test> 75 </test>
23 </tests> 76 </tests>
24 <help> 77 <help>
25 **What it does** 78 This tool assigns each object a unique label.
26 79
27 This tool assigns every object an own grey value. 80 Individual objects are determined using connected component analysis, or distance transform and watershed.
28 </help> 81 </help>
29 <citations> 82 <citations>
30 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> 83 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation>
31 </citations> 84 </citations>
32 </tool> 85 </tool>