Mercurial > repos > imgteam > overlay_images
view overlay_images.xml @ 3:22ff7c705a83 draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/overlay_images/ commit 8cd85b185acbfaa9ee6f4e9a389abc1f7b7c44bb
author | imgteam |
---|---|
date | Wed, 08 Nov 2023 19:57:15 +0000 |
parents | b74693340624 |
children | 37662cbf44b8 |
line wrap: on
line source
<tool id="ip_overlay_images" name="Overlay images" version="0.0.3-3" profile="20.05"> <description></description> <edam_operations> <edam_operation>operation_3443</edam_operation> </edam_operations> <xrefs> <xref type="bio.tools">galaxy_image_analysis</xref> </xrefs> <requirements> <requirement type="package" version="0.18.1">scikit-image</requirement> <requirement type="package" version="3.3.4">matplotlib</requirement> <requirement type="package" version="2020.10.1">tifffile</requirement> <requirement type="package" version="1.20.2">numpy</requirement> </requirements> <command detect_errors="aggressive"> <![CDATA[ python '$__tool_directory__/overlay_images.py' '$method_option.im1' '$method_option.im2' #if $method_option.method == "seg_contour" ./output.png #else ./output.tif #end if --method $method_option.method #if $method_option.method == "blending" --alpha $method_option.alpha #elif $method_option.method == "seg_contour" --thickness $method_option.thickness --color '$method_option.color' $method_option.show_label --label_color '$method_option.label_color' #end if ]]> </command> <inputs> <conditional name="method_option"> <param name="method" type="select" label="How to visualize the overlay?"> <option value="coloc_vis" selected="True">Colocalization</option> <option value="blending">Blending</option> <option value="seg_contour">Segmentation mask over image</option> </param> <when value="coloc_vis"> <param name="im1" type="data" format="tiff,png" label="Image #1 (red channel)" /> <param name="im2" type="data" format="tiff,png" label="Image #2 (green channel)" /> </when> <when value="blending"> <param name="im1" type="data" format="tiff,png" label="Image #1" /> <param name="im2" type="data" format="tiff,png" label="Image #2" /> <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."/> </when> <when value="seg_contour"> <param name="im1" type="data" format="tiff,png" label="Image" /> <param name="im2" type="data" format="tiff,png" label="Label image" /> <param name="thickness" type="integer" value="2" min="1" label="Contour thickness (in pixels)" /> <param name="color" type="color" value="#ff0000" label="Contour color"/> <param argument="--show_label" type="boolean" checked='false' truevalue="--show_label" falsevalue="" label="Show labels" /> <param name="label_color" type="color" value="#ffff00" label="Label color"/> </when> </conditional> </inputs> <outputs> <data format="tiff" name="out_tiff" from_work_dir="output.tif" label="${tool.name} on ${on_string} output:tiff"> <filter>method_option['method'] != 'seg_contour'</filter> </data> <data format="png" name="out_png" from_work_dir="output.png" label="${tool.name} on ${on_string} output:png"> <filter>method_option['method'] == 'seg_contour'</filter> </data> </outputs> <tests> <test expect_num_outputs="1"> <param name="im1" value="mask1.tif"/> <param name="im2" value="mask1r.tif"/> <param name="method" value="coloc_vis"/> <output name="out_tiff" value="test1.tif" ftype="tiff" compare="sim_size" delta_frac="0.1"/> </test> <test expect_num_outputs="1"> <param name="im1" value="mask1.tif"/> <param name="im2" value="mask1r.tif"/> <param name="method" value="blending"/> <param name="alpha" value="0.3"/> <output name="out_tiff" value="test2.tif" ftype="tiff" compare="sim_size" delta_frac="0.1"/> </test> <test expect_num_outputs="1"> <param name="im1" value="sample1.tif"/> <param name="im2" value="mask1.tif"/> <param name="method" value="seg_contour"/> <param name="thickness" value="2"/> <param name="color" value="#ff0000"/> <param name="show_label" value="--show_label"/> <output name="out_png" value="test3.png" ftype="png" compare="sim_size" delta_frac="0.1"/> </test> <test expect_num_outputs="1"> <param name="im1" value="sample1.tif"/> <param name="im2" value="mask2.tif"/> <param name="method" value="seg_contour"/> <param name="thickness" value="2"/> <param name="color" value="#ff0000"/> <output name="out_png" value="test4.png" ftype="png" compare="sim_size" delta_frac="0.1"/> </test> </tests> <help> **What it does** This tool overlays two image to visualize 1) image blending, 2) colocalization, or 3) a segmentation mask over an image. </help> <citations> <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> </citations> </tool>