Class DrawColoredObjects

Object
DrawColoredObjects

public class DrawColoredObjects extends Object
Outlines or completely fills in each ObjectMask with a color.

The color depending on whether it is paired or unpaired in an Assignment.

Author:
Owen Feehan
  • Constructor Details

    • DrawColoredObjects

      public DrawColoredObjects(DisplayStack background, boolean flatten, int outlineWidth)
      Creates a new DrawColoredObjects instance.
      Parameters:
      background - The background, which will feature in both left and right panes.
      flatten - Whether to flatten (maximum intensity projection) in the z-dimension.
      outlineWidth - How many pixels should the outline be around objects.
  • Method Details

    • createObjectsImage

      public Stack createObjectsImage(Assignment<ObjectMask> assignment, boolean left, AssignmentColorPool colorPool) throws OutputWriteFailedException
      Creates an image with the objects colored, as indicated in the class description.
      Parameters:
      assignment - the assignment to draw.
      left - if true, draws the left objects from the assignment, otherwise the right objects.
      colorPool - the colors to use for drawing objects.
      Returns:
      the stack with the colored objects.
      Throws:
      OutputWriteFailedException - if the image cannot be created.