Points and surface interaction between segment node and model node

Operating system: Windows 10
Slicer version: 4.11.0
Expected behavior:
Actual behavior:

Sorry for my question, i’m a newby

I’m trying to determine how many points of the surface of a vtkMRMLSegmentationNode is interacting with a vtkModelNode.

In the image I try to explain better. The cylinder is passing through the cube and I want to know witch is the surface percentage that is touching the cube (red surface 60%) and witch is not (40%).

Thanks you in advance !

Operating system: Windows 10
Slicer version: 4.11.0
Expected behavior:
Actual behavior:

Sorry for my question, i’m a newby

I’m trying to determine how many points of the surface of a vtkMRMLSegmentationNode is interacting with a vtkModelNode.

In the image I try to explain better. The cylinder is passing through the cube and I want to know witch is the surface percentage that is touching the cube (red surface 60%) and witch is not (40%).

Thanks you in advance !

The only method I know of currently is to use the collision detection filter. It takes two vtkPolyData objects and the output is the number of contacts. It cannot tell you surface area of the contact, but can also give you the list of points that are colliding. An example of usage can be found here:


Please be mindful that in Slicer, MRML nodes may be under transforms, and those need to be applied using vtkTransformPolyDataFilter so that the vtkPolyData objects (used both in model nodes and segmentation nodes’ closed surface representation) are in the right coordinate system (as shown in Slicer). The example I linked to above also contains this step.

Also please note that the integration of this class into VTK is in progress, if you don’t want to use SlicerRT, see this MR: https://gitlab.kitware.com/vtk/vtk/merge_requests/4527
Until then, you’ll need to use SlicerRT’s own class.

Thanks you!! it seems right, I will try