s=new ArrayList lt; Claster gt; (); lt; Block gt; blocks=new ArrayList lt; Block gt; () ;. add (new Claster (typeClasster, Color.BLACK, 128)); (int i=0; i lt; w; i +=step) {(int j=0; j lt ; h; j +=step) {[i] [j]=null;
}
} (int i=0; i lt; w; i +=step) {(int j=0; j lt; h; j +=step) {. add (new Block (typeClasster, new Index (i, j, w, h), new Index (i + step, j + step, w, h))); [i] [j]=blocks.get (countBlock) ;. get (typeClasster). setColorRGB (blocks.get (countBlock) .R, blocks.get (countBlock) .G, blocks.get (countBlock) .B); ++;
}
}. get (0) .resetRgb (); maxx=0; (int i=0; i lt; w; i +=step) {(int j=0; j lt; h; j +=step) {(twoDArrayBlock [i] [j] .getTYPECLASSTER () == 0) {. add (new Claster (++ typeClasster, Color.AZURE, 255));=twoDArrayBlock; (clasters.get (typeClasster ), i, j, sigma, step, 0) ;. get (typeClasster) .resetRgb ();
}
}
} (int j=0; j lt; blocks.size (); j ++) {. get (j) .setColor (clasters.get (blocks.get (j) .getTYPECLASSTER ()).color);
} (v, writableImage);=null;=null;=null; maxx;
}