comparison overlay_images.xml @ 0:589af0005df5 draft

"planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/overlay_images/ commit 736949b5fb325cc7880d0ff0bb13b78115b9f81c"
author imgteam
date Sat, 26 Feb 2022 15:16:10 +0000
parents
children bf590a9733ed
comparison
equal deleted inserted replaced
-1:000000000000 0:589af0005df5
1 <tool id="ip_overlay_images" name="Overlay Images" version="0.0.1" profile="20.05">
2 <description>for visualization</description>
3 <requirements>
4 <requirement type="package" version="0.18.1">scikit-image</requirement>
5 <requirement type="package" version="3.3.4">matplotlib</requirement>
6 <requirement type="package" version="2020.10.1">tifffile</requirement>
7 <requirement type="package" version="1.20.2">numpy</requirement>
8 </requirements>
9 <command detect_errors="aggressive">
10 <![CDATA[
11 python '$__tool_directory__/overlay_images.py'
12 '$im1' '$im2' ./output.tif
13 --method '$method_option.method'
14 #if '$method_option.method' == 'blending':
15 --alpha '$alpha'
16 #elif '$method_option.method' == 'seg_contour':
17 --thickness '$thickness'
18 --color '$color'
19 $show_label
20 #end if
21 ]]>
22 </command>
23 <inputs>
24 <conditional name="method_option">
25 <param name="method" type="select" label="How to visualize the overlay?">
26 <option value="coloc_vis" selected="True">Colocalization</option>
27 <option value="blending">Blending</option>
28 <option value="seg_contour">Segmentation mask over image</option>
29 </param>
30 <when value="coloc_vis">
31 <param name="im1" type="data" format="tiff,png" label="Image #1 (red channel)" />
32 <param name="im2" type="data" format="tiff,png" label="Image #2 (green channel)" />
33 </when>
34 <when value="blending">
35 <param name="im1" type="data" format="tiff,png" label="Image #1" />
36 <param name="im2" type="data" format="tiff,png" label="Image #2" />
37 <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."/>
38 </when>
39 <when value="seg_contour">
40 <param name="im1" type="data" format="tiff,png" label="Image" />
41 <param name="im2" type="data" format="tiff,png" label="Label image" />
42 <param name="thickness" type="float" value="0.3" label="Contour thickness" />
43 <param name="color" type="color" value="#ff0000" label="Contour color"/>
44 <param argument="--show_label" type="boolean" checked='false' truevalue="--show_label" falsevalue="" label="Show labels" />
45 </when>
46 </conditional>
47 </inputs>
48 <outputs>
49 <data format="tiff" name="out" from_work_dir="output.tif" />
50 </outputs>
51 <tests>
52 <test>
53 <param name="im1" value="mask1.tif"/>
54 <param name="im2" value="mask1r.tif"/>
55 <conditional name="method_option">
56 <param name="method" value="coloc_vis"/>
57 </conditional>
58 <output name="out" value="test1.tif" ftype="tiff" compare="sim_size" delta_frac="0.1"/>
59 </test>
60 <test>
61 <param name="im1" value="mask1.tif"/>
62 <param name="im2" value="mask1r.tif"/>
63 <conditional name="method_option">
64 <param name="method" value="blending"/>
65 </conditional>
66 <param name="alpha" value="0.3"/>
67 <output name="out" value="test2.tif" ftype="tiff" compare="sim_size" delta_frac="0.1"/>
68 </test>
69 <test>
70 <param name="im1" value="sample1.tif"/>
71 <param name="im2" value="mask1.tif"/>
72 <conditional name="method_option">
73 <param name="method" value="seg_contour"/>
74 </conditional>
75 <param name="thickness" value="0.4"/>
76 <param name="color" value="#ffaa00"/>
77 <param name="show_label" value="true"/>
78 <output name="out" value="test3.tif" ftype="tiff" compare="sim_size" delta="20000" delta_frac="0.2"/>
79 </test>
80 </tests>
81 <help>
82 **What it does**
83
84 This tool overlays two image to visualize 1) image blending, 2) colocalization, or 3) a segmentation mask over an image.
85 </help>
86 <citations>
87 </citations>
88 </tool>