Mercurial > repos > imgteam > concat_channels
view concat_channels.xml @ 3:4c43875c790c draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/concat_channels/ commit c045f067a57e8308308cf6329060c7ccd3fc372f
author | imgteam |
---|---|
date | Thu, 04 Apr 2024 15:25:29 +0000 |
parents | 212627bfb759 |
children | 2592a29a785e |
line wrap: on
line source
<tool id="ip_concat_channels" name="Concatenate images or channels" version="0.3-0" profile="20.05"> <description></description> <macros> <import>creators.xml</import> <import>tests.xml</import> </macros> <creator> <expand macro="creators/bmcv"/> </creator> <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.3">scikit-image</requirement> <requirement type="package" version="1.24.1">numpy</requirement> <requirement type="package" version="2021.7.2">tifffile</requirement> </requirements> <command detect_errors="aggressive"><![CDATA[ python '$__tool_directory__/concat_channels.py' #for $input in $inputs '$input' #end for $mode -o '$output' --axis '$axis' ]]></command> <inputs> <param name="inputs" type="data" multiple="true" format="tiff,png" label="Images to concatenate"/> <param name="axis" type="integer" min="0" value="0" label="Concatenation axis" help="The images will be concatenated along this axis. For a 2-D image, a value of 0 corresponds to horizontal concatenation, and a value of 1 to vertical concatenation. For an RGB image, a value of 2 corresponds to concatenation of the channels of the images."/> <param name="mode" type="select" label="Scaling of values" help="If the brightness is to be preserved (default), then the values will be scaled between 0 and 1, and the pixel type will be float."> <option value="" selected="true">Preserve brightness</option> <option value="--preserve_values">Preserve range of values</option> </param> </inputs> <outputs> <data format="tiff" name="output"/> </outputs> <tests> <!-- Test with "preserve brightness" --> <test> <param name="inputs" value="input1_uint8.png,input2_float.tiff"/> <param name="axis" value="0"/> <param name="mode" value=""/> <expand macro="tests/intensity_image_diff" name="output" value="res_preserve_brightness.tiff" ftype="tiff"/> </test> <!-- Test with "preserve range of values" --> <test> <param name="inputs" value="input1_uint8.png,input2_float.tiff"/> <param name="axis" value="0"/> <param name="mode" value="--preserve_values"/> <expand macro="tests/intensity_image_diff" name="output" value="res_preserve_values.tiff" ftype="tiff"> <!-- The input files have values ranging between 0 and 255. Below, we use an assertion in addition to the `image_diff` comparison, to ensure that the range of values is preserved. The motiviation behind this is that the expectation images are usually checked visually, which means that the `image_diff` comparison is likely to ensure that the brightness of the image is correct, thus it's good to double-check the range of values. --> <has_image_mean_intensity min="0" max="255"/> </expand> </test> </tests> <help> **Concatenates images along arbitrary axes.** This can be used, for example, to spatially concatenate images, or along their channels. This tool either preserves the image brightness, or the range of values. In general, both cannot be preserved when concatenating images of different pixel types (e.g., uint8 and uint16). </help> <citations> <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> </citations> </tool>