comparison tools/median.xml @ 2:a44112280169

Uploaded
author tomasz-bednarz
date Mon, 25 Nov 2013 21:12:30 -0500
parents
children
comparison
equal deleted inserted replaced
1:795060eb6643 2:a44112280169
1 <tool id="filter_median" name="Filter - Median" version="1.0.2">
2
3 <description>Apply a median filter of the given size.</description>
4
5 <command interpreter="python">
6 #if (str($input.ext) == 'jpg'):
7 pil_filter.py $input $output median $size jpeg
8 #else:
9 pil_filter.py $input $output median $size ${input.ext}
10 #end if
11 </command>
12
13 <inputs>
14 <param name="input" type="data" format="png,jpg,tif,zip" label="Input image" help="Original RGB or grayscale image." />
15 <param name="size" size="3" type="integer" value="3" label="Median size" help="Median size in pixels." />
16 </inputs>
17
18 <outputs>
19 <data format="input" name="output" metadata_source="input" label="Median ${size.value} on ${input.display_name}"/>
20 </outputs>
21
22 <help>
23 Create a median filter of the given size. For each pixel in the input image, this filter copies the median pixel value from a (size, size) environment to the output image.
24 </help>
25
26 <tests>
27 <test>
28 <param name="input" value="images/sydney.jpg" />
29 <param name="size" value="3" />
30 <output name="output" file="images/sydney-median.jpg" />
31 </test>
32 </tests>
33
34 </tool>