Class ColoredBase

Object
AnchorBean<StackProvider>
InitializableBean<StackProvider, ImageInitialization>
ImageBean<StackProvider>
BeanProviderAsStackBase<StackProvider, Stack>
StackProvider
ColoredBase
All Implemented Interfaces:
Provider<Stack>, ProviderAsStack
Direct Known Subclasses:
ColoredBaseWithGenerator, ColoredMask, ThreeColoredObjects

public abstract class ColoredBase extends StackProvider
Base class for providers that draw entities (an outline or filled) on a background.
Author:
Owen Feehan
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final ColorScheme
    The default ColorScheme used for generating colors.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract ColoredObjectCollection
    coloredObjectsToDraw(Dimensions backgroundDimensions)
    Creates colored-objects to be drawn.
    Stack
    get()
     
    ProviderAsStack
    The background.
    StackDisplayer
    How to convert an image to be displayed to the user.
    int
    The width of the outline (only relevant if outline==true).
    boolean
    If true, objects and the background are flattened in the z dimension (via maximum intensity projection), so that a 2D image is produced.
    boolean
    If true, an outline is drawn around the entries.
    boolean
    If true, the outline is suppressed in the z-dimension i.e.
    void
    setBackground(ProviderAsStack background)
    The background.
    void
    setDisplayer(StackDisplayer displayer)
    How to convert an image to be displayed to the user.
    void
    setFlatten(boolean flatten)
    If true, objects and the background are flattened in the z dimension (via maximum intensity projection), so that a 2D image is produced.
    void
    setOutline(boolean outline)
    If true, an outline is drawn around the entries.
    void
    setOutlineWidth(int outlineWidth)
    The width of the outline (only relevant if outline==true).
    void
    setSuppressOutlineZ(boolean suppressOutlineZ)
    If true, the outline is suppressed in the z-dimension i.e.

    Methods inherited from class org.anchoranalysis.image.bean.provider.stack.StackProvider

    getAsStack

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_COLOR_SET_GENERATOR

      protected static final ColorScheme DEFAULT_COLOR_SET_GENERATOR
      The default ColorScheme used for generating colors.
  • Constructor Details

    • ColoredBase

      public ColoredBase()
  • Method Details

    • get

      public Stack get() throws ProvisionFailedException
      Throws:
      ProvisionFailedException
    • coloredObjectsToDraw

      protected abstract ColoredObjectCollection coloredObjectsToDraw(Dimensions backgroundDimensions) throws CreateException
      Creates colored-objects to be drawn.
      Parameters:
      backgroundDimensions - dimensions of the background on which objects are drawn.
      Returns:
      a ColoredObjectCollection describing the objects to be drawn.
      Throws:
      CreateException - if the colored objects cannot be created.
    • isFlatten

      public boolean isFlatten()
      If true, objects and the background are flattened in the z dimension (via maximum intensity projection), so that a 2D image is produced.
    • setFlatten

      public void setFlatten(boolean flatten)
      If true, objects and the background are flattened in the z dimension (via maximum intensity projection), so that a 2D image is produced.
    • isOutline

      public boolean isOutline()
      If true, an outline is drawn around the entries. If false, a filled-in shape is drawn.
    • setOutline

      public void setOutline(boolean outline)
      If true, an outline is drawn around the entries. If false, a filled-in shape is drawn.
    • getOutlineWidth

      public int getOutlineWidth()
      The width of the outline (only relevant if outline==true).
    • setOutlineWidth

      public void setOutlineWidth(int outlineWidth)
      The width of the outline (only relevant if outline==true).
    • isSuppressOutlineZ

      public boolean isSuppressOutlineZ()
      If true, the outline is suppressed in the z-dimension i.e. a boundary only in z-dimension is not outlined (only relevant if outline==true).
    • setSuppressOutlineZ

      public void setSuppressOutlineZ(boolean suppressOutlineZ)
      If true, the outline is suppressed in the z-dimension i.e. a boundary only in z-dimension is not outlined (only relevant if outline==true).
    • getBackground

      public ProviderAsStack getBackground()
      The background. Either stackBackground or this should be defined but not both.
    • setBackground

      public void setBackground(ProviderAsStack background)
      The background. Either stackBackground or this should be defined but not both.
    • getDisplayer

      public StackDisplayer getDisplayer()
      How to convert an image to be displayed to the user.
    • setDisplayer

      public void setDisplayer(StackDisplayer displayer)
      How to convert an image to be displayed to the user.