ie, the y0 on the right-hand side should be y1. This line is interpolating in x, so y should remain constant.
I guess this will affect many vc outputs. I found it while trying to implement a Python version of vc_layers_from_ppm. I kept getting small differences in the pixel values produced by vc and those produced by the scipy.interpolate methods. As an example, on a layer image whose mean pixel value was about 30,000, the standard deviation of pixel differences was about 700, with a few outliers as large as 15000. Visually, the images were nearly indistinguishable.
(When I made the above change in Volume.cpp, the vc output matched the python result exactly.)
Steps to reproduce
n/a
Version
All versions
How did you install the software?
Docker
On which operating systems have you experienced this issue?
[X] macOS
[X] Windows
[X] Linux
Relevant log output
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
What happened?
I believe there's a bug in the interpolateAt() method in the Volume class. The line
should be
ie, the y0 on the right-hand side should be y1. This line is interpolating in x, so y should remain constant.
I guess this will affect many vc outputs. I found it while trying to implement a Python version of vc_layers_from_ppm. I kept getting small differences in the pixel values produced by vc and those produced by the scipy.interpolate methods. As an example, on a layer image whose mean pixel value was about 30,000, the standard deviation of pixel differences was about 700, with a few outliers as large as 15000. Visually, the images were nearly indistinguishable. (When I made the above change in Volume.cpp, the vc output matched the python result exactly.)
Steps to reproduce
n/a
Version
All versions
How did you install the software?
Docker
On which operating systems have you experienced this issue?
Relevant log output
No response
Code of Conduct