Mercurial > repos > tomasz-bednarz > filter_tools
view tools/median.xml @ 3:952a37c4ffc8 default tip
contact added
author | tomasz-bednarz |
---|---|
date | Tue, 26 Nov 2013 13:17:03 +1100 |
parents | a44112280169 |
children |
line wrap: on
line source
<tool id="filter_median" name="Filter - Median" version="1.0.2"> <description>Apply a median filter of the given size.</description> <command interpreter="python"> #if (str($input.ext) == 'jpg'): pil_filter.py $input $output median $size jpeg #else: pil_filter.py $input $output median $size ${input.ext} #end if </command> <inputs> <param name="input" type="data" format="png,jpg,tif,zip" label="Input image" help="Original RGB or grayscale image." /> <param name="size" size="3" type="integer" value="3" label="Median size" help="Median size in pixels." /> </inputs> <outputs> <data format="input" name="output" metadata_source="input" label="Median ${size.value} on ${input.display_name}"/> </outputs> <help> 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. </help> <tests> <test> <param name="input" value="images/sydney.jpg" /> <param name="size" value="3" /> <output name="output" file="images/sydney-median.jpg" /> </test> </tests> </tool>