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

Method copyAttributes

ij/src/main/java/ij/ImagePlus.java:2808–2825  ·  view source on GitHub ↗

Used internally.

(ImagePlus imp)

Source from the content-addressed store, hash-verified

2806
2807 /** Used internally. */
2808 public void copyAttributes(ImagePlus imp) {
2809 if (IJ.debugMode) IJ.log("copyAttributes: "+imp.getID()+" "+this.getID()+" "+imp+" "+this);
2810 if (imp==null || imp.getWindow()!=null)
2811 throw new IllegalArgumentException("Source image is null or displayed");
2812 ID = imp.getID();
2813 setTitle(imp.getTitle());
2814 setCalibration(imp.getCalibration());
2815 FileInfo fi = imp.getOriginalFileInfo();
2816 if (fi!=null)
2817 setFileInfo(fi);
2818 Object info = imp.getProperty("Info");
2819 if (info!=null)
2820 setProperty("Info", imp.getProperty("Info"));
2821 setProperties(imp.getPropertiesAsArray());
2822 Object plot = imp.getProperty(Plot.PROPERTY_KEY);
2823 if (plot != null)
2824 setProperty(Plot.PROPERTY_KEY, plot);
2825 }
2826
2827 /** Calls System.currentTimeMillis() to save the current
2828 time so it can be retrieved later using getStartTime()

Callers 2

runMethod · 0.95
convertToLabMethod · 0.95

Calls 13

logMethod · 0.95
getIDMethod · 0.95
setTitleMethod · 0.95
setCalibrationMethod · 0.95
setFileInfoMethod · 0.95
setPropertyMethod · 0.95
setPropertiesMethod · 0.95
getCalibrationMethod · 0.80
getOriginalFileInfoMethod · 0.80
getPropertiesAsArrayMethod · 0.80
getTitleMethod · 0.65
getWindowMethod · 0.45

Tested by

no test coverage detected