@Override public ImageDisplay createDisplay(final ImagePlus imp, final AxisType[] preferredOrder) { final Dataset ds = makeColorDataset(imp, preferredOrder); pixelHarmonizer.updateDataset(ds, imp); metadataHarmonizer.updateDataset(ds, imp); compositeHarmonizer.updateDataset(ds, imp); // CTR FIXME - add imageDisplayService.createImageDisplay method? // returns null if it cannot find an ImageDisplay-compatible display? final ImageDisplay display = (ImageDisplay) displayService.createDisplay(ds.getName(), ds); colorTableHarmonizer.updateDisplay(display, imp); // NB - correct thresholding behavior requires overlay harmonization after // color table harmonization overlayHarmonizer.updateDisplay(display, imp); positionHarmonizer.updateDisplay(display, imp); nameHarmonizer.updateDisplay(display, imp); return display; }
@EventHandler protected void onEvent(final AxisPositionEvent evt) { final Display<?> activeDisplay = displayService.getActiveDisplay(); if (evt.getDisplay() == activeDisplay) drawIcon(); }
@EventHandler protected void onEvent(final DisplayDeletedEvent evt) { if (displayService.getActiveDisplay() == null) drawIcon(); }