Returns this image as a AWT image.
()
| 683 | |
| 684 | /** Returns this image as a AWT image. */ |
| 685 | @AstroImageJ(reason = "Support for Vectorized and Scaled plots", modified = true) |
| 686 | public Image getImage() { |
| 687 | if (img==null && getProperty(VectorPlotDrawing.PROPERTY_KEY)!=null && win instanceof PlotWindow) { |
| 688 | Plot plot = (Plot)(getProperty(VectorPlotDrawing.PROPERTY_KEY)); |
| 689 | img = plot.getBufferedImage(width, height); |
| 690 | return img; |
| 691 | } |
| 692 | if (img==null && stack instanceof PlotVirtualStack plotVirtualStack) { |
| 693 | var plot = plotVirtualStack.getPlot(currentSlice); |
| 694 | img = plot.getBufferedImage(width, height); |
| 695 | return img; |
| 696 | } |
| 697 | if (img==null && ip!=null) |
| 698 | img = ip.createImage(); |
| 699 | return img; |
| 700 | } |
| 701 | |
| 702 | /** Returns a copy of this image as an 8-bit or RGB BufferedImage. |
| 703 | * @see ij.process.ShortProcessor#get16BitBufferedImage |
no test coverage detected