Surface to surface distance

Hello,

I am searching for guidance on using ParaView or a similar software as done in a research paper. I attached the figures from the paper. I want to use point cloud analysis to calculate linear deviation from a scanned cut surface to a plane. Does anyone have ideas of how to do this? I think that it is Distance to polydata in Paraview but I do not know how to do that.

Thank you!

For convenience (data from the original post) are also available below:

Cut 1-right.stl

Post Op.stl

You can use ModelToModelDistance extension to compute the distances of bone surface points from the cutting plane:

After this you can copy-paste this code snippet into the Python console to get the distance distribution as a histogram:

modelNode = getNode("VTK Output File")
modelPointValues = modelNode.GetPolyData().GetPointData().GetArray("Signed")
import numpy as np
histogram = np.histogram(modelPointValues, bins=50, range=[-2.0, 2.0])
chartNode = slicer.util.plot(histogram, xColumnIndex = 1)

1 Like

ModelToModelDistance

@lassoan I completely missed the ModelToModelDistance extension as it did not appear on linux in the extension manager and I ended up using a similar module in OsteotomyPlanner extension.

Thank you so much!! Our team is trying it out today but it seems very promising and I will report back on how successful we are.

2 Likes

Is it possible to select a certain area as the surface to analyze? So that just some of the total object is being compared to the plane at a time?

Yes, sure, there are many ways to cut out part of a surface, for example Dynamic Modeler module in recent Slicer Preview Releases or the Combine Models module in the Sandbox extension.