Add "equal to" to the Scalar Field Arithmetic

To post any request/idea for new functionalities
Post Reply
gimmetank
Posts: 5
Joined: Mon Aug 21, 2017 11:38 pm

Add "equal to" to the Scalar Field Arithmetic

Post by gimmetank »

I often need to assign a value to a point cloud scalar field. It should be straightforward, but always costs two steps: minus the scalar itself and plus a constant value to the scale field. This is really operational unfriendly. I hope there is a direct "equal to" function under the Edit - Scalar fields - Arithmetic menu.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Add "equal to" to the Scalar Field Arithmetic

Post by daniel »

You want to set a constant value? Because in this case you can use 'Edit > Scalar field > Add constant SF'.

Or did I misunderstand what you want to do? (probably :p)
Daniel, CloudCompare admin
gimmetank
Posts: 5
Joined: Mon Aug 21, 2017 11:38 pm

Re: Add "equal to" to the Scalar Field Arithmetic

Post by gimmetank »

Thanks for the prompt reply~
Say, a point cloud has an SF ranging between 1-255, and I want to set the SF values to 1. How can I just take one step to achieve that? I know I can remove the current SF and add an SF with the same name. But that means two steps. Also, I have to spend time typing the SF name each time. This is really unnecessary labor.

This happens when I was refining point cloud segmentation results. A point cloud was split into different parts (>100 pieces) based on a SF (i.e. class ID). Then I needed to merge some incorrect segments. If the first segment had an ID of 1 and the second had an ID of 2, the SF of merged point clouds would contain both 1 and 2. I simply want to set SF to a constant number, say, 2. The ideal way is to directly update the SF with value 2 under the Arithmetic menu within one step. But there is no such function. The quickest way now is to zero the SF first and then plus 2. Then it means two steps.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Add "equal to" to the Scalar Field Arithmetic

Post by daniel »

Ah ah ok. That's quite specific. I guess a new 'set' operation could be added to the 'SF Arithmetics' tool. I can add this to the TODO list (not sure who and when it will be done however).
Daniel, CloudCompare admin
gimmetank
Posts: 5
Joined: Mon Aug 21, 2017 11:38 pm

Re: Add "equal to" to the Scalar Field Arithmetic

Post by gimmetank »

Exactly, there needs a "set" function. Thanks for your consideration!
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Add "equal to" to the Scalar Field Arithmetic

Post by daniel »

For the records, this 'set' option has now been added to the SF Arithmetic tool (and the SF_OP command line option).
Daniel, CloudCompare admin
Post Reply