#
# HELP: SYNOPSIS:
# HELP:     colotux/menu/load
# HELP:
# HELP: DESCRIPTION:
# HELP:     Ask for a volume file and load it. Reorganize display for new
# HELP:     geometry.
#
CECHO ${$root.func.var.new("string","tmp")}
CECHO ${$root.func.var.new("string","dir")}
VARFROMPROCESS tmp eccet_openfile load ${$root.application.colotux.datapath}
IF ${$tmp=="."} QUIT
VIEW_SET Main
LOAD ${$tmp}
CECHO ${$dir=$root.func.file.getdir($tmp)}
CECHO ${$root.application.colotux.datapath=$dir}
CECHO ${$root.func.file.chdir($dir)}
CECHO ${$root.func.file.mkdir("pictures")}
VIEW_SET XY_Big
VIEW_SIZEX ${$root.vol[current].size.x}
VIEW_SIZEY ${$root.vol[current].size.y}
VIEW_SET Outside
VIEW_SIZEX ${$root.vol[current].size.x}
VIEW_SIZEY ${$root.vol[current].size.y}
FLAGS 256
POS ${$root.vol[current].size.x/2} ${-$root.vol[current].size.y} ${$root.vol[current].size.z/2}
DIR 0 1 0 1 0 0
VIEW_SET Planes_XY
VIEW_SIZEX ${(int)($root.vol[current].size.x/2)}
VIEW_SIZEY ${(int)($root.vol[current].size.y/2)}
VIEW_SET Planes_XZ
VIEW_SIZEX ${(int)($root.vol[current].size.x/2)}
VIEW_SIZEY ${(int)($root.vol[current].size.z/2)}
VIEW_SET Planes_YZ
VIEW_SIZEX ${(int)($root.vol[current].size.y/2)}
VIEW_SIZEY ${(int)($root.vol[current].size.z/2)}
VIEW_SET XY_Big
VIEW_REORIENT
VIEW_SET Main
FINE 6
ZOOM 120
LAYER 0-255 0

! colotux/default/setscaling


ECHO Load complete
