Export 3D distance information form model to model distance

Hi there, new to the software and python.
I have the output form model to model distance and be able to view it in color map by ShapePopulationViewer.
I have followed the script from Calculating distance using Maurer distance map and be able to get the data of histogram in csv(both raw data of histogram and count of histogram).
I wonder if there is a way I can export the distance data with it’s 3d(x,y,z) coordinates?
Thank you!