How to retrieve modeltomodel values by coordinates?

Hey there!

Currently I am using the ModelToModelDistance module on two models, which outputs a third model which I have been analyzing using the ShapePopulationView module.

This colormap is somewhat useful in itself but I would like to look at the specific values that the model contains. I have used the function arrayFromModelPointData() to retrieve the distances however this gives me no indication to which points on the model these distances belong.

Is there maybe a way to click on the model to then retrieve the distances of the colormap for that specific point? I tried doing it using markups but I am not sure how to map the control point to a point on the node (retrieved using getNode) of the color map.

You can get the ID of the closest point to a coordinate using VTK locator classes. See a complete example in the script repository.