Threshold calculation in MaskImage module

I have a set of images that I have to count foci in nucleus. I have cropped images, and cropping is not uniform, they are mostly round, and not rectangle at all, so in order to set up a nice threshold, I sought to mask based on DAPI. But when I tried, I saw IdentifyPrimaryObject module always picks up same threshold, regardless of whether I applied masking or not. It is written that thresholding ignores pixels outside of the masked area, that is way probably I am doing sth wrong here, but I could not figure it out. So, could you have a look?
Mei4FociCountFinal_MAskBlue_esas.cppipe (17.4 KB)

For the masking to be used for ignoring pixels outside of the region of interest, the masking needs to be done within CellProfiler itself, not using an external program. As it is now, CellProfiler is still considering the pixels outside your cropped region. Looking at your pipeline, it appears that may have better success if you do the following:

  • Use MaskImage on the red and blue channels as well as the green.
  • Add an IdentifyPrimary module with the masked blue channel as input, and then make the needed adjustments to identify the nuclei.
  • Set the Axis-identification IdentifyPrimary module for the masked red channel as input, then the Axis objects get detected better.