Can you give an idea of how your input data is formatted (ASCII, binary, and if ASCII what format) and what would you need exactly from the output (point cloud coordinates, triangular mesh, etc.)?
I'm thinking that from the gradient (as long as the size area of the gradient is constant) it should be possible to extract coordinates as long as you have at least one (or can just assume one).
There's some work made in that area (although I've never used it). You should take a look at: