diff tools/min.xml @ 2:a44112280169

Uploaded
author tomasz-bednarz
date Mon, 25 Nov 2013 21:12:30 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/min.xml	Mon Nov 25 21:12:30 2013 -0500
@@ -0,0 +1,34 @@
+<tool id="filter_min" name="Filter - Min" version="1.0.2">
+
+	<description>Apply a min filter of the given size.</description>
+	
+	<command interpreter="python">
+		#if (str($input.ext) == 'jpg'):
+			pil_filter.py $input $output min $size jpeg
+        #else:
+			pil_filter.py $input $output min $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="Min size" help="Min size in pixels." />
+	</inputs>
+	
+	<outputs>
+		<data format="input" name="output" metadata_source="input" label="Min ${size.value} on ${input.display_name}"/>
+	</outputs>
+
+	<help>
+		Create a min filter of the given size. For each pixel in the input image, this filter copies the smallest 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-min.jpg" />
+  		</test>
+  	</tests>
+
+</tool>
\ No newline at end of file