An ImagePlus contain an ImageProcessor (2D image) or an ImageStack (3D, 4D or 5D image). It also includes metadata (spatial calibration and possibly the directory/file where it was read from). The ImageProcessor contains the pixel data (8-bit, 16-bit, float or RGB) of the 2D image and some basic met
| 92 | */ |
| 93 | |
| 94 | public class ImagePlus implements ImageObserver, Measurements, Cloneable { |
| 95 | @AstroImageJ(reason = "Fix memory leak with virtual stacks and image listeners") |
| 96 | public static final ScopedValue<Boolean> TEMPORARY_IMAGE = ScopedValue.newInstance(); |
| 97 | |
| 98 | /** 8-bit grayscale (unsigned)*/ |
| 99 | public static final int GRAY8 = 0; |
| 100 | |
| 101 | /** 16-bit grayscale (unsigned) */ |
| 102 | public static final int GRAY16 = 1; |
| 103 | |
| 104 | /** 32-bit floating-point grayscale */ |
| 105 | public static final int GRAY32 = 2; |
| 106 | |
| 107 | /** 8-bit indexed color */ |
| 108 | public static final int COLOR_256 = 3; |
| 109 | |
| 110 | /** 32-bit RGB color */ |
| 111 | public static final int COLOR_RGB = 4; |
| 112 | |
| 113 | /** Title of image used by Flatten command */ |
| 114 | public static final String flattenTitle = "flatten~canvas"; |
| 115 | |
| 116 | /** True if any changes have been made to this image. */ |
| 117 | public boolean changes; |
| 118 | |
| 119 | protected Image img; |
| 120 | protected ImageProcessor ip; |
| 121 | protected ImageWindow win; |
| 122 | protected Roi roi; |
| 123 | protected int currentSlice; // current stack index (one-based) |
| 124 | protected static final int OPENED=0, CLOSED=1, UPDATED=2, SAVED=3; |
| 125 | protected boolean compositeImage; |
| 126 | protected int width; |
| 127 | protected int height; |
| 128 | protected boolean locked; |
| 129 | private int lockedCount; |
| 130 | private Thread lockingThread; |
| 131 | protected int nChannels = 1; |
| 132 | protected int nSlices = 1; |
| 133 | protected int nFrames = 1; |
| 134 | protected boolean dimensionsSet; |
| 135 | |
| 136 | private ImageJ ij = IJ.getInstance(); |
| 137 | private String title; |
| 138 | private String url; |
| 139 | private FileInfo fileInfo; |
| 140 | private int imageType = GRAY8; |
| 141 | private boolean typeSet; |
| 142 | private ImageStack stack; |
| 143 | private static int currentID = -1; |
| 144 | private int ID; |
| 145 | private static Component comp; |
| 146 | private boolean imageLoaded; |
| 147 | private int imageUpdateY, imageUpdateW; |
| 148 | private Properties properties; |
| 149 | private long startTime; |
| 150 | private Calibration calibration; |
| 151 | private static Calibration globalCalibration; |
nothing calls this directly
no test coverage detected