Mercurial > repos > imgteam > points2labelimage
comparison points2label.xml @ 3:de611b3b5ae8 draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit 6fc9ab8db9ef72ac7ded30d7373768feeae9390d
author | imgteam |
---|---|
date | Fri, 27 Sep 2024 17:41:21 +0000 |
parents | 30ca5d5d03ec |
children |
comparison
equal
deleted
inserted
replaced
2:30ca5d5d03ec | 3:de611b3b5ae8 |
---|---|
1 <tool id="ip_points_to_label" name="Convert point coordinates to label map" version="0.3-2"> | 1 <tool id="ip_points_to_label" name="Convert point coordinates to label map" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05"> |
2 <description></description> | 2 <description></description> |
3 <macros> | |
4 <import>creators.xml</import> | |
5 <import>tests.xml</import> | |
6 <token name="@TOOL_VERSION@">0.4</token> | |
7 <token name="@VERSION_SUFFIX@">0</token> | |
8 </macros> | |
9 <creator> | |
10 <expand macro="creators/bmcv" /> | |
11 </creator> | |
3 <edam_operations> | 12 <edam_operations> |
4 <edam_operation>operation_3443</edam_operation> | 13 <edam_operation>operation_3443</edam_operation> |
5 </edam_operations> | 14 </edam_operations> |
6 <xrefs> | 15 <xrefs> |
7 <xref type="bio.tools">galaxy_image_analysis</xref> | 16 <xref type="bio.tools">galaxy_image_analysis</xref> |
8 </xrefs> | 17 </xrefs> |
9 <requirements> | 18 <requirements> |
10 <requirement type="package" version="1.15.4">numpy</requirement> | 19 <requirement type="package" version="0.21">scikit-image</requirement> |
11 <requirement type="package" version="0.14.2">scikit-image</requirement> | 20 <requirement type="package" version="1.26.4">numpy</requirement> |
12 <requirement type="package" version="0.23.4">pandas</requirement> | 21 <requirement type="package" version="1.2.4">pandas</requirement> |
13 <requirement type="package" version="0.15.1">tifffile</requirement> | 22 <requirement type="package" version="2024.6.18">tifffile</requirement> |
14 </requirements> | 23 <requirement type="package" version="0.3.1">giatools</requirement> |
15 <command detect_errors="aggressive"> | 24 </requirements> |
16 <![CDATA[ | 25 <command detect_errors="aggressive"><![CDATA[ |
17 python '$__tool_directory__/points2label.py' '$input' '$output' '$org_file' $has_header | 26 |
18 ]]> | 27 python '$__tool_directory__/points2label.py' |
19 </command> | 28 '$input' |
20 <inputs> | 29 '$output' |
21 <param name="input" type="data" format="tabular" label="Point CSV file"/> | 30 $shapex |
22 <param name="org_file" type="data" format="tiff" label="Original label image file"/> | 31 $shapey |
23 <param name="has_header" type="boolean" checked="false" truevalue="--has_header True" falsevalue="" optional="true" label="Does point file contain header?" /> | 32 $has_header |
33 $swap_xy | |
34 $binary | |
35 | |
36 ]]></command> | |
37 <inputs> | |
38 <param name="input" type="data" format="tabular" label="Tabular list of points"/> | |
39 <param name="shapex" type="integer" value="500" min="1" label="Width of output image" /> | |
40 <param name="shapey" type="integer" value="500" min="1" label="Height of output image" /> | |
41 <param name="has_header" type="boolean" checked="true" truevalue="--has_header True" falsevalue="" optional="true" label="Tabular list of points has header" help="Turning this off will ignore the first row and assume that the X and Y coordinates correspond to the first and second column, respectively." /> | |
42 <param name="swap_xy" type="boolean" checked="false" falsevalue="" truevalue="--swap_xy True" optional="true" label="Swap X and Y coordinates" help="Swap the X and Y coordinates, regardless of whether the tabular list has a header or not." /> | |
43 <param name="binary" type="boolean" checked="false" truevalue="--binary True" falsevalue="" optional="true" label="Produce binary image" help="Use the same label for all points (65535)." /> | |
24 </inputs> | 44 </inputs> |
25 <outputs> | 45 <outputs> |
26 <data name="output" format="tiff"/> | 46 <data name="output" format="tiff" /> |
27 </outputs> | 47 </outputs> |
28 <tests> | 48 <tests> |
49 <!-- Binary / TSV without header --> | |
29 <test> | 50 <test> |
30 <param name="input" value="points.tsv"/> | 51 <param name="input" value="input1.tsv" /> |
31 <param name="org_file" value="galaxyIcon_noText.tif"/> | 52 <param name="shapex" value="30" /> |
32 <output name="output" file="out.tif" ftype="tiff" compare="sim_size"/> | 53 <param name="shapey" value="20" /> |
54 <param name="has_header" value="false" /> | |
55 <param name="swap_xy" value="true" /> | |
56 <param name="binary" value="true" /> | |
57 <expand macro="tests/binary_image_diff" name="output" value="output1_binary.tif" ftype="tiff" /> | |
58 </test> | |
59 <!-- Binary / TSV with header --> | |
60 <test> | |
61 <param name="input" value="input2.tsv" /> | |
62 <param name="shapex" value="205" /> | |
63 <param name="shapey" value="84" /> | |
64 <param name="has_header" value="true" /> | |
65 <param name="swap_xy" value="false" /> | |
66 <param name="binary" value="true" /> | |
67 <expand macro="tests/binary_image_diff" name="output" value="output2_binary.tif" ftype="tiff" /> | |
68 </test> | |
69 <!-- Labeled / TSV with header --> | |
70 <test> | |
71 <param name="input" value="input2.tsv" /> | |
72 <param name="shapex" value="205" /> | |
73 <param name="shapey" value="84" /> | |
74 <param name="has_header" value="true" /> | |
75 <param name="swap_xy" value="false" /> | |
76 <param name="binary" value="false" /> | |
77 <expand macro="tests/label_image_diff" name="output" value="output2.tif" ftype="tiff" /> | |
78 </test> | |
79 <!-- Binary / TSV with header / TSV with labels --> | |
80 <test> | |
81 <param name="input" value="input3.tsv" /> | |
82 <param name="shapex" value="200" /> | |
83 <param name="shapey" value="100" /> | |
84 <param name="has_header" value="true" /> | |
85 <param name="swap_xy" value="false" /> | |
86 <param name="binary" value="true" /> | |
87 <expand macro="tests/binary_image_diff" name="output" value="output3_binary.tif" ftype="tiff" /> | |
88 </test> | |
89 <!-- Labeled / TSV with header / TSV with labels --> | |
90 <test> | |
91 <param name="input" value="input3.tsv" /> | |
92 <param name="shapex" value="200" /> | |
93 <param name="shapey" value="100" /> | |
94 <param name="has_header" value="true" /> | |
95 <param name="swap_xy" value="false" /> | |
96 <param name="binary" value="false" /> | |
97 <expand macro="tests/label_image_diff" name="output" value="output3.tif" ftype="tiff" /> | |
33 </test> | 98 </test> |
34 </tests> | 99 </tests> |
35 <help> | 100 <help> |
36 **What it does** | |
37 | 101 |
38 This tool converts points to a label image. | 102 **Converts a tabular list of points to a label map by rasterizing the point coordinates.** |
103 | |
104 The created image is a single-channel image with 16 bits per pixel (unsigned integer). The points are | |
105 rasterized with unique labels, or the value 65535 (white) for binary image output. Pixels not corresponding to | |
106 any points in the tabular file are assigned the value 0 (black). | |
107 | |
108 The tabular list of points can either be header-less. In this case, the first and second columns are expected | |
109 to be the X and Y coordinates, respectively. Otherwise, if a header is present, it is searched for the | |
110 following column names: | |
111 | |
112 - ``pos_x`` or ``POS_X``: This column corresponds to the X coordinates. | |
113 - ``pos_y`` or ``POS_Y``: This column corresponds to the Y coordinates. | |
114 - If a ``radius`` or ``RADIUS`` column is present, then the points will be rasterized as circles of the | |
115 corresponding radii. | |
116 - If a ``label`` or ``LABEL`` column is present, then the corresponding labels will be used for rasterization | |
117 (unless "Produce binary image" is activated). Different points are allowed to use the same label. | |
118 | |
39 </help> | 119 </help> |
40 <citations> | 120 <citations> |
41 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> | 121 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> |
42 </citations> | 122 </citations> |
43 </tool> | 123 </tool> |