for (int i = 0; i < waterShed.length; i++) {
if (control.getSlice(z)[i] == 0)
waterShed[i] = (short) 0;
}
Watershed_Algorithm wc = new Watershed_Algorithm();
wc.run(waterShed, width, height);
int regionID = 1;
int maxCount = Integer.MIN_VALUE;
Point p = null;
short[] mark = new short[width * height];
int countregs = 0;