Class LevelPerObjectBase

Object
AnchorBean<ChannelProvider>
InitializableBean<ChannelProvider, ImageInitialization>
ImageBean<ChannelProvider>
BeanProviderAsStackBase<ChannelProvider, Channel>
ChannelProvider
ChannelProviderUnary
LevelPerObjectBase
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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Channel
    createFromChannel(Channel channel)
     
    CalculateLevel
    Method to calculate the level for a particular object.
    ObjectCollectionProvider
    The objects for whom a level is calculated.
    void
    setCalculateLevel(CalculateLevel calculateLevel)
    Method to calculate the level for a particular object.
    void
    setObjects(ObjectCollectionProvider objects)
    The objects for whom a level is calculated.
    protected abstract void
    writeLevelsForObjects(Channel input, ObjectCollection objects, Channel output)
    Creates a channel with the levels for a set of objects.

    Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProviderUnary

    get, getChannel, setChannel

    Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider

    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
  • Constructor Details

    • LevelPerObjectBase

      public LevelPerObjectBase()
  • Method Details

    • createFromChannel

      public Channel createFromChannel(Channel channel) throws ProvisionFailedException
      Specified by:
      createFromChannel in class ChannelProviderUnary
      Throws:
      ProvisionFailedException
    • 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.