Delineating Organoid Area with mask

Hi,

I am analyzing organoid sections and am using a mask to map out the area of the organoid and then identify nuclei and astrocyte staining within. While my mask blocks out noise (dots outside of the main clusters), there are some sections in which the actual organoid area is masked out. Any suggestions to improve this?

My approach is IdentifyPrimaryObjects (to get the organoid object) → ConvertObjectsToImage and MaskImage → then I use IdentifyPrimaryObjects with the MaskImage output to identify the nuclei and astrocytes in the masked out organoid area.

I’ve attached my pipeline and a photo of two different organoid images (left: unsuccessful mask, right: more or less successful mask, there is a missed section near the top of the organoid section).

Summer pipeline (Angel’s images).cpproj (1.9 MB)

Thank you, your help would be much appreciated!

Without the original images it’s difficult to give precise instructions, but I think the first change you might want to consider is using a simple Threshold module instead of IdentifyPrimaryObjects to generate the initial mask. You could then make use of modules like RemoveHoles to ‘fill in’ the areas within the organelle, if that’s what you’re going for. IDPrimary makes several assumptions and tries to split individual cells, which is probably going to make it slower and less accurate for this purpose.

The missed sections are likely to be the result of the thresholding and declumping settings in use, but again it’s hard to tell you what to do without looking at what’s happening within the module during the run. If you could upload a problematic image that might provide some further insight.

Hi David,

Thanks for the help. I’ve tried something similar with varying success, the issue is that the noise is often the same intensity as the organoid area. May I send you a direct message with two image samples? I think they help illustrate the issue.

Sure, feel free to DM me.

Hi @Samir_Gouin,

Thanks for sending the images over. I’ve attached a basic pipeline which can attempt to segment objects using the mask you were looking to generate. I’d generally recommend against trying to use IdentifyPrimaryObjects on an image of this size, you may have better luck using the Watershed module instead. Nonetheless, in this instance we generate the mask based on an image, then clean it up and mask the input. Once we’ve done that we can use a manual threshold with IDPrimary to tell it to consider any non-masked pixels as foreground.

I’m not entirely sure why you’re doing each input image individually, if you can identify all the objects in a single round then you should be able to take measurements across all wavelengths in one step. It really depends what you’re looking to get out of the pipeline?

Summer pipeline (Angel’s images) - DS.cppipe (8.8 KB)

Hope that helps!

1 Like

Hi David,

Thank you so much!! I am still in the process of trying out the pipeline you provided. What do you mean in regards to doing each input image separately? I am using the IdentifyPrimaryObject modules for each image channel to recognize different biomarkers. How may I combine this in a single round?

The goal of the pipeline is to associate cell-types with nuclei (i.e. using RelateObjects to identify biomarkers near nuclei to determine the cell-type). We then want to quantify cell-type distributions and do proximity analysis.

Thanks again for your help!

Hi @Samir_Gouin,

In your original pipeline I believe you had a separate IdentifyPrimary module for each cell type. If you have a single marker that stains all the cells, it should be possible to segment based on this and then use the FilterObjects module to group those objects into the different cell types based on which other markers were expressed in each cell. This avoids the need to repeatedly segment for each wavelength.