Programmable filter - volume is wrong
The programmable filter version of volume is wrong. This misrepresents data, and needs to be fixed.
Note - please test on at least image data (wavelet), exodus (disk_out_ref) and cth data (dave's small dataset). We are seeing really strange results with disk_out_ref. Just clip the bottom 1/8th of the dataset. Results should be about 1/8 of the original volume.
Here is how to replicate the issue on wavelet.
- Linux, 5.3.0 RC3, local server.
- Wavelet. Run from -5 to 5 for X, Y and Z. Apply. --we now have a thousand cells, one unit in size each, so a total volume of 1000.
- Programmable filter. Code is as follows:
from vtk.numpy_interface import algorithms as algs
volume = algs.volume(inputs)
- Paint by volumeOfEachCell. This is now junk. PV will show this as ranging from -0.999 to -1, which is another ParaView bug - numbers are actually -1 throughout.
- Show it in a spreadsheet, numbers will be -1.
This is a bug.
By the way, the range seen here is probably an artifact of bug #16978.