I recently used the function filetools.compare_nii_files from soma in order to check if 2 niftis images are exactly the same. I set the input threshold to 0.0 to be inform about any differences but a weird behaviour occurs.
The compare_nii_files return False even if the absolute difference is 0.
In this case the images are the same, I computed the difference between both images to prove it.
After looking at the compare_nii_files function, I noticed that the condition abs(np.max(d) - np.min(d)) < thresh is not respected. Is it possible to change it to : abs(np.max(d) - np.min(d)) <= thresh instead ?
I recently used the function filetools.compare_nii_files from soma in order to check if 2 niftis images are exactly the same. I set the input threshold to 0.0 to be inform about any differences but a weird behaviour occurs.
The compare_nii_files return False even if the absolute difference is 0. In this case the images are the same, I computed the difference between both images to prove it.
After looking at the compare_nii_files function, I noticed that the condition
abs(np.max(d) - np.min(d)) < thresh
is not respected. Is it possible to change it to :abs(np.max(d) - np.min(d)) <= thresh
instead ?Thanks for your time, Rémy