Skip to main content
. 2017 Jun 21;4(2):027501. doi: 10.1117/1.JMI.4.2.027501

Algorithm 3.

Seed-refining algorithm (REFINE-SEEDS).

Inputs:
 - Iglandthreshold is the binary gland mask. White regions are glands on a black background.
 - Inuclei is binary the nuclei mask. White regions are nuclei on a black background.
 - Iseed_maxima is the binary maxima-seed mask. White regions are centroid locations of the gland objects.
 - Ilumen_clefting is the lumen-clefting RGB image. Blue objects are lumen and green objects are periacinar retraction clefting on a white background.
Output:
 - Iseed is the binary seed mask. White regions are seed objects on a black background.
Function and variable description:
 - PIXEL-IN(I) returns all the white pixels in the binary image I. DILATE(I,d) and DISTANCE-TRANSFORM(I) are the same functions as defined in Algorithm 2.
 - Given a binary image I, I¯ defines a binary image with corresponding inverted pixel values. IaIb and IaIb are the Boolean operations defining pixel-wise AND and OR operations between Ia and Ib, respectively.
 - pixels+ and pixels are two sets containing positive and negative charged particles (pixels).
 - MAX-ENTROPY-THRESHOLD(I) thresholds I using the entropy-based image thresholding method.47 Output is a binary image.
Parameters:
 - Select number of dilation operations d=8. This value for d was optimized empirically.
1:  Procedure REFINE-SEEDS (Iglandthreshold, Inuclei, Iseed_maxima, Ilumen_clefting)
2:   Inucleiborder=DILATE(Inuclei,8).
3:   Create binary lumen mask Ilumen from Ilumen_clefting.    ⊳ Ilumen indicate lumen in white.
4:   Sample some pixels along the edges of lumen objects (Ilumen) into pixels+.
5:   pixels+=pixels+PIXELSIN(Iseed_maxima).    ⊳ All the maxima seeds are added to pixels+.
6:   Extract approximate centroids of nuclei in Inuclei into pixels.    ⊳ Remove nuclei from the gland regions.
7:   Imask=IglandthresholdInucleiborder.
8:   Ifield=COMPUTE-FIELD(Iglandthreshold,pixels+,pixels).
9:   Ifield_map=Ifield×DISTANCETRANSFORM(Imask).    ⊳ Pixel-wise multiplication of two real valued images.
10:   Linearly rescale Ifield_map to values within [0, 255] for further numerical operations.
11:   Ifield_mapthershold=MAXENTROPYTHRESHOLD(Ifield_map).
12:   Fill holes in Ifield_mapthreshold image.
13:   Iseed=Iseed_maxima(Ifield_mapthresholdIlumen).    ⊳ Unify all the seeds.
14:   return seed mask Iseed.
15: end procedure