(ImagePlus imp)
| 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(); |
no test coverage detected