Finding the minheight, maxheight, and height range per cell

All about Windows versions
pwan
Posts: 1
Joined: Wed Mar 08, 2017 8:05 am

Finding the minheight, maxheight, and height range per cell

Postby pwan » Wed Mar 08, 2017 8:23 am

Hello,

I want to get the height range per cell of a selected point cloud in my plugin. I know the "Tools->Projection->Rasterize" can be used do that, but I don't know how to use the inner function in "ccRasterGrid.h", or "ccRasterizeTool.h". What should I after I get a ccPointCloud *pc ?

Thanks!

pwan

daniel
Site Admin
Posts: 3375
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Finding the minheight, maxheight, and height range per cell

Postby daniel » Wed Mar 08, 2017 8:17 pm

Well, the ccRasterizeTool class has not been meant to be used this way, however you can use the 'ccRasterGrid' class:
- init the grid with the right dimensions (ccRasterGrid::init)
- and then project the cloud in the grid (ccRasterGrid::fillWith)

Once done, you can access to the cells of the grid (row by row with the 'rows' member). A cell is valid if its height (h) is not NaN. In this case the other statistics are valid (see the ccRasterCell structure).
Daniel, CloudCompare admin


Return to “Windows related topics”

Who is online

Users browsing this forum: No registered users and 1 guest