Mercurial > repos > imgteam > overlay_images
comparison overlay_images.xml @ 3:eb173a1fabc4 draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/overlay_images/ commit 574caf027453f080a7f86f80eae9775ed1c8afa0
author | imgteam |
---|---|
date | Mon, 23 Sep 2024 10:26:14 +0000 |
parents | f42d21fe65d8 |
children |
comparison
equal
deleted
inserted
replaced
2:f42d21fe65d8 | 3:eb173a1fabc4 |
---|---|
1 <tool id="ip_overlay_images" name="Overlay Images" version="0.0.3" profile="20.05"> | 1 <tool id="ip_overlay_images" name="Overlay images" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05"> |
2 <description>for visualization</description> | 2 <description></description> |
3 <macros> | |
4 <import>creators.xml</import> | |
5 <import>tests.xml</import> | |
6 <token name="@TOOL_VERSION@">0.0.4</token> | |
7 <token name="@VERSION_SUFFIX@">4</token> | |
8 </macros> | |
9 <creator> | |
10 <expand macro="creators/bmcv"/> | |
11 <expand macro="creators/thawn"/> | |
12 </creator> | |
13 <edam_operations> | |
14 <edam_operation>operation_3443</edam_operation> | |
15 </edam_operations> | |
16 <xrefs> | |
17 <xref type="bio.tools">galaxy_image_analysis</xref> | |
18 </xrefs> | |
3 <requirements> | 19 <requirements> |
4 <requirement type="package" version="0.18.1">scikit-image</requirement> | 20 <requirement type="package" version="0.18.1">scikit-image</requirement> |
5 <requirement type="package" version="3.3.4">matplotlib</requirement> | 21 <requirement type="package" version="3.3.4">matplotlib</requirement> |
6 <requirement type="package" version="2020.10.1">tifffile</requirement> | 22 <requirement type="package" version="2020.10.1">tifffile</requirement> |
7 <requirement type="package" version="1.20.2">numpy</requirement> | 23 <requirement type="package" version="1.21">numpy</requirement> |
24 <requirement type="package" version="10.4.0">pillow</requirement> | |
25 <requirement type="package" version="0.1">giatools</requirement> | |
8 </requirements> | 26 </requirements> |
9 <command detect_errors="aggressive"> | 27 <command detect_errors="aggressive"> |
10 <![CDATA[ | 28 <![CDATA[ |
11 python '$__tool_directory__/overlay_images.py' | 29 python '$__tool_directory__/overlay_images.py' |
12 '$method_option.im1' '$method_option.im2' ./output.tif | 30 '$method_option.im1' '$method_option.im2' |
31 #if $method_option.method == "seg_contour" | |
32 ./output.png | |
33 #else | |
34 ./output.tif | |
35 #end if | |
13 --method $method_option.method | 36 --method $method_option.method |
14 #if $method_option.method == "blending" | 37 #if $method_option.method == "blending" |
15 --alpha $method_option.alpha | 38 --alpha $method_option.alpha |
16 #elif $method_option.method == "seg_contour" | 39 #elif $method_option.method == "seg_contour" |
17 --thickness $method_option.thickness | 40 --thickness $method_option.thickness |
21 #end if | 44 #end if |
22 ]]> | 45 ]]> |
23 </command> | 46 </command> |
24 <inputs> | 47 <inputs> |
25 <conditional name="method_option"> | 48 <conditional name="method_option"> |
26 <param name="method" type="select" label="How to visualize the overlay?"> | 49 <param name="method" type="select" label="Type of the overlay"> |
27 <option value="coloc_vis" selected="True">Colocalization</option> | 50 <option value="coloc_vis" selected="True">Colocalization</option> |
28 <option value="blending">Blending</option> | 51 <option value="blending">Linear blending</option> |
29 <option value="seg_contour">Segmentation mask over image</option> | 52 <option value="seg_contour">Segmentation contours over image</option> |
30 </param> | 53 </param> |
31 <when value="coloc_vis"> | 54 <when value="coloc_vis"> |
32 <param name="im1" type="data" format="tiff,png" label="Image #1 (red channel)" /> | 55 <param name="im1" type="data" format="tiff,png" label="Image 1 (red channel)" /> |
33 <param name="im2" type="data" format="tiff,png" label="Image #2 (green channel)" /> | 56 <param name="im2" type="data" format="tiff,png" label="Image 2 (green channel)" /> |
34 </when> | 57 </when> |
35 <when value="blending"> | 58 <when value="blending"> |
36 <param name="im1" type="data" format="tiff,png" label="Image #1" /> | 59 <param name="im1" type="data" format="tiff,png" label="Image 1" /> |
37 <param name="im2" type="data" format="tiff,png" label="Image #2" /> | 60 <param name="im2" type="data" format="tiff,png" label="Image 2" /> |
38 <param name="alpha" type="float" value="0.5" min="0.0" max="1.0" label="The weight for blending: I_out = (1 - w) * I_1 + w * I_2."/> | 61 <param name="alpha" type="float" value="0.5" min="0.0" max="1.0" label="The weight for blending: result = (1 - weight) * image1 + weight * image2." /> |
39 </when> | 62 </when> |
40 <when value="seg_contour"> | 63 <when value="seg_contour"> |
41 <param name="im1" type="data" format="tiff,png" label="Image" /> | 64 <param name="im1" type="data" format="tiff,png" label="Intensity image" /> |
42 <param name="im2" type="data" format="tiff,png" label="Label image" /> | 65 <param name="im2" type="data" format="tiff,png" label="Label map" /> |
43 <param name="thickness" type="integer" value="2" min="1" label="Contour thickness (in pixels)" /> | 66 <param name="thickness" type="integer" value="2" min="1" label="Contour thickness (in pixels)" /> |
44 <param name="color" type="color" value="#ff0000" label="Contour color"/> | 67 <param name="color" type="color" value="#ff0000" label="Contour color"/> |
45 <param argument="--show_label" type="boolean" checked='false' truevalue="--show_label" falsevalue="" label="Show labels" /> | 68 <param argument="--show_label" type="boolean" checked='false' truevalue="--show_label" falsevalue="" label="Show labels" /> |
46 <param name="label_color" type="color" value="#ffff00" label="Label color"/> | 69 <param name="label_color" type="color" value="#ffff00" label="Label color"/> |
47 </when> | 70 </when> |
48 </conditional> | 71 </conditional> |
49 </inputs> | 72 </inputs> |
50 <outputs> | 73 <outputs> |
51 <data format="tiff" name="out" from_work_dir="output.tif" /> | 74 <data format="tiff" name="out_tiff" from_work_dir="output.tif" label="${tool.name} on ${on_string} output:tiff"> |
75 <filter>method_option['method'] != 'seg_contour'</filter> | |
76 </data> | |
77 <data format="png" name="out_png" from_work_dir="output.png" label="${tool.name} on ${on_string} output:png"> | |
78 <filter>method_option['method'] == 'seg_contour'</filter> | |
79 </data> | |
52 </outputs> | 80 </outputs> |
53 <tests> | 81 <tests> |
54 <test> | 82 <test expect_num_outputs="1"> |
55 <param name="im1" value="mask1.tif"/> | 83 <param name="im1" value="mask1.tif"/> |
56 <param name="im2" value="mask1r.tif"/> | 84 <param name="im2" value="mask1r.tif"/> |
57 <param name="method" value="coloc_vis"/> | 85 <param name="method" value="coloc_vis"/> |
58 <output name="out" value="test1.tif" ftype="tiff" compare="sim_size" delta_frac="0.1"/> | 86 <expand macro="tests/intensity_image_diff" name="out_tiff" value="test1.tif" ftype="tiff"/> |
59 </test> | 87 </test> |
60 <test> | 88 <test expect_num_outputs="1"> |
61 <param name="im1" value="mask1.tif"/> | 89 <param name="im1" value="mask1.tif"/> |
62 <param name="im2" value="mask1r.tif"/> | 90 <param name="im2" value="mask1r.tif"/> |
63 <param name="method" value="blending"/> | 91 <param name="method" value="blending"/> |
64 <param name="alpha" value="0.3"/> | 92 <param name="alpha" value="0.3"/> |
65 <output name="out" value="test2.tif" ftype="tiff" compare="sim_size" delta_frac="0.1"/> | 93 <expand macro="tests/intensity_image_diff" name="out_tiff" value="test2.tif" ftype="tiff"/> |
66 </test> | 94 </test> |
67 <test> | 95 <test expect_num_outputs="1"> |
68 <param name="im1" value="sample1.tif"/> | 96 <param name="im1" value="sample1_uint8.tif"/> |
69 <param name="im2" value="mask1.tif"/> | 97 <param name="im2" value="mask1.tif"/> |
70 <param name="method" value="seg_contour"/> | 98 <param name="method" value="seg_contour"/> |
71 <param name="thickness" value="2"/> | 99 <param name="thickness" value="2"/> |
72 <param name="color" value="#ff0000"/> | 100 <param name="color" value="#ff0000"/> |
73 <param name="show_label" value="--show_label"/> | 101 <param name="show_label" value="--show_label"/> |
74 <output name="out" value="test3.tif" ftype="tiff" compare="sim_size" delta_frac="0.1"/> | 102 <expand macro="tests/intensity_image_diff" name="out_png" value="test3.png" ftype="png"/> |
75 </test> | 103 </test> |
76 <test> | 104 <test expect_num_outputs="1"><!-- segmentation overlay, 8bit test --> |
77 <param name="im1" value="sample1.tif"/> | 105 <param name="im1" value="sample1_uint8.tif"/> |
78 <param name="im2" value="mask2.tif"/> | 106 <param name="im2" value="mask2.tif"/> |
79 <param name="method" value="seg_contour"/> | 107 <param name="method" value="seg_contour"/> |
80 <param name="thickness" value="2"/> | 108 <param name="thickness" value="2"/> |
81 <param name="color" value="#ff0000"/> | 109 <param name="color" value="#ff0000"/> |
82 <output name="out" value="test4.tif" ftype="tiff" compare="sim_size" delta_frac="0.1"/> | 110 <expand macro="tests/intensity_image_diff" name="out_png" value="test4.png" ftype="png"/> |
111 </test> | |
112 <test expect_num_outputs="1"><!-- segmentation overlay, 16bit test --> | |
113 <param name="im1" value="sample1_uint16.tif"/> | |
114 <param name="im2" value="mask2.tif"/> | |
115 <param name="method" value="seg_contour"/> | |
116 <param name="thickness" value="2"/> | |
117 <param name="color" value="#ff0000"/> | |
118 <expand macro="tests/intensity_image_diff" name="out_png" value="test4.png" ftype="png" eps="1"/> | |
119 </test> | |
120 <test expect_num_outputs="1"><!-- segmentation overlay, 8bit RGB test --> | |
121 <param name="im1" value="sample1_uint8_rgb.png"/> | |
122 <param name="im2" value="mask2.tif"/> | |
123 <param name="method" value="seg_contour"/> | |
124 <param name="thickness" value="2"/> | |
125 <param name="color" value="#ff0000"/> | |
126 <expand macro="tests/intensity_image_diff" name="out_png" value="test5.png" ftype="png"/> | |
83 </test> | 127 </test> |
84 </tests> | 128 </tests> |
85 <help> | 129 <help><![CDATA[ |
86 **What it does** | |
87 | 130 |
88 This tool overlays two image to visualize 1) image blending, 2) colocalization, or 3) a segmentation mask over an image. | 131 **Overlays two images for visualization.** |
89 </help> | 132 |
133 This tool overlays two image to visualize *linear image blending*, *colocalization*, or *segmentation contours* | |
134 over an intensity image. For *image blending* and *colocalization*, the input images must be single-channel 2-D | |
135 images. For *segmentation contours*, the intensity must be a 2-D single-channel or 2-D RGB image. | |
136 | |
137 ]]></help> | |
90 <citations> | 138 <citations> |
91 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> | 139 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> |
92 </citations> | 140 </citations> |
93 </tool> | 141 </tool> |