Пример #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;
  }