Model-to-model distance module questions

Operating system:
Slicer version:4.8.1
Expected behavior:
Actual behavior:
hello 3D slicer experts, I made two models and calculated the distance between them with the model to model distance module , then I ran it’s vtk output file in shapepopulationviewer module.it gives me a colour bar.
1)what is the scale of this colour bar?
2) how to calibrate the colour bar, so that the scale of this colour bar shows the actual distance between the points of two models?
thank you

You can edit color map range and show it in 3D view in Colors module.

Hello everyone,

I am trying to calculate distances between two and also between more than two models in Slicer 4.10.2 .

The segment comparison module does not help me.

When use the Model To Model Distance module, I get an error. Please find the error message below.

Does anyone have an idea, why this doesn’t work?

Or does anyone know a better and working way to calculate distances?

image

Model To Model Distance standard error:

dyld: Library not loaded: /Volumes/Dashboards/Support/qt-everywhere-build-5.10.0/lib/QtSql.framework/Versions/5/QtSql

Referenced from: /Applications/Slicer.app/Contents/Extensions-28257/ModelToModelDistance/lib/Slicer-4.10/cli-modules/libModelToModelDistanceLib.dylib

Reason: image not found

What do you mean? What do you do, what do you expect to happen, and what happens instead?

I’ve just tried it and it works fine on Windows. Try uninstalling and installing the extension again (make sure to wait for the “Restart” button to appear, then press it to restart Slicer).

It does not work on mac - the error is below.

cc:@fbudin69500

Model To Model Distance standard error:

dyld: Library not loaded: /Volumes/Dashboards/Support/qt-everywhere-build-5.10.0/lib/QtSql.framework/Versions/5/QtSql
  Referenced from: /Applications/Slicer-4.10.2.app/Contents/Extensions-28257/ModelToModelDistance/lib/Slicer-4.10/cli-modules/libModelToModelDistanceLib.dylib
  Reason: image not found

I was going to submit an issue about this so it is documented somewhere other than this forum, but then I got confused about the source code location.

ExtensionIndex points to the fork of the code under @jcfr account: https://github.com/Slicer/ExtensionsIndex/blob/master/ModelToModelDistance.s4ext#L9

However, the @jcfr version does not allow submission of issues: https://github.com/jcfr/3dmetrictools. Also, the one from which @jcfr forked the repo is 18 commits behind the one under GitHub NIRALUser: https://github.com/NIRALUser/3DMetricTools.

@jcfr do you know what is going on with this extension?

It sounds like a basic functionality, but for clinical researchers this functionality can actually be quite useful (if it works).

We need to fix the module (or add another one that works) but in the meantime, you can get model to model distance by typing 5 lines of code:

# Get two model nodes that we want to compute distances of
m1=getNode('Segment_1')
m2=getNode('Segment_2')

# Compute distance
distanceFilter = vtk.vtkDistancePolyDataFilter()
distanceFilter.SetInputData(0, m1.GetPolyData())
distanceFilter.SetInputData(1, m2.GetPolyData())
distanceFilter.Update()
m1.SetAndObservePolyData(distanceFilter.GetOutput())

# Use the computed distance to color the node
m1.GetDisplayNode().SetActiveScalarName('Distance')
m1.GetDisplayNode().SetScalarVisibility(True)
1 Like

Hope this helps @bjoern