#!/bin/bash
if [ "$1" == "--help" ] ; then
	cat <<EOF
Postprocess an interactively segmented colon dataset. 
See colon_prepare for details on the procedure.
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
norm 16
rendermode XYZ
disp 0
jump 0 
layer 0 1
layer 1 1
layer 2 1
layer 3 1
layer 4 1
layer 5 1
layer 6 1
layer 7 1
disp 16
makedist 1
disp 0
EOF
