/** Fills the polygon using the ImageProcessor's current drawing color. */ public void fill(ImageProcessor ip, Rectangle r) { ip.fill(getMask(r.width, r.height)); }
/** Fills the polygon using the ImageProcessor's current drawing color. */ public void fill(ImageProcessor ip, Rectangle r) { ip.fill(getMask(r.width, r.height)); }
ImageProcessor mask = pf.getMask(bounds.width, bounds.height); setMask(mask); setRoi(bounds);
private void fillPolygon(ImageProcessor ip, Polygon p, boolean internContour) { PolygonRoi proi = new PolygonRoi(p, PolygonRoi.POLYGON); Rectangle r = proi.getBounds(); PolygonFiller pf = new PolygonFiller(); pf.setPolygon(proi.getXCoordinates(), proi.getYCoordinates(), proi.getNCoordinates()); ip.setRoi(r); ImageProcessor objectMask = pf.getMask(r.width, r.height); ip.fill(objectMask); if(!internContour){ ip.drawPolygon(p); } }
ImageProcessor mask = pf.getMask(bounds.width, bounds.height); setMask(mask); setRoi(bounds);
public ImageProcessor getMask() { if (cachedMask!=null && cachedMask.getPixels()!=null && cachedMask.getWidth()==width && cachedMask.getHeight()==height) return cachedMask; PolygonFiller pf = new PolygonFiller(); if (xSpline!=null) pf.setPolygon(toIntR(xSpline), toIntR(ySpline), splinePoints); else if (xpf!=null) pf.setPolygon(toIntR(xpf), toIntR(ypf), nPoints); else pf.setPolygon(xp, yp, nPoints); cachedMask = pf.getMask(width, height); return cachedMask; }
public ImageProcessor getMask() { if (cachedMask!=null && cachedMask.getPixels()!=null && cachedMask.getWidth()==width && cachedMask.getHeight()==height) return cachedMask; PolygonFiller pf = new PolygonFiller(); if (xSpline!=null) pf.setPolygon(toIntR(xSpline), toIntR(ySpline), splinePoints); else if (xpf!=null) pf.setPolygon(toIntR(xpf), toIntR(ypf), nPoints); else pf.setPolygon(xp, yp, nPoints); cachedMask = pf.getMask(width, height); return cachedMask; }
PolygonRoi proi = (PolygonRoi)roi; pf.setPolygon(proi.getXCoordinates(), proi.getYCoordinates(), proi.getNCoordinates()); ip2.setMask(pf.getMask(r.width, r.height)); if (floodFill) ff.particleAnalyzerFill(x, y, level1, level2, ip2.getMask(), r);
PolygonRoi proi = (PolygonRoi)roi; pf.setPolygon(proi.getXCoordinates(), proi.getYCoordinates(), proi.getNCoordinates()); ip2.setMask(pf.getMask(r.width, r.height)); if (floodFill) ff.particleAnalyzerFill(x, y, level1, level2, ip2.getMask(), r);