Surface to surface distance

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

image

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