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

Method getImageInfo

ij/src/main/java/ij/plugin/ImageInfo.java:83–112  ·  view source on GitHub ↗
(ImagePlus imp)

Source from the content-addressed store, hash-verified

81 }
82
83 public String getImageInfo(ImagePlus imp) {
84 ImageProcessor ip = imp.getProcessor();
85 String infoProperty = null;
86 boolean isStack = imp.getStackSize()>1;
87 if (isStack || imp.hasImageStack()) {
88 ImageStack stack = imp.getStack();
89 String label = stack.getSliceLabel(imp.getCurrentSlice());
90 if (label!=null && label.indexOf('\n')>0)
91 infoProperty = label;
92 }
93 if (infoProperty==null || (isStack && (imp.getStack() instanceof ListVirtualStack))) {
94 infoProperty = (String)imp.getProperty("Info");
95 if (infoProperty==null)
96 infoProperty = getExifData(imp);
97 }
98 if (imp.getProp("HideInfo")==null) {
99 String properties = getImageProperties(imp);
100 if (properties!=null) {
101 if (infoProperty!=null)
102 infoProperty = properties + "\n" + infoProperty;
103 else
104 infoProperty = properties;
105 }
106 }
107 String info = getInfo(imp, ip);
108 if (infoProperty!=null)
109 return infoProperty + "--------------------------------------------\n" + info;
110 else
111 return info;
112 }
113
114 public String getExifData(ImagePlus imp) {
115 FileInfo fi = imp.getOriginalFileInfo();

Callers 3

getImageInfoMethod · 0.95
runMethod · 0.95
getImageInfoMethod · 0.95

Calls 12

getSliceLabelMethod · 0.95
getExifDataMethod · 0.95
getImagePropertiesMethod · 0.95
getInfoMethod · 0.95
hasImageStackMethod · 0.80
getCurrentSliceMethod · 0.80
getPropMethod · 0.80
getProcessorMethod · 0.45
getStackSizeMethod · 0.45
getStackMethod · 0.45
indexOfMethod · 0.45
getPropertyMethod · 0.45

Tested by

no test coverage detected