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.

Thank you for your answer!
I managed to write a script to extract the data from the model to model distance extensions by placing markup nodes on the model. I still can’t manage to figure out how to place markup nodes on the colormap in ShapePopulationViewer. Can you help me with that? Thank you!

I don’t think ShapePopulationViewer supports any kind of markups. Instead, I would recommend to enable coloring by scalars using Models module → Scalars section.