Sets the ImageProcessor, Roi, AWT Image and stack image arrays to null. Does nothing if the image is locked.
()
| 2596 | /** Sets the ImageProcessor, Roi, AWT Image and stack image |
| 2597 | arrays to null. Does nothing if the image is locked. */ |
| 2598 | public synchronized void flush() { |
| 2599 | notifyListeners(CLOSED); |
| 2600 | if (locked || ignoreFlush) return; |
| 2601 | ip = null; |
| 2602 | if (roi!=null) roi.setImage(null); |
| 2603 | roi = null; |
| 2604 | if (stack!=null && stack.viewers(-1)<=0) { |
| 2605 | Object[] arrays = stack.getImageArray(); |
| 2606 | if (arrays!=null) { |
| 2607 | for (int i=0; i<arrays.length; i++) |
| 2608 | arrays[i] = null; |
| 2609 | } |
| 2610 | if (isComposite()) |
| 2611 | ((CompositeImage)this).setChannelsUpdated(); //flush |
| 2612 | } |
| 2613 | setStackNull(); |
| 2614 | img = null; |
| 2615 | win = null; |
| 2616 | if (roi!=null) roi.setImage(null); |
| 2617 | roi = null; |
| 2618 | properties = null; |
| 2619 | //calibration = null; |
| 2620 | overlay = null; |
| 2621 | flatteningCanvas = null; |
| 2622 | } |
| 2623 | |
| 2624 | public void setIgnoreFlush(boolean ignoreFlush) { |
| 2625 | this.ignoreFlush = ignoreFlush; |
nothing calls this directly
no test coverage detected