def computeResults(self, input):
        self.res = numpy.ndarray((1,) + input.shape + (1,), 'int32')
        if input.shape[0] > 1:
            borders = input.view(vigra.ScalarVolume)
            self.res[0,:,:,:,0] = vigra.analysis.watersheds(borders, neighborhood = 6)[0]
        else:
            borders = input[0,:,:].view(vigra.ScalarImage)
            self.res[0,0,:,:,0] = vigra.analysis.watersheds(borders, 4)[0]
dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/modules/automatic_segmentation/core/automaticSegmentationMgr.py/AutomaticSegmentationModuleMgr.computeResults/original