Get data from heightmap import function

I wanted to find out when I perform terrain sculpting and create a hill, is there a way for me to obtain the displacement between the top of the hill and the ground (a mathematical number) that I can use in the program I am hoping to implement. So basically I need a backdoor that enables me to get that value so I can perform some additional functionalities in the plugin I’m hoping to implement.