Handle point intensity

Feel free to ask any question here
Post Reply
kittysoman2013
Posts: 1
Joined: Mon May 18, 2020 12:52 pm
Location: https://giupviectheogio.com/
Contact:

Handle point intensity

Post by kittysoman2013 »

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 really have to look at other plugins and parts of the code ;)

But basically you have either to rely on the fact that the user has selected the right scalar field (in which case you can just get the 'active scalar field', or look through the scalar fields attached to the cloud and select the one you are interested in (based on its name?). I would personaly prefer the first solution.

Then you can query the number of values and get or set each scalar field value one by one.
Daniel, CloudCompare admin
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Handle point intensity

Post by WargodHernandez »

Have you looked into scalar field arithmetic function? It sounds exactly like what your wanting to reimplement.
Post Reply