Returns a new ImagePlus with this image's attributes (e.g. spatial scale), but no image.
()
| 2759 | /** Returns a new ImagePlus with this image's attributes |
| 2760 | (e.g. spatial scale), but no image. */ |
| 2761 | public ImagePlus createImagePlus() { |
| 2762 | ImagePlus imp2 = new ImagePlus(); |
| 2763 | imp2.setType(getType()); |
| 2764 | imp2.setCalibration(getCalibration()); |
| 2765 | String info = (String)getProperty("Info"); |
| 2766 | if (info!=null) |
| 2767 | imp2.setProperty("Info", info); |
| 2768 | imp2.setProperties(getPropertiesAsArray()); |
| 2769 | FileInfo fi = getOriginalFileInfo(); |
| 2770 | if (fi!=null) { |
| 2771 | fi = (FileInfo)fi.clone(); |
| 2772 | fi.directory = null; |
| 2773 | fi.url = null; |
| 2774 | imp2.setFileInfo(fi); |
| 2775 | } |
| 2776 | return imp2; |
| 2777 | } |
| 2778 | |
| 2779 | |
| 2780 | /** This method has been replaced by IJ.createHyperStack(). */ |