#!/bin/bash
if [ "$1" == "--help" ] ; then
	cat <<EOF
Apply a standard filter chain to the grey scale data in input.
EOF
	exit
fi
ANSWER=$(wish -geometry 0x0 <<EOF
puts stdout [tk_messageBox -default "no" -icon question \
	-message "Achtung - dieses Script wird mehrere Minuten laufen \
		  - Wirklich starten ?" -parent . -title "Quit" \
	-type yesno]
	exit
EOF
)
if [ "$ANSWER" != "yes" ] ; then
	exit
fi
netcat -w 1 localhost 1234 >/dev/null <<EOF
disp 16
filter 0 0.8 0.8 0.8 100 1 1 1
filter 0 1 1 1 50 2.1 2.1 2.1 
filter 0 1.59 1.59 1.59 25 1.5 1.5 1.5
filter 0 2.53 2.53 2.53 12.5 1.3 1.3 1.3
disp 0
EOF
