Class CombineBase

Object
AnchorBean<MaskProvider>
InitializableBean<MaskProvider, ImageInitialization>
ImageBean<MaskProvider>
BeanProviderAsStackBase<MaskProvider, Mask>
MaskProvider
MaskProviderUnary
CombineBase
All Implemented Interfaces:
Provider<Mask>, ProviderAsStack
Direct Known Subclasses:
And, IfHighLow, Or, Xor

public abstract class CombineBase extends MaskProviderUnary
Base class for combining two masks.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Mask
    createFromMask(Mask mask)
     
    protected abstract Mask
    createFromTwoMasks(Mask maskToModify, Mask maskOther)
    Creates a mask from some combination of two masks.
    MaskProvider
    The MaskProvider for the second mask to be combined.
    void
    setReceive(MaskProvider receive)
    The MaskProvider for the second mask to be combined.

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

    get, getMask, setMask

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

    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

    • CombineBase

      public CombineBase()
  • Method Details

    • createFromMask

      public Mask createFromMask(Mask mask) throws ProvisionFailedException
      Specified by:
      createFromMask in class MaskProviderUnary
      Throws:
      ProvisionFailedException
    • createFromTwoMasks

      protected abstract Mask createFromTwoMasks(Mask maskToModify, Mask maskOther) throws ProvisionFailedException
      Creates a mask from some combination of two masks.
      Parameters:
      maskToModify - first mask (which is also the mask modified with the result)
      maskOther - second mask (which is not modified)
      Returns:
      either maskToModify or maskOther depending on implementation
      Throws:
      ProvisionFailedException - if the mask creation fails
    • getReceive

      public MaskProvider getReceive()
      The MaskProvider for the second mask to be combined.
    • setReceive

      public void setReceive(MaskProvider receive)
      The MaskProvider for the second mask to be combined.