

def normalizePotential(self, weights):
    min = numpy.min(weights)
    max = numpy.max(weights)
    weights = ((weights - min) * (255.0 / (max - min)))
    data = numpy.ndarray(weights.shape, 'float32')
    data[:] = weights[:]
    return data

dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/modules/automatic_segmentation/core/automaticSegmentationMgr.py AutomaticSegmentationModuleMgr.normalizePotential/original