practice function to iteratively split a 3-dimensional image into slices along its z axis.