@staticmethod
    # we only compare the data of the overlay, since we want to avoid dependence on color tables etc.
    def compareOverlayData(overlay1, overlay2, tolerance = 0):
        # overlay1._data._data can be a listOfNDArraysAsNDArray instance, overlay2._data._data is loaded from file, so it should be an NDArray
        if isinstance(overlay1._data._data, ListOfNDArraysAsNDArray):
            datatemp1 = overlay1._data._data.ndarrays
        elif isinstance(overlay1._data._data, SelectionAccessor):
            datatemp1 = overlay1._data._data[:]
        else:
            datatemp1 = overlay1._data._data 
        datatemp2 = overlay2._data._data
        
        if numpy.all(numpy.abs(datatemp1 - datatemp2) <= tolerance):
            return True
        else: 
            return False
dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/core/testThread.py/TestHelperFunctions.compareOverlayData/original