Page 1 of 1

Add "equal to" to the Scalar Field Arithmetic

Posted: Thu Sep 01, 2022 2:01 am
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.

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

Posted: Thu Sep 01, 2022 9:41 pm
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)

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

Posted: Thu Sep 08, 2022 10:03 am
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.

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

Posted: Tue Sep 13, 2022 6:21 am
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).

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

Posted: Tue Nov 08, 2022 8:31 am
by gimmetank
Exactly, there needs a "set" function. Thanks for your consideration!

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

Posted: Sat Nov 19, 2022 2:55 pm
by daniel
For the records, this 'set' option has now been added to the SF Arithmetic tool (and the SF_OP command line option).