title: Java 3D array: Storing cube, retrieving slice of cube
body: <p>When working with an odd, cubic 3d array (3x3x3, 5x5x5, 7x7x7, etc), what would be the most efficient way to return a 2d slice of that array, given the axis on which to orient the slice and a value to use to determine the slice's relevant position along that axis?</p>