In my slicer plugin, I need to model the bones and skin in the ROI and make a model. I used @lassoan’s extract skin surface method , But the speed is a bit slow, is there a faster method? In fact, I only need the back surface, is there a faster and more effective method?

I only need, for example, the back surface of the vertebral body. I want to use the Ray Casting function to determine the bone entry point of pedicle puncture.

I used the method of reducing the volume, and it seems to be effective… Is there a better way? For example, is there a way to make a model in a cylinder?

If you need intersection point of a line and a surface mesh then you can IntersectWithLine method of cell locators.

To get intersection of a line with a volume, you can compute a line profile (probe the image with a line) using “Line Profile” module in Sandbox extension; or you can implement yourself using vtkProbeFilter. You can then find the intersection point by finding the point where the voxel value goes above a chosen threshold value.