How to extract pixel height info from Qt Surface Example
I am working with Qt Surface example in QT 5.9 (DataVisualization) , I want to retrieve the pixel height information from the output and write it in a png/txt file. I read all the classes and their members from the documentation. First I thought this : m_heightMapProxy->heightMap(); would be the output, but gives us the input image. Then after reading a bit more I wanted to check if it's the surfaceDataProxy that holds the output info:
int size = m_graph->seriesList().size(); QSurface3DSeries*ser = m_graph->seriesList().at(0); QSurfaceDataProxy*prox = ser->dataProxy(); int rows = prox->rowCount();
But when I debug this code (tried some variations and places as well) I always see that the row and column count are 0; so the data proxy must be empty. If I directly take the selected series from m_graph (=Q3DSurface) that variable comes out null.
I am certain that the series in the list is m_heightMapSeries ,since I wrote the 4 lines above, right under these 2 lines, in the void SurfaceGraph::enableHeightMapModel(bool) function of the example:
Also I'm running the code on Visual Studio 2015, if you would need to know that.
Any help, ideas or solutions is appreciated, Thank you very much in advance :)