Finding the minheight, maxheight, and height range per cell

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

Finding the minheight, maxheight, and height range per cell

Post by pwan »

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: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post by daniel »

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
Post Reply