/** * @return Outer contour as traced roi */ public Roi getOuterContourAsROI(){ Polygon p = getOuterContour(); int n = p.npoints; float[] x = new float[p.npoints]; float[] y = new float[p.npoints]; for (int j=0; j<n; j++) { x[j] = p.xpoints[j]+0.5f; y[j] = p.ypoints[j]+0.5f; } Roi roi = new PolygonRoi(x,y,n,Roi.TRACED_ROI); Roi.setColor(Color.green); return roi; }
private void appearanceOptions() { final OptionsAppearance optionsAppearance = optionsService.getOptions(OptionsAppearance.class); Prefs.antialiasedText = false; Prefs.antialiasedTools = optionsAppearance.isAntialiasedToolIcons(); Prefs.blackCanvas = optionsAppearance.isBlackCanvas(); Prefs.open100Percent = optionsAppearance.isFullZoomImages(); Prefs.interpolateScaledImages = optionsAppearance.isInterpZoomedImages(); Prefs.noBorder = optionsAppearance.isNoImageBorder(); Prefs.useInvertingLut = optionsAppearance.isUseInvertingLUT(); Roi.setColor(AWTColors.getColor(optionsAppearance.getSelectionColor())); // TODO // this one needs to have code applied to modern ImageJ. Nothing to set for // legacy ImageJ. // Prefs.get(SettingsKeys.OPTIONS_APPEARANCE_MENU_FONT_SIZE); }
public void itemStateChanged(ItemEvent e) { Choice choice = (Choice)e.getSource(); String item = choice.getSelectedItem(); Color color = getColor(item, Color.black); if (choice==fchoice) Toolbar.setForegroundColor(color); else if (choice==bchoice) Toolbar.setBackgroundColor(color); else if (choice==schoice) { Roi.setColor(color); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null && imp.getRoi()!=null) imp.draw(); Toolbar.getInstance().repaint(); } }
public void itemStateChanged(ItemEvent e) { Choice choice = (Choice)e.getSource(); String item = choice.getSelectedItem(); Color color = getColor(item, Color.black); if (choice==fchoice) Toolbar.setForegroundColor(color); else if (choice==bchoice) Toolbar.setBackgroundColor(color); else if (choice==schoice) { Roi.setColor(color); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null && imp.getRoi()!=null) imp.draw(); Toolbar.getInstance().repaint(); } }
if (bc2!=bc) Toolbar.setBackgroundColor(bc); if (sc2!=sc) { Roi.setColor(sc); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null && imp.getRoi()!=null) imp.draw(); if (bc2!=bc) Toolbar.setBackgroundColor(bc2); if (sc2!=sc) { Roi.setColor(sc2); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) imp.draw();
if (bc2!=bc) Toolbar.setBackgroundColor(bc); if (sc2!=sc) { Roi.setColor(sc); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null && imp.getRoi()!=null) imp.draw(); if (bc2!=bc) Toolbar.setBackgroundColor(bc2); if (sc2!=sc) { Roi.setColor(sc2); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) imp.draw();
Toolbar.setForegroundColor(foregroundColor); Toolbar.setBackgroundColor(backgroundColor); Roi.setColor(roiColor); Analyzer.setMeasurements(measurements); Analyzer.setPrecision(decimalPlaces);
Toolbar.setForegroundColor(foregroundColor); Toolbar.setBackgroundColor(backgroundColor); Roi.setColor(roiColor); Analyzer.setMeasurements(measurements); Analyzer.setPrecision(decimalPlaces);
Color sc = Colors.getColor(selectionColor, Color.yellow); if (sc!=Roi.getColor()) { Roi.setColor(sc); redraw = true; Toolbar.getInstance().repaint();
Color sc = Colors.getColor(selectionColor, Color.yellow); if (sc!=Roi.getColor()) { Roi.setColor(sc); redraw = true; Toolbar.getInstance().repaint();