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

Method getImagePlus

ij/src/main/java/ij/gui/Plot.java:1672–1695  ·  view source on GitHub ↗

Returns the plot as an ImagePlus. If an ImagePlus for this plot already exists, displays the plot in that ImagePlus and returns it.

()

Source from the content-addressed store, hash-verified

1670 /** Returns the plot as an ImagePlus.
1671 * If an ImagePlus for this plot already exists, displays the plot in that ImagePlus and returns it. */
1672 public ImagePlus getImagePlus() {
1673 if (stack != null) {
1674 if (imp != null)
1675 return imp;
1676 else {
1677 imp = new ImagePlus(title, stack);
1678 adjustCalibration(imp.getCalibration());
1679 return imp;
1680 }
1681 }
1682 if (plotDrawn)
1683 updateImage();
1684 else
1685 draw();
1686 if (imp != null) {
1687 if (imp.getProcessor() != ip)
1688 imp.setProcessor(ip);
1689 return imp;
1690 } else {
1691 ImagePlus imp = new ImagePlus(title, ip);
1692 setImagePlus(imp);
1693 return imp;
1694 }
1695 }
1696
1697 /** Sets the ImagePlus where the plot will be displayed. If the ImagePlus is not
1698 * known otherwise (e.g. from getImagePlus), this is needed for changes such as

Callers 15

runMethod · 0.95
dialogItemChangedMethod · 0.95
showMethod · 0.95
setCurrentWindowMethod · 0.45
getActiveImageMethod · 0.45
addImageWindowMethod · 0.45
showPlotMethod · 0.45
updatePlotMethod · 0.45
enableLivePlotMethod · 0.45
getTransferDataMethod · 0.45
PlotWindowMethod · 0.45

Calls 7

adjustCalibrationMethod · 0.95
getCalibrationMethod · 0.95
updateImageMethod · 0.95
drawMethod · 0.95
getProcessorMethod · 0.95
setProcessorMethod · 0.95
setImagePlusMethod · 0.95

Tested by

no test coverage detected