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 aChannel
given the entity provided by the delegate.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
-
Constructor Details
-
GradientBaseAddSum
public GradientBaseAddSum()
-
-
Method Details
-
createFromChannel
Description copied from class:ChannelProviderUnary
Creates aChannel
given the entity provided by the delegate.- Specified by:
createFromChannel
in classChannelProviderUnary
- 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
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.
-