Hi,
To compute the sum of a scalar field of a cloud point, I use the conventional way like this:
int density = Cloud->getScalarFieldIndexByName("Density");
CCLib::ScalarField* sf_density = Cloud->getScalarField(density);
double sum = 0.;
for (int num = 0; num < Cloud->size(); num++)
sum = sum + sf_density->getValue(num);
It seems to work for me. Are there another way more simple to do that?
Thanks
Calculation sum of scalar field
Re: Calculation sum of scalar field
That's correct. And nope, there's no shortcut to do that operation ;)
Daniel, CloudCompare admin