Handle point intensity

Feel free to ask any question here
Post Reply
IroClo
Posts: 1
Joined: Thu May 17, 2018 2:40 pm

Handle point intensity

Post by IroClo »

I am trying to create my own plugin for CC and i want to calculate some values according to the intensity of the cloud points.
How can i reach this value (intensity), as well as coordinates, in order to loop over the whole point cloud and apply my functions?

I had a look at other plugins but i am very confused. Could you please help me if i wanted for example to aplly a function like :

a= b*I

to each point of the point cloud?

Where a,b are known and I is the intensity?

Thank you very much!
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Handle point intensity

Post by daniel »

You have to identify the right scalar field (either you use the active one, or you simply look for the scalar field named "Intensity", or you let the user select it - but you'll need a dedicated interface to do it).

Then you can get the ith value of the scalar field with 'getValue' (called directly on the right scalar field instance). And you can access the ith point coordinates with 'getPoint' (called on the cloud).
Daniel, CloudCompare admin
Post Reply