Skip to main content
. 2019 Aug 30;10(9):666. doi: 10.3390/genes10090666
Algorithm 2: SP-FCM Clustering Algorithm
1. Input: Pre-processed cryo-EM image Ip
2. Return: Super-clustered image Isc
3. Set number of clusters, k
4. Generate the 2D super-pixel over segmentation image
5.  begin/*SLIC*/
6.  Initialize the cluster centers Ck=lk,xk,ykT
7.  Move the cluster center cluster centers to the lowest gradient position in a 3 × 3 neighborhood.
8.  Set label li=1 for each pixel i.
9.  Set distance di= for each pixel i.
10.  repeat
11.   for k=1 to K do
12.    for each pixel i in 2S×2S region around Ck do
13.     Compute distance D between Ck and i.
14.     if D<di then
15.      Set di=D.
16.      Set li=k.
17.     end if
18.    end for
19.   end for
20.   Compute new cluster center θk.
21.   Compute residual error E.
22.  until Ethreshold
23. generate binary mask
24. end/* SLIC */
25. repeat
26.   for n = 1 to N do
27.    Update membership unk by taking sum of distance ratios of cluster k and all clusters.
28.                 unk=i=1Kdxn,θkdxn,θi1m1
29.       end for
30. until change in cluster centers are small
31. for k = 1 to K do/* foe each clustered image */
32.    IscMinNonzeroIk/* extract the total number of the non-zero element in each cluster and select the minimum one as a final selected clustered image */
33. end for