rotated coordinate system of the input/output
(z<->y): y is now vertical for input/output like in the whole code. Note that the output and input of the models stayed the same. The order of the loops over the model should be the same in every function. (The most efficent order) The models have as fast (n1) directon the z (horizontal) component. n1/n2/n3 = z/x/y. So with ximage you will see horizontal (n1(z),n2(x)) slices forom top to bottom.