Hi Dear 3DSlicer developers
I want to calculate the length of any ray that propagates from a point source and passes through the CT voxels. In other words, I want to calculate the length of each ray along its path through the voxels. So for each ray I want to calculate two parameters:

The index number of the ray that the ray passes through.

The distance traveled within the voxel.
For a better explanation and understanding, please look at the following figure.
In the above figure, it is assumed that the rays emanated from of a point source are equal to the number of pixels in the imaging system. These rays are lines drawn from the point source to the center of pixel. So if the image matrix is 1024x1024, then there will be 1048576 rays. The figure below is a demonstration of this concept in the sagital slice (2D).
In this particular ray, how can I determine it passes which voxels? What distance has it traveled from each of these voxels? The figure below is the same concept in three dimensions.
What is your proposed solution to perform these calculations?
Does VTK have a library to do it?
Please guide me.
Shahrokh