comparison 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
comparison
equal deleted inserted replaced
2:212627bfb759 3:4c43875c790c
1 <tool id="ip_concat_channels" name="Concatenate images or channels" version="0.2-2"> 1 <tool id="ip_concat_channels" name="Concatenate images or channels" version="0.3-0" profile="20.05">
2 <description></description> 2 <description></description>
3 <macros>
4 <import>creators.xml</import>
5 <import>tests.xml</import>
6 </macros>
7 <creator>
8 <expand macro="creators/bmcv"/>
9 </creator>
3 <edam_operations> 10 <edam_operations>
4 <edam_operation>operation_3443</edam_operation> 11 <edam_operation>operation_3443</edam_operation>
5 </edam_operations> 12 </edam_operations>
6 <xrefs> 13 <xrefs>
7 <xref type="bio.tools">galaxy_image_analysis</xref> 14 <xref type="bio.tools">galaxy_image_analysis</xref>
8 </xrefs> 15 </xrefs>
9 <requirements> 16 <requirements>
10 <requirement type="package" version="0.14.2">scikit-image</requirement> 17 <requirement type="package" version="0.18.3">scikit-image</requirement>
11 <requirement type="package" version="1.15.4">numpy</requirement> 18 <requirement type="package" version="1.24.1">numpy</requirement>
12 <requirement type="package" version="0.15.1">tifffile</requirement> 19 <requirement type="package" version="2021.7.2">tifffile</requirement>
13 </requirements> 20 </requirements>
14 <command detect_errors="aggressive"> 21 <command detect_errors="aggressive"><![CDATA[
15 <![CDATA[ 22
16 python '$__tool_directory__/concat_channels.py' 23 python '$__tool_directory__/concat_channels.py'
24
17 #for $input in $inputs 25 #for $input in $inputs
18 '$input' 26 '$input'
19 #end for 27 #end for
28
29 $mode
30
20 -o '$output' --axis '$axis' 31 -o '$output' --axis '$axis'
21 ]]> 32
22 </command> 33 ]]></command>
23 <inputs> 34 <inputs>
24 <param name="inputs" type="data" multiple="true" format="tiff,png,jpg,bmp" label="Binary Image Files" help="one or multiple binary image fiels"/> 35 <param name="inputs" type="data" multiple="true" format="tiff,png" label="Images to concatenate"/>
25 <param name="axis" type="select" label="Concatenation Axis"> 36 <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."/>
26 <option value="0">0</option> 37 <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.">
27 <option value="2">2</option> 38 <option value="" selected="true">Preserve brightness</option>
39 <option value="--preserve_values">Preserve range of values</option>
28 </param> 40 </param>
29 </inputs> 41 </inputs>
30 <outputs> 42 <outputs>
31 <data format="tiff" name="output"/> 43 <data format="tiff" name="output"/>
32 </outputs> 44 </outputs>
33 <tests> 45 <tests>
46 <!-- Test with "preserve brightness" -->
34 <test> 47 <test>
35 <param name="inputs" value="sample1.png,sample2.png"/> 48 <param name="inputs" value="input1_uint8.png,input2_float.tiff"/>
36 <param name="axis" value="0"/> 49 <param name="axis" value="0"/>
37 <output name="output" value="res.tiff" ftype="tiff" compare="sim_size"/> 50 <param name="mode" value=""/>
51 <expand macro="tests/intensity_image_diff" name="output" value="res_preserve_brightness.tiff" ftype="tiff"/>
52 </test>
53 <!-- Test with "preserve range of values" -->
54 <test>
55 <param name="inputs" value="input1_uint8.png,input2_float.tiff"/>
56 <param name="axis" value="0"/>
57 <param name="mode" value="--preserve_values"/>
58 <expand macro="tests/intensity_image_diff" name="output" value="res_preserve_values.tiff" ftype="tiff">
59 <!--
60
61 The input files have values ranging between 0 and 255.
62
63 Below, we use an assertion in addition to the `image_diff` comparison, to ensure that the range of
64 values is preserved. The motiviation behind this is that the expectation images are usually checked
65 visually, which means that the `image_diff` comparison is likely to ensure that the brightness of
66 the image is correct, thus it's good to double-check the range of values.
67
68 -->
69 <has_image_mean_intensity min="0" max="255"/>
70 </expand>
38 </test> 71 </test>
39 </tests> 72 </tests>
40 <help> 73 <help>
41 **What it does**
42 74
43 This tool concatenates images. 75 **Concatenates images along arbitrary axes.**
76
77 This can be used, for example, to spatially concatenate images, or along their channels.
78
79 This tool either preserves the image brightness, or the range of values.
80 In general, both cannot be preserved when concatenating images of different pixel types (e.g., uint8 and uint16).
81
44 </help> 82 </help>
45 <citations> 83 <citations>
46 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> 84 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation>
47 </citations> 85 </citations>
48 </tool> 86 </tool>