/** Sets the Plot object shown in this PlotWindow. Does not update the window. */ public void setPlot(Plot plot) { this.plot = plot; ((PlotCanvas)getCanvas()).setPlot(plot); }
/** Sets the Plot object shown in this PlotWindow. Does not update the window. */ public void setPlot(Plot plot) { this.plot = plot; ((PlotCanvas)getCanvas()).setPlot(plot); }
/** Creates a PlotWindow from a given ImagePlus with a Plot object. * (called when reading an ImagePlus with an associated plot from a file) */ public PlotWindow(ImagePlus imp, Plot plot) { super(imp); ((PlotCanvas)getCanvas()).setPlot(plot); this.plot = plot; draw(); }
/** * @deprecated * replaced by the Plot class. */ public PlotWindow(String title, String xLabel, String yLabel, float[] xValues, float[] yValues) { super(createImage(title, xLabel, yLabel, xValues, yValues)); plot = staticPlot; ((PlotCanvas)getCanvas()).setPlot(plot); }
/** Creates a PlotWindow from a given ImagePlus with a Plot object. * (called when reading an ImagePlus with an associated plot from a file) */ public PlotWindow(ImagePlus imp, Plot plot) { super(imp); ((PlotCanvas)getCanvas()).setPlot(plot); this.plot = plot; draw(); }
/** * @deprecated * replaced by the Plot class. */ public PlotWindow(String title, String xLabel, String yLabel, float[] xValues, float[] yValues) { super(createImage(title, xLabel, yLabel, xValues, yValues)); plot = staticPlot; ((PlotCanvas)getCanvas()).setPlot(plot); }
/** Creates a PlotWindow from a Plot object. */ PlotWindow(Plot plot) { super(plot.getImagePlus()); ((PlotCanvas)getCanvas()).setPlot(plot); this.plot = plot; draw(); }
/** Draws a new plot in this window. */ public void drawPlot(Plot plot) { this.plot = plot; if (imp!=null) { if (ic instanceof PlotCanvas) ((PlotCanvas)ic).setPlot(plot); imp.setProcessor(null, plot.getProcessor()); plot.setImagePlus(imp); //also adjusts the calibration of imp } }
/** Creates a PlotWindow from a Plot object. */ PlotWindow(Plot plot) { super(plot.getImagePlus()); ((PlotCanvas)getCanvas()).setPlot(plot); this.plot = plot; draw(); }
/** Draws a new plot in this window. */ public void drawPlot(Plot plot) { this.plot = plot; if (imp!=null) { if (ic instanceof PlotCanvas) ((PlotCanvas)ic).setPlot(plot); imp.setProcessor(null, plot.getProcessor()); plot.setImagePlus(imp); //also adjusts the calibration of imp } }
public void run() { while (true) { IJ.wait(50); //delay to make sure the roi has been updated Plot plot = plotMaker!=null?plotMaker.getPlot():null; if (doUpdate && plot!=null && plot.getNumPlotObjects()>0) { plot.useTemplate(this.plot, this.plot.templateFlags); plot.setPlotMaker(plotMaker); this.plot = plot; ((PlotCanvas)ic).setPlot(plot); ImageProcessor ip = plot.getProcessor(); if (ip!=null && imp!=null) { imp.setProcessor(null, ip); plot.setImagePlus(imp); } } synchronized(this) { if (doUpdate) { doUpdate = false; //and loop again } else { try {wait();} //notify wakes up the thread catch(InterruptedException e) { //interrupted tells the thread to exit return; } } } } }
public void run() { while (true) { IJ.wait(50); //delay to make sure the roi has been updated Plot plot = plotMaker!=null?plotMaker.getPlot():null; if (doUpdate && plot!=null && plot.getNumPlotObjects()>0) { plot.useTemplate(this.plot, this.plot.templateFlags); plot.setPlotMaker(plotMaker); this.plot = plot; ((PlotCanvas)ic).setPlot(plot); ImageProcessor ip = plot.getProcessor(); if (ip!=null && imp!=null) { imp.setProcessor(null, ip); plot.setImagePlus(imp); } } synchronized(this) { if (doUpdate) { doUpdate = false; //and loop again } else { try {wait();} //notify wakes up the thread catch(InterruptedException e) { //interrupted tells the thread to exit return; } } } } }