#!/bin/bash
if [ "$1" == "--help" ] ; then
	cat <<EOF
Prepares a volume for interactive segmentation of the colon.
Run this script, then use 'K', 'F' and 'U' to mark the colon parts.
Then run colon_postprocess.
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
layer 0 0
layer 1 0
layer 2 0
layer 3 0
layer 4 0
layer 5 0
layer 6 0
layer 7 0
gcenter 300
gwidth 600 
markz 150 4095
rendermode ZSH
makedist
DISP 0
EOF
