Obtain the HU values for given 3D points with x,y,z coordinates

I’ve been trying to find a way to obtain the HU values for specific x,y,z coordinates. I explain what I’m trying to do.
Let say I have a CT scan of a bone and I have generated rays in 3D space. Once these rays intersect with bone, each can generate different HU profile. So, I do have set of 3D points (x,y,z coordinates) on each ray within the bone and I need to obtain the HU value for each point in order to get the HU profile on the ray. I’m thinking of a code which can get the 3D points (x,y,z coordinates) as inputs and find the HU values. I understand that these point may not be exactly matched with voxel nodes. So, the HU value should be obtained from interpolations/extrapolations I think. Any suggestions, examples, or pre-existing codes?
Thanks a lot.

You can get an HU profile along a straight line in 3D using “Line profile” module (in Sandbox extension).

1 Like

I went through the Python code of the Line Profile, it only accepts the location of markup points manually created on the views to create a line. I need to create the line out of know coordinates in 3D space. Do you know how I can use my own points (using x,y,z coordinates) instead of manually selecting the markup points? Thanks.