public static List<ProcessedCell> findCells(ImagePlus orig, ImagePlus segmented, String imgName){
		ImageProcessor masked = orig.getProcessor();
		ImageProcessor threshSeg = segmented.getProcessor();
		int width = segmented.getWidth();
		int height = segmented.getHeight();
		Wand wand = new Wand(threshSeg);
		List<ProcessedCell> cells = new LinkedList<ProcessedCell>();
		HashSet<Integer> ids = new HashSet<Integer>();
		ids.add(0);
		for(int i = 0; i < width; i++){
			for(int j = 0; j < height; j++){
				int id = threshSeg.get(i,j);
				if(!ids.contains(id)){
					ids.add(id);
					wand.autoOutline(i, j, 0.0, Wand.EIGHT_CONNECTED);
					Roi roi = new PolygonRoi(wand.xpoints, wand.ypoints, wand.npoints, Roi.POLYGON);
					orig.setRoi(roi);
					ResultsTable rt = new ResultsTable();
					Analyzer analyzer = new Analyzer(orig, 
							Measurements.AREA | Measurements.RECT | Measurements.CENTER_OF_MASS | Measurements.MEAN, rt);
					analyzer.measure();
					cells.add(new ProcessedCell(imgName, masked, threshSeg, id, 
							new BoundaryBox(rt, 0), (int) rt.getValue("Area", 0), rt.getValue("Mean", 0), 
							new Point((int) rt.getValue("XM", 0), (int) rt.getValue("YM", 0))));
					orig.restoreRoi();
				}
			}
		}
		
		return cells;
	}