Given an voxel based image, a point in physical space and a direction vector (i.e., unit vector): can I somehow compute the distance from that point to the first non-zero voxel in the image in the given direction?

Ideally available in the Python API But C++ would also be fine.

I already found the LineIterator and it would be possible to calculate a starting and end point in voxel coordinates, then iterate the voxels, find the first non-zero one and calculate the distance. But maybe there is something I missed and such a function is already implemented, especially one that takes physical coordinates and vectors?