MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / updateImage

Method updateImage

ij/src/main/java/ij/ImagePlus.java:520–541  ·  view source on GitHub ↗

ImageCanvas.paint() calls this method when the ImageProcessor has generated a new image.

()

Source from the content-addressed store, hash-verified

518 * ImageProcessor has generated a new image.
519 */
520 @AstroImageJ(reason = "Support for Vectorized and Scaled plots", modified = true)
521 public void updateImage() {
522 if (win==null) {
523 img = null;
524 return;
525 }
526
527 if (getProperty(VectorPlotDrawing.PROPERTY_KEY)!=null && win instanceof PlotWindow) {
528 Plot plot = (Plot)(getProperty(VectorPlotDrawing.PROPERTY_KEY));
529 img = plot.getBufferedImage(width, height);
530 return;
531 }
532
533 if (stack instanceof PlotVirtualStack plotVirtualStack) {
534 var plot = plotVirtualStack.getPlot(currentSlice);
535 img = plot.getBufferedImage(width, height);
536 return;
537 }
538
539 if (ip!=null)
540 img = ip.createImage();
541 }
542
543 /** Closes the window, if any, that is displaying this image. */
544 public void hide() {

Callers 4

setPositionMethod · 0.95
runMethod · 0.95
setProcessor2Method · 0.45
setStackMethod · 0.45

Calls 4

getPropertyMethod · 0.95
getPlotMethod · 0.65
getBufferedImageMethod · 0.45
createImageMethod · 0.45

Tested by

no test coverage detected