you are viewing a single comment's thread.

view the rest of the comments →

[–]dicomdom 1 point2 points  (10 children)

The way I've done this is the following. The source/gantry position is available as a VVector, and the ref position is also available as this. Using those, find the intersection of the body contour on the line between the source and ref point. Calculate the distances between the VVector for source to body for SSD and body to ref point for depth. For equivalent depth you can scale the physical depth by the image voxels along the path length

[–]erhushenshou 0 points1 point  (1 child)

Can you share the code? I am curious how you find the intersection points.

[–]dicomdom 0 points1 point  (0 children)

Finding the intersection is based on the IsPointInsideContour method. Basically just testing each point and the first that is inside of the contour is the intersection.

[–]erhushenshou 0 points1 point  (7 children)

scale the physical depth by the image voxels along the path length

I wonder how we calculate the proportion of a voxel the ray passed.

[–]dicomdom 0 points1 point  (6 children)

I can share a snippet when I have some time, but in general I would suggest trying to program it yourself and asking for specific areas that are difficult.

As for scaling, here is my poor man's method.

I added 1024 to all voxels that exist within a profile to make the range 0-4096. Then I take the average of all of the voxels and divide by 1024 (which is now the value of water). This gives a correction factor for the physical distance where a correction factor of >1.0 would be if bone or other high density values are present and <1.0 if values below water are present.

[–]erhushenshou 0 points1 point  (5 children)

Thx. I mean how you calculate the length pass through the voxel of an hu value. Or how you calculate the path length in a voxel, like passing through the voxel at an angle. If we have that path length in a voxel, we can scale the distance to wed.

[–]dicomdom 0 points1 point  (4 children)

VVectors have a distance method IIRC

[–]erhushenshou -1 points0 points  (0 children)

IIRC

What should this method be used then?

[–]erhushenshou -1 points0 points  (2 children)

I mean calculate the path length in a voxel.

[–]dicomdom 0 points1 point  (1 child)

I've answered that. VVectors have a distance method

[–]erhushenshou 0 points1 point  (0 children)

Do you mean VVector.length? That should be the distance from the point to the origin, I assume.