Hi, I'm trying to sum the values of a layer in my volume. Currently I'm doing this with a detail wrangle and calling volumeindex for every cell. This is pretty slow and I was wondering if there was a better way? I have attached a sample .hip file.
floatsum = 0.0;
for (intx = 0; x < gridSamples; x++)
{for (inty = 0; y < gridSamples; y++)
{floatvalue = volumeindex(1, "value", set(x, y, 0));
sum += value;
}}