This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cpscript | |
from scipy import ndimage | |
# either ask explicitely for an object | |
labels = cpscript.objects['Cells'].segmented | |
# or ask the user to choose one | |
# cpscript.objects.input_objects.require('The objects from which to measure the distance') | |
#labels = cpscript.objects.input_objects.segmented | |
background_labels = np.array(labels == 0, dtype=int) |