annotate image_math.xml @ 2:48fa3ac55df2 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c86a1b93cb7732f7331a981d13465653cc1a2790
author imgteam
date Wed, 24 Apr 2024 08:12:29 +0000
parents f8b7770cbca5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
1 <tool id="image_math" name="Process images using arithmetic expressions" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
2 <description>with NumPy</description>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
3 <macros>
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
4 <import>creators.xml</import>
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
5 <import>tests.xml</import>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
6 <token name="@TOOL_VERSION@">1.26.4</token>
2
48fa3ac55df2 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c86a1b93cb7732f7331a981d13465653cc1a2790
imgteam
parents: 1
diff changeset
7 <token name="@VERSION_SUFFIX@">2</token>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
8 </macros>
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
9 <creator>
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
10 <expand macro="creators/bmcv"/>
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
11 </creator>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
12 <edam_operations>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
13 <edam_operation>operation_3443</edam_operation>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
14 </edam_operations>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
15 <requirements>
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
16 <requirement type="package" version="@TOOL_VERSION@">numpy</requirement>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
17 <requirement type="package" version="0.22.0">scikit-image</requirement>
2
48fa3ac55df2 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c86a1b93cb7732f7331a981d13465653cc1a2790
imgteam
parents: 1
diff changeset
18 <requirement type="package" version="0.1">giatools</requirement>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
19 </requirements>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
20 <command><![CDATA[
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
21
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
22 ## Inputs
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
23
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
24 python '$__tool_directory__/image_math.py'
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
25 --expression='$expression'
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
26 #for $item in $inputs:
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
27 --input='$item.name:$item.image'
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
28 #end for
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
29
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
30 ## Outputs
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
31
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
32 --output='./result.tiff'
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
33
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
34 ]]>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
35 </command>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
36 <inputs>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
37 <param argument="--expression" type="text" label="Expression" optional="false">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
38 <validator type="regex">^[a-zA-Z0-9-_\*\+ \(\)/]+$</validator>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
39 </param>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
40 <repeat name="inputs" title="Input images" min="1">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
41 <param name="image" type="data" format="png,tiff" label="Image" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
42 <param name="name" type="text" label="Variable for representation of the image within the expression" optional="false">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
43 <validator type="regex">^[a-zA-Z_][a-zA-Z0-9_]*$</validator>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
44 </param>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
45 </repeat>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
46 </inputs>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
47 <outputs>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
48 <data format="tiff" name="result" from_work_dir="result.tiff" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
49 </outputs>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
50 <tests>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
51 <!-- Multiplication with a scalar -->
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
52 <test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
53 <param name="expression" value="input1 * 2" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
54 <repeat name="inputs">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
55 <param name="image" value="input1.tiff" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
56 <param name="name" value="input1" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
57 </repeat>
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
58 <expand macro="tests/intensity_image_diff" name="result" value="input1_times_2.tiff" ftype="tiff"/>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
59 </test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
60 <!-- Unary negation operator -->
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
61 <test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
62 <param name="expression" value="-input1" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
63 <repeat name="inputs">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
64 <param name="image" value="input1.tiff" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
65 <param name="name" value="input1" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
66 </repeat>
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
67 <expand macro="tests/intensity_image_diff" name="result" value="minus_input1.tiff" ftype="tiff"/>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
68 </test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
69 <!-- Binary addition, neutral element, addition with scalar -->
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
70 <test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
71 <param name="expression" value="input1 + input2 + 1" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
72 <repeat name="inputs">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
73 <param name="image" value="input1.tiff" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
74 <param name="name" value="input1" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
75 </repeat>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
76 <repeat name="inputs">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
77 <param name="image" value="minus_input1.tiff" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
78 <param name="name" value="input2" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
79 </repeat>
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
80 <expand macro="tests/intensity_image_diff" name="result" value="ones.tiff" ftype="tiff"/>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
81 </test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
82 <!-- Parentheses -->
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
83 <test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
84 <param name="expression" value="(input1 + input2) / 2" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
85 <repeat name="inputs">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
86 <param name="image" value="input1.tiff" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
87 <param name="name" value="input1" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
88 </repeat>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
89 <repeat name="inputs">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
90 <param name="image" value="ones.tiff" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
91 <param name="name" value="input2" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
92 </repeat>
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
93 <expand macro="tests/intensity_image_diff" name="result" value="half_of_input1_plus_one.tiff" ftype="tiff"/>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
94 </test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
95 <!-- Abs -->
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
96 <test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
97 <param name="expression" value="abs(input)" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
98 <repeat name="inputs">
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
99 <param name="image" value="input1.tiff" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
100 <param name="name" value="input" />
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
101 </repeat>
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
102 <expand macro="tests/intensity_image_diff" name="result" value="input1_abs.tiff" ftype="tiff"/>
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
103 </test>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
104 </tests>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
105 <help>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
106
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
107 **Processes images according to pixel-wise arithmetic expressions.**
0
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
108
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
109 The supported pixel-wise expressions are:
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
110
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
111 - Addition, subtraction, multiplication, and division (``+``, ``-``, ``*``, ``/``)
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
112 - Integer division (e.g., ``input // 2``)
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
113 - Power (e.g., ``input ** 2``)
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
114 - Negation (e.g., ``-input``)
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
115 - Absolute values (e.g., ``abs(input)``)
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
116 - Square root (e.g., ``sqrt(input)``)
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
117 - Combinations of the above (also using parentheses)
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
118
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
119 Examples:
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
120
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
121 - **Negate an image.**
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
122 Expression: ``-image``
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
123 where ``image`` is an arbitrary input image.
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
124
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
125 - **Mean of two images.**
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
126 Expression: ``(image1 + image2) / 2``
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
127 where ``image1`` and `image2` are two arbitrary input images.
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
128
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
129 - **Perform division avoiding division-by-zero.**
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
130 Expression: ``image1 / (abs(image2) + 1e-8)``
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
131 where ``image1`` and `image2` are two arbitrary input images.
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
132
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
133 </help>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
134 <citations>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
135 <citation type="doi">10.1038/s41586-020-2649-2</citation>
33b2ca53a566 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit b356d76025941b691c156f8ff931cd759d35b107
imgteam
parents:
diff changeset
136 </citations>
1
f8b7770cbca5 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
imgteam
parents: 0
diff changeset
137 </tool>