Class AddConstant
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
Adds a constant value to each voxel in a channel.
This class extends ArithmeticWithConstantBase
to perform addition of a constant value
to each voxel in the input channel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
performBinaryOperation
(int voxel, int constant) The binary arithmetic operation that combines the voxel-value and the constant-value.Methods inherited from class org.anchoranalysis.plugin.image.bean.channel.provider.arithmetic.ArithmeticWithConstantBase
createFromChannelWithConstant
Methods inherited from class org.anchoranalysis.plugin.image.bean.channel.provider.UnaryWithValueBase
createFromChannel, getValue, setValue
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
-
AddConstant
public AddConstant()
-
-
Method Details
-
performBinaryOperation
protected int performBinaryOperation(int voxel, int constant) Description copied from class:ArithmeticWithConstantBase
The binary arithmetic operation that combines the voxel-value and the constant-value.- Specified by:
performBinaryOperation
in classArithmeticWithConstantBase
- Parameters:
voxel
- the value of the current voxelconstant
- the constant value to be used in the operation- Returns:
- the result of the binary operation
-