pelkmanslab / TissueMAPS-OLD

Old TissueMAPS code (until 2016); please use pelkmanslab/TissueMAPS instead.
http://github.com/pelkmanslba/TissueMAPS
0 stars 0 forks source link

separate_clumps module shrinks nuclei segmentation #65

Closed reinouddegroot closed 7 years ago

reinouddegroot commented 7 years ago

When building a pipeline on Chimp (user: rdegro, experiment: NUP_FollowUp1_20x) the Nulcei are undersegmented. This is caused by the separate_clumps module. Nuclei segmentation including separate_clumps:

poorsegmentationincseparateclumps

Nuclei segmentation without separate clumps:

nicesegmentationnoseparateclumps

Scott reports the same issue although the problem is less pronounced in his experiment because he is using 40x images.

jluethi commented 7 years ago

This issue was caused by a shrinking step in separate clumps that was recently introduced, that has now been fixed in commit https://github.com/TissueMAPS/JtModules/commit/cdfbe257325bb6f387507b6ae5c9e315484b49ba and is now corrected on Chimp as well.

This shrinking was done to ensure that separated nuclei wouldn't touch each other anymore. To avoid that problem from coming up again, we broadened the separation line by 2 pixels => separated objects should now be separated even stronger. (dilation of separation line)

Looking at the data, I get the feeling that this fix creates a new issue: Some nuclei are still lost after separation. This happens because they were connected to the other nucleus in a diagonal way by at least one pixel, but then got separated when the nuclei polygons were made (because that step includes a morphological opening that cuts such connections potentially).

A solution could be to change the way the labelling is handled: If only directly (4-connected) objects are labeled as the same nucleus, diagonally connected nuclei would be separated already. I will have to look into whether that causes other problems.

For the moment, it runs again without shrinkage, but some cells contain a second cell in their "cytoplasm". Those cells would need to be removed with an SVM.

@HackerMD @scottberry

hackermd commented 7 years ago

This should be fixed by TissueMAPS/JtModules@cdfbe257325bb6f387507b6ae5c9e315484b49ba. @jluethi can you confirm?

jluethi commented 7 years ago

Yes, this specific issue is fixed. There still may be potential problems with loosing cells, but I will have to look into that first and would open an new issue if that comes up again.

hackermd commented 7 years ago

Ok! Then I close this for now.