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 causes loss of Nuclei #68

Open jluethi opened 7 years ago

jluethi commented 7 years ago

Using the current implementation of separate clumps (version 0.1.1), a sizeable number of nuclei are lost. These nuclei then typically are within the cytoplasm of other cells.

The way this seems to happen is the following: A mask image from primary thresholding is fed into separate clumps. The modules finds potential clumps and searches for a "dividing" line. This dividing line is removed from the mask, thus disconnecting the cells.

I suspect that not all cells are disconnected, because sometimes there still may be diagonal connections after a dividing line is removed. [The diameter of the dividing line has been increased in the latest version, but still leaves certain edge-cases non separated]

These diagonally connected cells than get the same label when the label module is used, because they still appear to be connected. But when the polygons are made, there is a morphological opening step. Therefore, nuclei that are connected by only a small diagonal line will be separated. When there are 2 polygons created, TissueMaps throws away the smaller one, thus loosing the segmentation for the smaller nucleus.

I will try to fix this the following way: Use a 4-connected labeling instead of 8-connected labeling (diagonal pixels will not be considered neighbours). In this way, nuclei with only diagonal connections will be considered different nuclei. @HackerMD Are there general problems you would expect with such an approach?

screen shot 2017-04-27 at 10 28 16 screen shot 2017-04-27 at 10 28 06
hackermd commented 7 years ago

Different labeling would be a workaround. The question is, however, why these objects are still connected? We dilate the separating line already.