Cellular segmentation

I created a cell mask using CellProfiler and I was wondering if it is possible to load it in starfish .

Yes it most likely is possible, though I haven’t tried it myself. If you used CellProfiler’s ConvertObjectsToImage then you can try the from_external_labeled_image() method of BinaryMaskCollection. There are also a few other methods in the BinaryMaskCollection class you can use depending on the format of your masks.

from starfish import BinaryMaskCollection

masks = BinaryMaskCollection.from_external_labeled_image(path_to_labeled_image=<filename>, original_image=<original_imagestack>)

Thanks @mattcai .
I created my mask and I can see it using masks. to_label_image() . I was wondering if I can plot only the cellular boundaries of my mask on the top of another image (ex. DAPI).

There aren’t any built-in functions for this in starfish. However, you can use skimage.segementation.find_boundaries() on masks.to_label_image().label_image to compute the boundary mask as an array that can be overlaid on another image.