ImageCanvas.paint() calls this method when the ImageProcessor has generated a new image.
()
| 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() { |
no test coverage detected