Samples the slices in the given dimension according the chosen strategy.

def _sample_slices_in_dim(self, view, num_slices, non_empty_slices):
        """Samples the slices in the given dimension according the chosen strategy."""

        if self._sampling_method == 'linear':
            return self._linear_selection(non_empty_slices=non_empty_slices, num_slices=num_slices)
        elif self._sampling_method == 'percentage':
            return self._percent_selection(non_empty_slices=non_empty_slices)
        elif self._sampling_method == 'callable':
            return self._selection_by_callable(view=view, non_empty_slices=non_empty_slices,
                                               num_slices=num_slices)
        else:
            raise NotImplementedError('Invalid state for the class!')