I do not know if it is a known corner case of the vtkImageDifference algorithm or a bug.
By the way should i use a custom python script with idiff.SetThreshold?
It is a known issue. We are currently in the process of changing the metric used for image comparison in regression testing (see here). This will be quite impactful for VTK and projects depending on it so it will be opt in at first. The current metric is too forgiving and does not capture enough information in the image to be satisfactory.
TBH making the treshold default to zero and improving the doc would be a very simple test, especially considering that the new class will not replace the old class for compat reasons.
@mwestphal@Yohann_Bearzi If i understand and read correctly the source code, i can have the strictest options for comparison by typing:
# Here we want to be as strict as possible so do not set threshold
idiff.SetThreshold(0)
# Do not compare images by allowing a shift of two pixels between images
idiff.SetAllowShift(False)
# Do not compare averaged 3x3 data between the images
idiff.SetAveraging(False)