Class GradientBase

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Channel
    convertToOutputType(Channel channelToConvert)
    Converts the input channel to the output type specified by outputShort.
    double
    Scale factor applied to the gradient values.
    boolean
    If true, outputs a short channel, otherwise byte channel.
    void
    setOutputShort(boolean outputShort)
    If true, outputs a short channel, otherwise byte channel.
    void
    setScaleFactor(double scaleFactor)
    Scale factor applied to the gradient values.

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

    createFromChannel, 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

    • 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.