Mercurial > repos > imgteam > morphological_operations
comparison morphological_operations.xml @ 0:f10112b317a1 draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/morphological_operations commit c6d2a4fb19b54c804029ae3d52eb9fb2619e4265
author | imgteam |
---|---|
date | Fri, 08 Mar 2024 11:00:41 +0000 |
parents | |
children | ad795d260ba8 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f10112b317a1 |
---|---|
1 <tool id="morphological_operations" name="Apply a morphological operation" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0"> | |
2 <description>with SciPy</description> | |
3 <macros> | |
4 <token name="@TOOL_VERSION@">1.12.0</token> | |
5 <token name="@VERSION_SUFFIX@">0</token> | |
6 </macros> | |
7 <edam_operations> | |
8 <edam_operation>operation_3443</edam_operation> | |
9 </edam_operations> | |
10 <xrefs> | |
11 <xref type="biii">scipy</xref> | |
12 </xrefs> | |
13 <requirements> | |
14 <requirement type="package" version="1.12.0">scipy</requirement> | |
15 <requirement type="package" version="0.22.0">scikit-image</requirement> | |
16 </requirements> | |
17 <command><![CDATA[ | |
18 | |
19 ## Inputs | |
20 | |
21 python '$__tool_directory__/morphological_operations.py' '$image' | |
22 --operation $operation | |
23 --selem-shape $selem_shape | |
24 --selem-size $selem_size | |
25 | |
26 ## Outputs | |
27 | |
28 ./result.tiff | |
29 | |
30 ]]> | |
31 </command> | |
32 <inputs> | |
33 <param name="image" type="data" format="png,tiff" label="Input image" /> | |
34 <param label="Morphological operation" argument="--operation" type="select"> | |
35 <option value="erosion" selected="True">Erosion</option> | |
36 <option value="dilation">Dilation</option> | |
37 <option value="opening">Opening</option> | |
38 <option value="closing">Closing</option> | |
39 <option value="fill_holes">Fill holes</option> | |
40 </param> | |
41 <param label="Structuring element" argument="--selem-shape" type="select"> | |
42 <option value="disk" selected="True">Disk</option> | |
43 <option value="square">Square</option> | |
44 </param> | |
45 <param label="Structuring element size" argument="--selem-size" type="integer" min="1" max="256" value="1" help="The radius of the disk, or the width of the square, in pixels." /> | |
46 </inputs> | |
47 <outputs> | |
48 <data format="tiff" name="result" from_work_dir="result.tiff" /> | |
49 </outputs> | |
50 <tests> | |
51 <!-- Test binary operations (input images with two distinct values) --> | |
52 <test> | |
53 <param name="image" value="input1.tiff" /> | |
54 <param name="operation" value="erosion" /> | |
55 <param name="selem_shape" value="disk" /> | |
56 <param name="selem_size" value="1" /> | |
57 <output name="result" value="output1_erosion.tiff" ftype="tiff" compare="sim_size" delta="10" /> | |
58 </test> | |
59 <test> | |
60 <param name="image" value="input1.tiff" /> | |
61 <param name="operation" value="dilation" /> | |
62 <param name="selem_shape" value="disk" /> | |
63 <param name="selem_size" value="2" /> | |
64 <output name="result" value="output1_dilation.tiff" ftype="tiff" compare="sim_size" delta="10" /> | |
65 </test> | |
66 <test> | |
67 <param name="image" value="input1.tiff" /> | |
68 <param name="operation" value="opening" /> | |
69 <param name="selem_shape" value="square" /> | |
70 <param name="selem_size" value="1" /> | |
71 <output name="result" value="output1_opening.tiff" ftype="tiff" compare="sim_size" delta="10" /> | |
72 </test> | |
73 <test> | |
74 <param name="image" value="input1.tiff" /> | |
75 <param name="operation" value="closing" /> | |
76 <param name="selem_shape" value="square" /> | |
77 <param name="selem_size" value="2" /> | |
78 <output name="result" value="output1_closing.tiff" ftype="tiff" compare="sim_size" delta="10" /> | |
79 </test> | |
80 <!-- Test intensity-based operations (more than two distinct values) --> | |
81 <test> | |
82 <param name="image" value="input3.png" /> | |
83 <param name="operation" value="erosion" /> | |
84 <param name="selem_shape" value="disk" /> | |
85 <param name="selem_size" value="1" /> | |
86 <output name="result" value="output3_erosion.tiff" ftype="tiff" compare="sim_size" delta="10" /> | |
87 </test> | |
88 <test> | |
89 <param name="image" value="input3.png" /> | |
90 <param name="operation" value="dilation" /> | |
91 <param name="selem_shape" value="disk" /> | |
92 <param name="selem_size" value="2" /> | |
93 <output name="result" value="output3_dilation.tiff" ftype="tiff" compare="sim_size" delta="10" /> | |
94 </test> | |
95 <test> | |
96 <param name="image" value="input3.png" /> | |
97 <param name="operation" value="opening" /> | |
98 <param name="selem_shape" value="square" /> | |
99 <param name="selem_size" value="1" /> | |
100 <output name="result" value="output3_opening.tiff" ftype="tiff" compare="sim_size" delta="10" /> | |
101 </test> | |
102 <test> | |
103 <param name="image" value="input3.png" /> | |
104 <param name="operation" value="closing" /> | |
105 <param name="selem_shape" value="square" /> | |
106 <param name="selem_size" value="2" /> | |
107 <output name="result" value="output3_closing.tiff" ftype="tiff" compare="sim_size" delta="10" /> | |
108 </test> | |
109 <!-- Test multi-channel image (with two distinct values per channel) --> | |
110 <test> | |
111 <param name="image" value="input2.png" /> | |
112 <param name="operation" value="fill_holes" /> | |
113 <param name="selem_shape" value="disk" /> | |
114 <param name="selem_size" value="1" /> | |
115 <output name="result" value="output2_fill_holes.tiff" ftype="tiff" compare="sim_size" delta="10" /> | |
116 </test> | |
117 </tests> | |
118 <help> | |
119 Applies a morphological operation to a 2-D image. | |
120 For multi-channel images, the operation is applied to each channel separately. | |
121 | |
122 The following operations are supported: | |
123 | |
124 - **Erosion:** Shrink bright areas. | |
125 - **Dilation:** Grow bright areas. | |
126 - **Opening:** Erosion followed by Dilation. Erases tiny bright spots. | |
127 - **Closing:** Dilation followed by Erosion. Erases tiny dark holes. | |
128 - **Fill holes:** Fills the holes (dark areas) in binary images. | |
129 </help> | |
130 <citations> | |
131 <citation type="doi">10.1038/s41592-019-0686-2</citation> | |
132 </citations> | |
133 </tool> |