wip: convert RAS to range index in each slice direction