コード例 #1
0
  @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;
  }
コード例 #2
0
 @EventHandler
 protected void onEvent(final AxisPositionEvent evt) {
   final Display<?> activeDisplay = displayService.getActiveDisplay();
   if (evt.getDisplay() == activeDisplay) drawIcon();
 }
コード例 #3
0
 @EventHandler
 protected void onEvent(final DisplayDeletedEvent evt) {
   if (displayService.getActiveDisplay() == null) drawIcon();
 }