Is it possible to change scalar field value?
Is it possible to change scalar field value?
Helle, is there a function to set scalar field value?
Re: Is it possible to change scalar field value?
There's no option to change the scalar field value of a single point (at least with the graphical interface - it's of course possible with the code).
You can add a scalar field with a custom value for all points. And you can also save the cloud as an ASCII file, edit it and reload it.
You can add a scalar field with a custom value for all points. And you can also save the cloud as an ASCII file, edit it and reload it.
Daniel, CloudCompare admin
Re: Is it possible to change scalar field value?
I wanted to modify the scalar value by ccGenericPointCloud::setPointScalarValue(index,scalar). But it crashed.
Re: Is it possible to change scalar field value?
If you use the generic accessors, then first you have to make sure there's an active scalar field (as most of the cloud classes can handle multiple scalar fields, you have to set which one is the default one. You'll have to use the higher level class (ChunkedPointCloud? ccGenericPointCloud? ccPointCloud?) to do that. Generally with the 'setCurrentScalarField' method.
Then of course this scalar field must have as much values as the number of points (i.e. currentSize is at least as big as the cloud size). If it's empty you have to 'add' the values the first time (with addElement).
Then of course this scalar field must have as much values as the number of points (i.e. currentSize is at least as big as the cloud size). If it's empty you have to 'add' the values the first time (with addElement).
Daniel, CloudCompare admin
Re: Is it possible to change scalar field value?
I add a scalar field and set scalar values by a pushbutton.
The values are changed but histogram is disable.
Re: Is it possible to change scalar field value?
If you modify a scalar field, you must call 'computeMinAndMax' once all modifications are done (it updates the min and max values that are used by many tools and widgets).
Daniel, CloudCompare admin