All Implemented Interfaces:
Provider<Channel>, ProviderAsStack
Direct Known Subclasses:
LevelPerObjectIndependently, LevelPerObjectNeighbors

public abstract class LevelPerObjectBase extends ChannelProviderUnary
Creates a channel with a level calculated for each object using various methods.

This abstract class provides a base for creating channels where each object is assigned a specific intensity level based on calculations performed on the input channel.

Author:
Owen Feehan
  • Constructor Details

    • LevelPerObjectBase

      public LevelPerObjectBase()
  • Method Details

    • createFromChannel

      public Channel createFromChannel(Channel channel) throws ProvisionFailedException
      Description copied from class: ChannelProviderUnary
      Creates a Channel given the entity provided by the delegate.
      Specified by:
      createFromChannel in class ChannelProviderUnary
      Parameters:
      channel - the entity provided by the delegate.
      Returns:
      the created Channel that is returned by the provider.
      Throws:
      ProvisionFailedException - if the provider cannot complete successfully.
    • writeLevelsForObjects

      protected abstract void writeLevelsForObjects(Channel input, ObjectCollection objects, Channel output) throws ProvisionFailedException
      Creates a channel with the levels for a set of objects.
      Parameters:
      input - the channel whose intensity is passed to calculateLevel as a histogram variously for particular objects
      objects - the ObjectCollection for which levels are calculated
      output - the channel where the calculated-levels are written (for each object)
      Throws:
      ProvisionFailedException - if there's an error during the level calculation or writing process
    • getObjects

      public ObjectCollectionProvider getObjects()
      The objects for whom a level is calculated.
    • setObjects

      public void setObjects(ObjectCollectionProvider objects)
      The objects for whom a level is calculated.
    • getCalculateLevel

      public CalculateLevel getCalculateLevel()
      Method to calculate the level for a particular object.

      It is passed a histogram (calculated in different ways) for each object.

    • setCalculateLevel

      public void setCalculateLevel(CalculateLevel calculateLevel)
      Method to calculate the level for a particular object.

      It is passed a histogram (calculated in different ways) for each object.