Fixes bug in cube_to_image function for case where no slicepos given