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

Method getImage

ij/src/main/java/ij/ImagePlus.java:685–700  ·  view source on GitHub ↗

Returns this image as a AWT image.

()

Source from the content-addressed store, hash-verified

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

Callers 6

showMethod · 0.95
getBufferedImageMethod · 0.95
flattenMethod · 0.95
getTransferDataMethod · 0.95
runMethod · 0.95
writeImageMethod · 0.95

Calls 4

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

Tested by

no test coverage detected