Mercurial > repos > imgteam > image_math
comparison image_math.xml @ 1:f8b7770cbca5 draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/image_math commit c045f067a57e8308308cf6329060c7ccd3fc372f
author | imgteam |
---|---|
date | Thu, 04 Apr 2024 15:25:35 +0000 |
parents | 33b2ca53a566 |
children | 48fa3ac55df2 |
comparison
equal
deleted
inserted
replaced
0:33b2ca53a566 | 1:f8b7770cbca5 |
---|---|
1 <tool id="image_math" name="Process images using arithmetic expressions" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0"> | 1 <tool id="image_math" name="Process images using arithmetic expressions" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0"> |
2 <description>with NumPy</description> | 2 <description>with NumPy</description> |
3 <macros> | 3 <macros> |
4 <import>creators.xml</import> | |
5 <import>tests.xml</import> | |
4 <token name="@TOOL_VERSION@">1.26.4</token> | 6 <token name="@TOOL_VERSION@">1.26.4</token> |
5 <token name="@VERSION_SUFFIX@">0</token> | 7 <token name="@VERSION_SUFFIX@">1</token> |
6 </macros> | 8 </macros> |
9 <creator> | |
10 <expand macro="creators/bmcv"/> | |
11 </creator> | |
7 <edam_operations> | 12 <edam_operations> |
8 <edam_operation>operation_3443</edam_operation> | 13 <edam_operation>operation_3443</edam_operation> |
9 </edam_operations> | 14 </edam_operations> |
10 <requirements> | 15 <requirements> |
11 <requirement type="package" version="1.26.4">numpy</requirement> | 16 <requirement type="package" version="@TOOL_VERSION@">numpy</requirement> |
12 <requirement type="package" version="0.22.0">scikit-image</requirement> | 17 <requirement type="package" version="0.22.0">scikit-image</requirement> |
13 </requirements> | 18 </requirements> |
14 <command><![CDATA[ | 19 <command><![CDATA[ |
15 | 20 |
16 ## Inputs | 21 ## Inputs |
47 <param name="expression" value="input1 * 2" /> | 52 <param name="expression" value="input1 * 2" /> |
48 <repeat name="inputs"> | 53 <repeat name="inputs"> |
49 <param name="image" value="input1.tiff" /> | 54 <param name="image" value="input1.tiff" /> |
50 <param name="name" value="input1" /> | 55 <param name="name" value="input1" /> |
51 </repeat> | 56 </repeat> |
52 <output name="result" value="input1_times_2.tiff" ftype="tiff" compare="sim_size" delta="0" /> | 57 <expand macro="tests/intensity_image_diff" name="result" value="input1_times_2.tiff" ftype="tiff"/> |
53 </test> | 58 </test> |
54 <!-- Unary negation operator --> | 59 <!-- Unary negation operator --> |
55 <test> | 60 <test> |
56 <param name="expression" value="-input1" /> | 61 <param name="expression" value="-input1" /> |
57 <repeat name="inputs"> | 62 <repeat name="inputs"> |
58 <param name="image" value="input1.tiff" /> | 63 <param name="image" value="input1.tiff" /> |
59 <param name="name" value="input1" /> | 64 <param name="name" value="input1" /> |
60 </repeat> | 65 </repeat> |
61 <output name="result" value="minus_input1.tiff" ftype="tiff" compare="sim_size" delta="0" /> | 66 <expand macro="tests/intensity_image_diff" name="result" value="minus_input1.tiff" ftype="tiff"/> |
62 </test> | 67 </test> |
63 <!-- Binary addition, neutral element, addition with scalar --> | 68 <!-- Binary addition, neutral element, addition with scalar --> |
64 <test> | 69 <test> |
65 <param name="expression" value="input1 + input2 + 1" /> | 70 <param name="expression" value="input1 + input2 + 1" /> |
66 <repeat name="inputs"> | 71 <repeat name="inputs"> |
69 </repeat> | 74 </repeat> |
70 <repeat name="inputs"> | 75 <repeat name="inputs"> |
71 <param name="image" value="minus_input1.tiff" /> | 76 <param name="image" value="minus_input1.tiff" /> |
72 <param name="name" value="input2" /> | 77 <param name="name" value="input2" /> |
73 </repeat> | 78 </repeat> |
74 <output name="result" value="ones.tiff" ftype="tiff" compare="sim_size" delta="0" /> | 79 <expand macro="tests/intensity_image_diff" name="result" value="ones.tiff" ftype="tiff"/> |
75 </test> | 80 </test> |
76 <!-- Parentheses --> | 81 <!-- Parentheses --> |
77 <test> | 82 <test> |
78 <param name="expression" value="(input1 + input2) / 2" /> | 83 <param name="expression" value="(input1 + input2) / 2" /> |
79 <repeat name="inputs"> | 84 <repeat name="inputs"> |
82 </repeat> | 87 </repeat> |
83 <repeat name="inputs"> | 88 <repeat name="inputs"> |
84 <param name="image" value="ones.tiff" /> | 89 <param name="image" value="ones.tiff" /> |
85 <param name="name" value="input2" /> | 90 <param name="name" value="input2" /> |
86 </repeat> | 91 </repeat> |
87 <output name="result" value="half_of_input1_plus_one.tiff" ftype="tiff" compare="sim_size" delta="0" /> | 92 <expand macro="tests/intensity_image_diff" name="result" value="half_of_input1_plus_one.tiff" ftype="tiff"/> |
88 </test> | 93 </test> |
89 <!-- Abs --> | 94 <!-- Abs --> |
90 <test> | 95 <test> |
91 <param name="expression" value="abs(input)" /> | 96 <param name="expression" value="abs(input)" /> |
92 <repeat name="inputs"> | 97 <repeat name="inputs"> |
93 <param name="image" value="input1.tiff" /> | 98 <param name="image" value="input1.tiff" /> |
94 <param name="name" value="input" /> | 99 <param name="name" value="input" /> |
95 </repeat> | 100 </repeat> |
96 <output name="result" value="input1_abs.tiff" ftype="tiff" compare="sim_size" delta="0" /> | 101 <expand macro="tests/intensity_image_diff" name="result" value="input1_abs.tiff" ftype="tiff"/> |
97 </test> | 102 </test> |
98 </tests> | 103 </tests> |
99 <help> | 104 <help> |
100 | 105 |
101 This tool processes images according to pixel-wise arithmetic expressions. | 106 **Processes images according to pixel-wise arithmetic expressions.** |
102 | 107 |
103 The supported pixel-wise expressions are: | 108 The supported pixel-wise expressions are: |
104 | 109 |
105 - Addition, subtraction, multiplication, and division (``+``, ``-``, ``*``, ``/``) | 110 - Addition, subtraction, multiplication, and division (``+``, ``-``, ``*``, ``/``) |
106 - Integer division (e.g., ``input // 2``) | 111 - Integer division (e.g., ``input // 2``) |