fix nb of slices calculation in arbitrar reslicing