Exclude dirt spots/paraffin artifacts


I have made a pipline for counting number of cells in the tissue. Though it seems that CellProfiler also picks up dirt/paraffin artifacts. I Think that the issue is in the module identifying primary objects (third from top - see pipeline) i have tried diffrent kinds of thresholds (manual/global) but when I succed to get rid of the artifacts even some of the hematoxylin (Purple/blue) stained nuclei dissapear.

My aim with this is to get rid of all the artifacts and still detect all the nuclei

I have attached my pipline together with some Pictures. I would be glad if someone could tell me how to solve this

pipeline.cppipe (14.4 KB)

I suggest adding the following modules, before the ones you have now:[ul]ColorToGray: Apply to the raw image to convert the color image to a grayscale one.[li]ImageMath: Use the “Invert” operation to change bright regions to dark ones and vice versa.[/li][li]IdentifyPrimaryObjects: Detect the tissue region by [list][]Disabling exclusion of objects touching the image border.[/li][li]Setting the min diameter filtering size to a value large enough to exclude artifacts[/li][li]Setting the max diameter size to a really high value, e.g, 10000[/li][li]Set the thresholding method to Global Otsu, 3-class thresholding with the middle class set to “Foreground” [/li][li]Setting declumping to “None”[/li][/ul][/:m][li]MaskImage: Mask the DAB and Hematoxylin with the tissue object[/li][/list:u]If you then use this masked image, any further detection/measurements will ignore pixels outside the tissue region.