Algorithm to create a x-ray image from a volume
Wh开发者_运维问答at is the algorithm to create a x-ray image using ray-tracing from a 3-d volume?
Calculate integral(density*dl), where l is ray length, as the ray passes through the volume. The algorithm comes down to, what integration method, how do you interpolate the densities, do you interpolate between rays and if so how, and what is the optimal set of rays to use if you're using interpolation. And of course, how do you represent the geometry.
This assumes that what is desired is a radiograph as opposed to some kind of hidden surface visualization.
Unnecessarily heavy, but extremely flexible and realistic approach: simulate the machine and subject volume in geant. Or, if you prefer coding in Fortran, geant 3 is also more than equal to the task.
精彩评论