Class GradientBaseAddSum

Object
AnchorBean<ChannelProvider>
InitializableBean<ChannelProvider, ImageInitialization>
ImageBean<ChannelProvider>
BeanProviderAsStackBase<ChannelProvider, Channel>
ChannelProvider
ChannelProviderUnary
GradientBase
GradientBaseAddSum
All Implemented Interfaces:
Provider<Channel>, ProviderAsStack
Direct Known Subclasses:
GradientForAxis, GradientXY

public abstract class GradientBaseAddSum extends GradientBase
Like GradientBase but allows an arbitrary constant to be added to voxels storing the gradient.

An out-of-bounds strategy of mirror is used for calculating the gradient for voxels lying at the boundary.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract boolean[]
    Creates an array of booleans indicating which axes to calculate the gradient for.
    Channel
    createFromChannel(Channel channelIn)
     
    int
    Added to all gradients (so we can store negative gradients).
    void
    setAddSum(int addSum)
    Added to all gradients (so we can store negative gradients).

    Methods inherited from class org.anchoranalysis.plugin.image.bean.channel.provider.gradient.GradientBase

    convertToOutputType, getScaleFactor, isOutputShort, setOutputShort, setScaleFactor

    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

    • GradientBaseAddSum

      public GradientBaseAddSum()
  • Method Details

    • createFromChannel

      public Channel createFromChannel(Channel channelIn) throws ProvisionFailedException
      Specified by:
      createFromChannel in class ChannelProviderUnary
      Throws:
      ProvisionFailedException
    • createAxisArray

      protected abstract boolean[] createAxisArray() throws ProvisionFailedException
      Creates an array of booleans indicating which axes to calculate the gradient for.
      Returns:
      a boolean array where true indicates the gradient should be calculated for that axis
      Throws:
      ProvisionFailedException - if there's an error creating the axis array
    • getAddSum

      public int getAddSum()
      Added to all gradients (so we can store negative gradients).

      Default value is 0.

    • setAddSum

      public void setAddSum(int addSum)
      Added to all gradients (so we can store negative gradients).

      Default value is 0.