Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to extract pixel height info from Qt Surface Example
Qt 6.12 LTS is out! See what's new in the release blog

How to extract pixel height info from Qt Surface Example

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 591 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    ganiganigani
    wrote on last edited by
    #1

    Hello,
    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:

    	m_graph->removeSeries(m_sqrtSinSeries);
    	m_graph->addSeries(m_heightMapSeries);
    

    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 :)

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt
    • Unsolved