# Measurement for the distance and surface area between joints

What would be the best way to measure the distance and surface area between sacroiliac joints (blue marked in the attached figure)?

Since you are doing measurements in 3D, it is important to first check that the plane you are measuring the joint thickness on is orthogonal to the joint surface. You can do that by enabling slice intersection line display and translate and/or rotate the slice view if needed.

Then you could simply place a markup line to measure distance on the image. However, it may not be trivial to place the line endpoints in a reproducible way to the edges of the joint. To make this distance measurement more reproducible, a markup line can be placed across the joint and an intensity plot can be obtained using “Line profile” module (in Sandbox extension). The cortical bone surface shows up as a two strong peaks on the profile, which can be used to measure the joint thickness.

If thickness measurement is needed along the entire joint space (and users are confident placing curves on the edges of the joint) then two markup curves can be placed on the image and distance between the curves can be obtained by copy-pasting this code snippet into the Python console:

``````# distance between curves
curve1 = getNode('C1')
curve2 = getNode('C2')

import numpy as np
curve1points = arrayFromMarkupsCurvePoints(curve1)
curveDistances = np.zeros(len(curve1points))
for pointIndex, curve1point in enumerate(curve1points):
curve2closestPoint = np.zeros(3)
curve2.GetClosestPointPositionAlongCurveWorld(curve1point, curve2closestPoint)
curveDistances[pointIndex] = np.linalg.norm(curve1point-curve2closestPoint)

plt = plot(curveDistances)
print(f"Average distance: {np.mean(curveDistances)}")
``````

If you are interested in the area then you can add a closed curve (you can create the closed curve automatically from the two open curves that were created for the distance measurement) and enable “area” measurement:

If you need joint thickness measurement in the entire joint space, not just in a selected plane then you can segment the sacrum and iliac bone using “Segment Editor” module and compute distances using “Model to model distance” extension. Manual segmentation may be time-consuming but there are some semi-automatic segmentation tools that may reduce this time or you can train an AI models to fully automate the segmentation (e.g., using MONAILabel)

Dear lassoan
Thank you for your detailed response.
I have some questions about the “line profile” module you mentioned.
I understood the “line profile” module exists in SlicerSandbox/LineProfile at master · PerkLab/SlicerSandbox · GitHub, but don’t know how to install it. I would appreciate it if you could tell me.

Sincerely

You can install the Sandbox extension in the Extensions Manager in Slicer.