Class GradientBaseAddSum
Object
AnchorBean<ChannelProvider>
InitializableBean<ChannelProvider, ImageInitialization>
ImageBean<ChannelProvider>
BeanProviderAsStackBase<ChannelProvider, Channel>
ChannelProvider
ChannelProviderUnary
GradientBase
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.ChannelcreateFromChannel(Channel channelIn) 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
public Channel createFromChannel(Channel channelIn) throws ProvisionFailedException - Specified by:
createFromChannelin classChannelProviderUnary- Throws:
ProvisionFailedException
-
createAxisArray
protected abstract boolean[] createAxisArray() throws ProvisionFailedExceptionCreates 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.
-