def sample(self, img, order): """Samples an image using this slice""" physical = self.get_physical(img.affine) return ndinterp.map_coordinates(img.get_data().squeeze(), physical, order=order).T