Codota Logo
OverlayService.addOverlays
Code IndexAdd Codota to your IDE (free)

How to use
addOverlays
method
in
net.imagej.display.OverlayService

Best Java code snippets using net.imagej.display.OverlayService.addOverlays (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: net.imagej/imagej-common

private void attachOverlays(final ImageDisplay inputDisp,
  final ImageDisplay outputDisp, final List<Overlay> overlays)
{
  final RealRect bounds = overlayService.getSelectionBounds(inputDisp);
  final double[] toOrigin = new double[2];
  toOrigin[0] = -bounds.x;
  toOrigin[1] = -bounds.y;
  final List<Overlay> newOverlays = new ArrayList<>();
  for (final Overlay overlay : overlays) {
    if (overlayWithinBounds(overlay, bounds)) {
      // add a reference to existing overlay?
      if (toOrigin[0] == 0 && toOrigin[1] == 0) {
        newOverlays.add(overlay);
      }
      else { // different origins means must create new overlays
        final Overlay newOverlay = overlay.duplicate();
        newOverlay.move(toOrigin);
        newOverlays.add(newOverlay);
      }
    }
  }
  overlayService.addOverlays(outputDisp, newOverlays);
}
origin: net.imagej/imagej-legacy

/**
 * Updates the given {@link ImageDisplay} to contain {@link Overlay}s
 * corresponding to all the given {@link ImagePlus}'s Rois (both the active
 * Roi and the Rois stored in ImageJ 1.x's current Overlay).
 */
@Override
public void updateDisplay(final ImageDisplay display, final ImagePlus imp) {
  final List<Overlay> overlaysToRemove = overlayService.getOverlays(display);
  for (final Overlay overlay : overlaysToRemove) {
    overlayService.removeOverlay(display, overlay);
  }
  /*
  if (fullySelected(display, imp)) {
    for (DataView view : display)
      view.setSelected(true);
  }
  else {
  */
  final List<Overlay> overlays = getOverlays(imp);
  overlayService.addOverlays(display, overlays);
  // }
  setModernThreshold(display, imp);
}
net.imagej.displayOverlayServiceaddOverlays

Javadoc

Adds the list of Overlays to the given ImageDisplay.

Popular methods of OverlayService

  • removeOverlay
    Removes an Overlay from all ImageDisplays.
  • getActiveOverlay
    Returns the active overlay associated with a display
  • getDefaultSettings
  • getOverlays
    Gets a list of Overlays linked to the given ImageDisplay. If selectedOnly is true then it will gathe
  • divideCompositeOverlay
    Divides a CompositeOverlay into its constituent parts and registers each part with the appropriate d
  • drawOverlay
    Draws the outline of a given overlay in a display using the set of channel information provided.
  • fillOverlay
    Draws and fills the outline of a given overlay in a display using the set of channel information pro
  • getFirstDisplay
    Returns the first display associated with an overlay
  • getOverlayInfo
    Returns the overlay info list associated with this service. There is one list per ImageJ context. It
  • getSelectionBounds
    Gets the bounding box for the selected overlays in the given ImageDisplay.

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • orElseThrow (Optional)
  • setContentView (Activity)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now