Mercurial > repos > imgteam > colorize_labels
comparison colorize_labels.xml @ 0:6f09b367cd9a draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/colorize_labels commit 4344f548f365dba87c20188d6e3c2df8630d2313
author | imgteam |
---|---|
date | Tue, 24 Sep 2024 17:30:11 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6f09b367cd9a |
---|---|
1 <tool id="colorize_labels" name="Colorize label map" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05"> | |
2 <description>with NetworkX</description> | |
3 <macros> | |
4 <import>creators.xml</import> | |
5 <import>tests.xml</import> | |
6 <token name="@TOOL_VERSION@">3.2.1</token> | |
7 <token name="@VERSION_SUFFIX@">3</token> | |
8 </macros> | |
9 <creator> | |
10 <expand macro="creators/bmcv" /> | |
11 </creator> | |
12 <edam_operations> | |
13 <edam_operation>operation_3443</edam_operation> | |
14 </edam_operations> | |
15 <requirements> | |
16 <requirement type="package" version="@TOOL_VERSION@">networkx</requirement> | |
17 <requirement type="package" version="1.22">numpy</requirement> | |
18 <requirement type="package" version="0.18.1">scikit-image</requirement> | |
19 <requirement type="package" version="0.1">giatools</requirement> | |
20 </requirements> | |
21 <command><![CDATA[ | |
22 | |
23 ## Inputs | |
24 | |
25 python '$__tool_directory__/colorize_labels.py' '$input' | |
26 --radius $radius | |
27 --bg_label $bg_label | |
28 --bg_color '$bg_color' | |
29 | |
30 ## Outputs | |
31 | |
32 --output output.png | |
33 | |
34 ]]> | |
35 </command> | |
36 <inputs> | |
37 <param name="input" type="data" format="tiff,png" label="Input image (label map)" /> | |
38 <param argument="--radius" type="integer" min="1" value="10" label="Radius of the neighborhood" help="Defines the neighborhood (in pixels) where labels are considered to be adjacent." /> | |
39 <param argument="--bg_label" type="integer" value="0" label="Background label" /> | |
40 <param argument="--bg_color" type="color" value="#000000" label="Background color"/> | |
41 </inputs> | |
42 <outputs> | |
43 <data format="png" name="output" from_work_dir="output.png" /> | |
44 </outputs> | |
45 <tests> | |
46 <!-- int64 --> | |
47 <test> | |
48 <param name="input" value="input1.tif" /> | |
49 <param name="radius" value="1" /> | |
50 <param name="bg_label" value="0" /> | |
51 <param name="bg_color" value="#5a5a5a" /> | |
52 <expand macro="tests/intensity_image_diff" name="output" value="output1.png" ftype="png"> | |
53 <has_image_channels channels="3"/> | |
54 </expand> | |
55 </test> | |
56 <!-- uint8 --> | |
57 <test> | |
58 <param name="input" value="input2.tif" /> | |
59 <param name="radius" value="10" /> | |
60 <param name="bg_label" value="0" /> | |
61 <param name="bg_color" value="#ffffff" /> | |
62 <expand macro="tests/intensity_image_diff" name="output" value="output2.png" ftype="png"> | |
63 <has_image_channels channels="3"/> | |
64 </expand> | |
65 </test> | |
66 <!-- uint16 --> | |
67 <test> | |
68 <param name="input" value="input3.tif" /> | |
69 <param name="radius" value="100" /> | |
70 <param name="bg_label" value="0" /> | |
71 <param name="bg_color" value="#ffffff" /> | |
72 <expand macro="tests/intensity_image_diff" name="output" value="output3.png" ftype="png"> | |
73 <has_image_channels channels="3"/> | |
74 </expand> | |
75 </test> | |
76 </tests> | |
77 <help> | |
78 | |
79 **Colorizes a 2-D label map for visualization using greedy coloring.** | |
80 | |
81 Label maps are produced by segmentation and other image analysis steps. | |
82 Direct inspection of label maps can be difficult, | |
83 because labels usually correspond to gray values which are difficult to | |
84 distinguish visually from each other and from the image background. | |
85 To facilitate the visual inspection of label maps, this tools converts | |
86 label maps to color images, by assigning each label a unique color. | |
87 | |
88 </help> | |
89 <citations> | |
90 <citation type="bibtex"> | |
91 @inproceedings{networkx, | |
92 author = {Hagberg, Aric A. and Schult, Daniel A. and Swart, Pieter J.}, | |
93 title = {Exploring network structure, dynamics, and function using {NetworkX}}, | |
94 booktitle = {Proc. of the 7th Python in Science Conference (SciPy 2008)}, | |
95 pages = {11--15}, | |
96 year = {2008}, | |
97 } | |
98 </citation> | |
99 </citations> | |
100 </tool> |