public static ArrayList<ArrayList<Point>> FloodfillLabelPoints(final BoolMatrix B, final String phenotype, final String filename, final BooleanFlag stop){
		ArrayList<ArrayList<Point>> blobs=new ArrayList<ArrayList<Point>>();
		final BoolMatrix D=new BoolMatrix(B.getWidth(),B.getHeight());
		pictureiterator: {
			for (int i=0;i<B.getWidth();i++){
				for (int j=0;j<B.getHeight();j++){				
					if (B.get(i,j) && !D.get(i,j)){
						if (stop != null && stop.get()){
							return blobs; //get out immediately
						}
						final ArrayList<Point> blob=new ArrayList<Point>();
						try {
							RecursiveFloodfillLabel(i,j,B,D,blob,stop);		
						}	
						catch (StackOverflowError stackoverflowerror){
							new Thread(){
								public void run(){
									if (phenotype == null && filename == null)
										return;
									String message = "Stack overflow error while trying to find centroids for " + phenotype + " in image " + filename + ".\n\nAre you sure you want to find centroids for all those phenotypes you selected?\nSome may not have centroids or have blobs that are too large.\n\nIf you still think GemIdent is in error, restart the program and beef up the Xss and Xoss parameters\n(see the section 2 of the manual).";
									JOptionPane.showMessageDialog(Run.it.getGUI(), message);
								}
							}.start();
							stackoverflowerror.printStackTrace();
							break pictureiterator;
						}					
						blobs.add(blob);
					}				
				}
			}
		}
		return blobs;
	}