Class SegmentChannelIntoObjects

Direct Known Subclasses:
SegmentChannelIntoObjectsUnary

public abstract class SegmentChannelIntoObjects
extends SegmentationBean<SegmentChannelIntoObjects>
A base class for algorithms to segment a channel into one or more objects.

Some algorithms can be restricted by an object-mask on the channel.

Some algorithms can be influenced by passing a set of seeds.

Author:
Owen Feehan
  • Constructor Details

  • Method Details

    • segment

      public abstract org.anchoranalysis.image.voxel.object.ObjectCollection segment​(Channel channel, Optional<org.anchoranalysis.image.voxel.object.ObjectMask> objectMask, Optional<org.anchoranalysis.image.voxel.object.ObjectCollection> seeds) throws SegmentationFailedException
      Segments a channel to produce an object-collection.
      Parameters:
      channel - the channel to segment
      objectMask - an object-mask that can restrict which areas of the channel are considered.
      seeds - seeds that can be used to determine starting-points for segmentation regions.
      Returns:
      a newly created collection of objects for each segment. The created objects will always exist inside the channel's extent.
      Throws:
      SegmentationFailedException - if anything goes wrong during the segmentation.
    • checkUnsupportedObjectMask

      protected static void checkUnsupportedObjectMask​(Optional<org.anchoranalysis.image.voxel.object.ObjectMask> objectMask) throws SegmentationFailedException
      Throws an exception if object is present, as it is unsupported by the implementation.
      Parameters:
      objectMask - an optional ObjectMask.
      Throws:
      SegmentationFailedException - if objectMask is present.
    • checkUnsupportedSeeds

      protected static void checkUnsupportedSeeds​(Optional<org.anchoranalysis.image.voxel.object.ObjectCollection> seeds) throws SegmentationFailedException
      Throws an exception if seeds is present, as it is unsupported by the implementation.
      Parameters:
      seeds - an optional ObjectMask.
      Throws:
      SegmentationFailedException - if seeds is present.
    • checkUnsupported3D

      protected static void checkUnsupported3D​(Channel channel) throws SegmentationFailedException
      Throws an exception if the channel has more than one z-slice, as 3D is unsupported by the implementation.
      Parameters:
      channel - the channel that have multiple z-slices (i.e. is 3D) or a single z-slice (i.e. is 2D).
      Throws:
      SegmentationFailedException - if channel is 3D.