@Override public Dataset getValue() { if (imageDisplayService == null) return null; return imageDisplayService.getActiveDataset(); }
@Override public Figure createDefaultFigure() { ImageDisplay display = imageDisplayService.getActiveImageDisplay(); if (display == null) return null; Dataset dataset = imageDisplayService.getActiveDataset(); if (dataset == null) return null; ThresholdOverlay overlay = thresholdService.getThreshold(display); return new ThresholdFigure(display, dataset, overlay); }
@Override public DataView createDataView(final Data data) { return imageDisplayService().createDataView(data); }
@Override public void fillOverlay(final Overlay o, final ImageDisplay display, final ChannelCollection channels) { draw(o, imageDisplayService.getActiveDataset(display), imageDisplayService .getActivePosition(display), channels, new OverlayFiller()); }
@Override public ImageDisplay getValue() { if (imageDisplayService == null) return null; return imageDisplayService.getActiveImageDisplay(); }
@Override public DatasetView getValue() { if (imageDisplayService == null) return null; return imageDisplayService.getActiveDatasetView(); }
imageDisplayService.getImageDisplays(); ImagePlus imp = lookupImagePlus(display); if (imp == null) { final Dataset ds = imageDisplayService.getActiveDataset(display); if ( LegacyUtils.dimensionsIJ1Compatible(ds)) {
@Override public Position getValue() { if (imageDisplayService == null) return null; return imageDisplayService.getActivePosition(); }
@Override public List<? extends DataView> getDataViews() { return imageDisplayService().getDataViews(); }
@Override public Overlay createNewOverlay() { ImageDisplay display = imageDisplayService.getActiveImageDisplay(); if (display == null) return null; return thresholdService.getThreshold(display); }
@Override public void drawOverlay(final Overlay o, final ImageDisplay display, final ChannelCollection channels) { draw(o, imageDisplayService.getActiveDataset(display), imageDisplayService .getActivePosition(display), channels, new OverlayOutliner()); }
@Override public DatasetView getActiveDatasetView(final ImageDisplay display) { return imageDisplayService().getActiveDatasetView(display); }
@Override public Position getActivePosition() { return imageDisplayService().getActivePosition(); }
private Dataset dataset() { return imageDisplayService.getActiveDataset(display); }
@Override public Overlay getValue() { if (imageDisplayService == null) return null; final ImageDisplay display = imageDisplayService.getActiveImageDisplay(); return display == null ? null : overlayService.getActiveOverlay(display); }
private void updateView(final ModuleItem<DatasetView> item) { update(item, imageDisplayService.getActiveDatasetView()); }
/** * Links a new {@link Overlay} and {@link OverlayView}, created by the given * {@link JHotDrawAdapter}, to the specified JHotDraw {@link Figure} of a * particular {@link ImageDisplay}. */ public <F extends Figure> void linkOverlay(final F figure, final JHotDrawAdapter<F> adapter, final ImageDisplay display) { final Overlay overlay = adapter.createNewOverlay(); final DataView view = imageDisplayService.createDataView(overlay); if (!(view instanceof OverlayView)) { throw new IllegalStateException("Unexpected data view: " + view); } final OverlayView overlayView = (OverlayView) view; adapter.updateOverlay(figure, overlayView); eventService.publish(new FigureCreatedEvent(overlayView, figure, display)); }
@Override public Position getActivePosition(final ImageDisplay display) { return imageDisplayService().getActivePosition(display); }
private Dataset dataset() { return imageDisplayService.getActiveDataset(display); }
private void specify() { final ImageDisplay imageDisplay = imageDisplayService.getActiveImageDisplay(); if (imageDisplay == null) return; // FIXME: Migrate SelectionSpecify functionality into OverlayService API. commandService.run("net.imagej.plugins.commands.overlay.SelectionSpecify", true, "display", imageDisplay); }