/** stop the background process responsible for preview as fast as possible and wait until the preview thread has finished */ private void killPreview() { if (previewThread == null) return; synchronized (this) { previewThread.interrupt(); //ask for premature finishing (interrupt first -> no keepPreview) bgPreviewOn = false; //tell a possible background thread to terminate when it has finished if (roisForThread!=null) interruptRoiThreads(roisForThread); } waitForPreviewDone(); imp.setOverlay(originalOverlay); }
/** stop the background process responsible for preview as fast as possible and wait until the preview thread has finished */ private void killPreview() { if (previewThread == null) return; synchronized (this) { previewThread.interrupt(); //ask for premature finishing (interrupt first -> no keepPreview) bgPreviewOn = false; //tell a possible background thread to terminate when it has finished if (roisForThread!=null) interruptRoiThreads(roisForThread); } waitForPreviewDone(); imp.setOverlay(originalOverlay); }
previewCheckbox!=null && previewCheckboxOn) { bgKeepPreview = true; waitForPreviewDone(); processedAsPreview = imp.getCurrentSlice(); } else {
previewCheckbox!=null && previewCheckboxOn) { bgKeepPreview = true; waitForPreviewDone(); processedAsPreview = imp.getCurrentSlice(); } else {