public final class DefaultOverlayService extends AbstractService implements OverlayService
Overlay
s.Constructor and Description |
---|
DefaultOverlayService() |
Modifier and Type | Method and Description |
---|---|
void |
addOverlays(ImageDisplay display,
List<? extends Overlay> overlays)
Adds the list of
Overlay s to the given ImageDisplay . |
void |
divideCompositeOverlay(CompositeOverlay overlay)
Divides a CompositeOverlay into its constituent parts and registers each
part with the appropriate displays.
|
void |
drawOverlay(Overlay o,
Dataset ds,
Position position,
ChannelCollection channels)
Draws the outline of a given overlay in a dataset using the set of channel
information provided.
|
void |
drawOverlay(Overlay o,
ImageDisplay display,
ChannelCollection channels)
Draws the outline of a given overlay in a display using the set of channel
information provided.
|
void |
fillOverlay(Overlay o,
Dataset ds,
Position position,
ChannelCollection channels)
Draws and fills the outline of a given overlay in a dataset using the set
of channel information provided.
|
void |
fillOverlay(Overlay o,
ImageDisplay display,
ChannelCollection channels)
Draws and fills the outline of a given overlay in a display using the set
of channel information provided.
|
Overlay |
getActiveOverlay(ImageDisplay disp)
Returns the active overlay associated with a display
|
OverlaySettings |
getDefaultSettings() |
List<ImageDisplay> |
getDisplays(Overlay o)
Returns all the displays associated with an overlay
|
ImageDisplay |
getFirstDisplay(Overlay o)
Returns the first display associated with an overlay
|
ObjectService |
getObjectService() |
OverlayInfoList |
getOverlayInfo()
Returns the overlay info list associated with this service.
|
List<Overlay> |
getOverlays()
Gets a list of all
Overlay s. |
List<Overlay> |
getOverlays(ImageDisplay display)
Gets a list of
Overlay s linked to the given ImageDisplay . |
List<Overlay> |
getOverlays(ImageDisplay display,
boolean selectedOnly)
Gets a list of
Overlay s linked to the given ImageDisplay . |
RealRect |
getSelectionBounds(ImageDisplay display)
Gets the bounding box for the selected overlays in the given
ImageDisplay . |
void |
removeOverlay(ImageDisplay display,
Overlay overlay)
Removes an
Overlay from the given ImageDisplay . |
void |
removeOverlay(Overlay overlay)
Removes an
Overlay from all ImageDisplay s. |
getContext, setContext, toString
getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
initialize, registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
public ObjectService getObjectService()
getObjectService
in interface OverlayService
public List<Overlay> getOverlays()
OverlayService
Overlay
s. This method is a shortcut that
delegates to ObjectService
.getOverlays
in interface OverlayService
public List<Overlay> getOverlays(ImageDisplay display, boolean selectedOnly)
OverlayService
Overlay
s linked to the given ImageDisplay
.
If selectedOnly is true then it will gather overlays from the selected
views only. Otherwise it will gather overlays from all the views.getOverlays
in interface OverlayService
public List<Overlay> getOverlays(ImageDisplay display)
OverlayService
Overlay
s linked to the given ImageDisplay
. A
shortcut for getOverlays(display, false)
.getOverlays
in interface OverlayService
public void addOverlays(ImageDisplay display, List<? extends Overlay> overlays)
OverlayService
Overlay
s to the given ImageDisplay
.addOverlays
in interface OverlayService
public void removeOverlay(ImageDisplay display, Overlay overlay)
OverlayService
Overlay
from the given ImageDisplay
.removeOverlay
in interface OverlayService
display
- the ImageDisplay
from which the overlay should be
removedoverlay
- the Overlay
to removepublic void removeOverlay(Overlay overlay)
OverlayService
Overlay
from all ImageDisplay
s.removeOverlay
in interface OverlayService
overlay
- the Overlay
to removepublic RealRect getSelectionBounds(ImageDisplay display)
OverlayService
ImageDisplay
.getSelectionBounds
in interface OverlayService
display
- the ImageDisplay
from which the bounding box should
be computedpublic OverlaySettings getDefaultSettings()
getDefaultSettings
in interface OverlayService
public void drawOverlay(Overlay o, ImageDisplay display, ChannelCollection channels)
OverlayService
drawOverlay
in interface OverlayService
public void drawOverlay(Overlay o, Dataset ds, Position position, ChannelCollection channels)
OverlayService
drawOverlay
in interface OverlayService
public void fillOverlay(Overlay o, ImageDisplay display, ChannelCollection channels)
OverlayService
fillOverlay
in interface OverlayService
public void fillOverlay(Overlay o, Dataset ds, Position position, ChannelCollection channels)
OverlayService
fillOverlay
in interface OverlayService
public ImageDisplay getFirstDisplay(Overlay o)
OverlayService
getFirstDisplay
in interface OverlayService
public List<ImageDisplay> getDisplays(Overlay o)
OverlayService
getDisplays
in interface OverlayService
public Overlay getActiveOverlay(ImageDisplay disp)
OverlayService
getActiveOverlay
in interface OverlayService
public OverlayInfoList getOverlayInfo()
OverlayService
getOverlayInfo
in interface OverlayService
public void divideCompositeOverlay(CompositeOverlay overlay)
OverlayService
divideCompositeOverlay
in interface OverlayService
Copyright © 2014–2022 ImageJ. All rights reserved.