+if [ -z "$mori_init_threshold" ]; then mori_init_threshold="-1024"; fi
+if [ -z "$mori_end_threshold" ]; then mori_end_threshold="0"; fi
+if [ -z "$mori_delta" ]; then mori_delta="1"; fi
+if [ -z "$mori_minimum_threshold" ]; then mori_minimum_threshold="-850"; fi
+if [ -z "$mori_inside_value" ]; then mori_inside_value="255"; fi
+if [ -z "$mori_outside_value" ]; then mori_outside_value="0"; fi
+if [ -z "$mori_signal_kernel_size" ]; then mori_signal_kernel_size="20"; fi
+if [ -z "$mori_signal_threshold" ]; then mori_signal_threshold="500"; fi
+if [ -z "$mori_signal_influence" ]; then mori_signal_influence="0.5"; fi
+if [ -z "$label_upper_threshold" ]; then label_upper_threshold="-600"; fi
+if [ -z "$label_inside" ]; then label_inside="1"; fi
+if [ -z "$label_outside" ]; then label_outside="2"; fi
+if [ -z "$random_walker_beta" ]; then random_walker_beta="20"; fi
+
+base_name=`dirname $input`/`basename $input .mhd`
+if [ -z "$mori" ]; then
+ mori="$base_name"_mori.mhd
+fi
+signal="$mori"_signal.txt
+if [ -z "$labels" ]; then
+ labels="$base_name"_labels.mhd
+fi
+if [ -z "$output" ]; then
+ output="$base_name"_rw.mhd
+fi