Class ImageCounterList<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>

Object
org.anchoranalysis.plugin.annotation.counter.ImageCounterList<T>
Type Parameters:
T - the payload-type of each ImageCounter.
All Implemented Interfaces:
Iterable<ImageCounter<T>>, ImageCounter<T>

public class ImageCounterList<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>
extends Object
implements Iterable<ImageCounter<T>>, ImageCounter<T>
Allows operations to be applied to several ImageCounters collectively.
Author:
Owen Feehan
  • Constructor Details

  • Method Details

    • add

      public boolean add​(ImageCounter<T> e)
      Adds an ImageCounter to the list.
      Parameters:
      e - the ImageCounter to add.
      Returns:
      true if the counter was added successfully, false otherwise.
    • addAll

      public <S extends ImageCounter<T>> boolean addAll​(Collection<S> e)
      Adds a collection of ImageCounters to the list.
      Type Parameters:
      S - the type of ImageCounters in the collection.
      Parameters:
      e - the collection of ImageCounters to add.
      Returns:
      true if the collection was added successfully, false otherwise.
    • addUnannotatedImage

      public void addUnannotatedImage()
      Description copied from interface: ImageCounter
      Add an image that did not have an associated annotation.
      Specified by:
      addUnannotatedImage in interface ImageCounter<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>
    • addAnnotatedImage

      public void addAnnotatedImage​(T payload)
      Description copied from interface: ImageCounter
      Add an image that had an associated annotation.
      Specified by:
      addAnnotatedImage in interface ImageCounter<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>
      Parameters:
      payload - the payload associated with the annotated image.
    • iterator

      public Iterator<ImageCounter<T>> iterator()
      Specified by:
      iterator in interface Iterable<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>
    • stream

      public Stream<ImageCounter<T>> stream()
      Returns a sequential Stream with this list as its source.
      Returns:
      a sequential Stream over the elements in this list.