I’ve just answered my own question. Yes, it does work now.
I followed your instructions as per your previous reply
quote Add a Relate module to match the insulin (which I’ll refer to as Speckles) to the boundaries of the IdentifySecondary (which I’ll call Cells). The result of the Relate module is that each Speckle is counted as a “child” to a parent Cell.
(2) Add a FilterByObjectMeasurement module. Our Help on its use is reasonably self-explanatory for other measurements, but what is not clear is that the Speckle count per parent Cell is also a measurement created by Relate and can be used to filter objects as well.
For the “Object to filter by” enter “Cells” and for “Category to filter by” enter “Children”. Where it gets tricky is that for “Feature to use”, you enter “Speckles” and it will know to look for the children count as the measurement. Then for “Minimum value”, you can enter “20” (or whatever criteria you want).[/quote]
And it works! However I found that I needed to do another relate module, on the filtered cells that has more than 20 insulin granules. BUT, CP gives me an error, saying that I cannot calculate something that has been already been calculated. Here is the error
[code]There was a problem running the analysis module Relate which is number 22.
Image processing was canceled because you are attempting to recreate the same measurements, please remove redundant module (#22).
CPaddmeasurements in /Users/t.pan/Applications/CompiledCellProfiler/CellProfiler_mcr/CPsubfunctions/CPaddmeasurements.m (38)
Relate in /Users/t.pan/Applications/CompiledCellProfiler/CellProfiler_mcr/Modules/Relate.m (119)
AnalyzeImagesButton_Callback in /Users/t.pan/Applications/CompiledCellProfiler/CellProfiler_mcr/CellProfiler/CellProfiler.m (10442)
gui_mainfcn in /Users/t.pan/Applications/CompiledCellProfiler/CellProfiler_mcr/CellProfiler/CellProfiler.m (12182)
CellProfiler in /Users/t.pan/Applications/CompiledCellProfiler/CellProfiler_mcr/CellProfiler/CellProfiler.m (57)
So to overcome this problem, I had to do an IdentifyPrimAutomatic (again) on my granules images. So there is a duplicate of this, but with different names, so that I can use the filteredInsulin (cells) and relate that to my duplicate granules image to only include cells with more than X number of granules. This had to be done because the output files do not contain any data, hence the need for another relate module.
Anyway, it’s all good. It’s just adding in another 15-20seconds per cycle, which is quite a lot when I’m running lots of images.
Here’s the pipeline and necessary files to replicate my results.
So now, it looks like I can filter out odd shaped nuclei (which are probably not singled nuclei), nuclei that are too close to the border and filter out too little number of granules! Hooray! This takes away a lot of manual work. So now it’s truly high-throughput! Thanks heaps guys!
PS. I guess no need to look into the other method you suggested, that didn’t work for me