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 Details

    • GradientBaseAddSum

      public GradientBaseAddSum()
  • Method Details

    • createFromChannel

      public Channel createFromChannel(Channel channelIn) throws ProvisionFailedException
      Description copied from class: ChannelProviderUnary
      Creates a Channel given the entity provided by the delegate.
      Specified by:
      createFromChannel in class ChannelProviderUnary
      Parameters:
      channelIn - the entity provided by the delegate.
      Returns:
      the created Channel that is returned by the provider.
      Throws:
      ProvisionFailedException - if the provider cannot complete successfully.
    • 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.