All Implemented Interfaces:
Provider<Channel>, ProviderAsStack
Direct Known Subclasses:
GradientBaseAddSum, Sobel

public abstract class GradientBase extends ChannelProviderUnary
Base class to calculate the gradient of the voxels in a Channel.

If the existing channel has appropriate voxel data-type, its voxels are replaced, otherwise new voxels are assigned.

Author:
Owen Feehan
  • Constructor Details

    • GradientBase

      public GradientBase()
  • Method Details

    • convertToOutputType

      protected Channel convertToOutputType(Channel channelToConvert)
      Converts the input channel to the output type specified by outputShort.
      Parameters:
      channelToConvert - the Channel to convert
      Returns:
      the converted Channel
    • getScaleFactor

      public double getScaleFactor()
      Scale factor applied to the gradient values.

      Default value is 1.0.

    • setScaleFactor

      public void setScaleFactor(double scaleFactor)
      Scale factor applied to the gradient values.

      Default value is 1.0.

    • isOutputShort

      public boolean isOutputShort()
      If true, outputs a short channel, otherwise byte channel.

      Default value is false.

    • setOutputShort

      public void setOutputShort(boolean outputShort)
      If true, outputs a short channel, otherwise byte channel.

      Default value is false.