Class GradientBaseAddSum
- All Implemented Interfaces:
Provider<Channel>,ProviderAsStack
- Direct Known Subclasses:
GradientForAxis,GradientXY
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean[]Creates an array of booleans indicating which axes to calculate the gradient for.createFromChannel(Channel channelIn) Creates aChannelgiven the entity provided by the delegate.intAdded to all gradients (so we can store negative gradients).voidsetAddSum(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, setScaleFactorMethods inherited from class org.anchoranalysis.image.bean.provider.ChannelProviderUnary
get, getChannel, setChannelMethods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
getAsStackMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
GradientBaseAddSum
public GradientBaseAddSum()
-
-
Method Details
-
createFromChannel
Description copied from class:ChannelProviderUnaryCreates aChannelgiven the entity provided by the delegate.- Specified by:
createFromChannelin classChannelProviderUnary- Parameters:
channelIn- the entity provided by the delegate.- Returns:
- the created
Channelthat is returned by the provider. - Throws:
ProvisionFailedException- if the provider cannot complete successfully.
-
createAxisArray
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.
-