Class MinWithConstant
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
Replaces voxel values with a constant value if the constant is less than the original voxel
value.
This class extends ArithmeticWithConstantConditionallyWriteBase
to perform a
pixel-wise minimum operation between the input channel and a constant value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
shouldOverwriteVoxelWithConstant
(int voxel, int constant) Determines whether to overwrite the current voxel value with the constant.Methods inherited from class org.anchoranalysis.plugin.image.bean.channel.provider.arithmetic.ArithmeticWithConstantConditionallyWriteBase
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
-
MinWithConstant
public MinWithConstant()
-
-
Method Details
-
shouldOverwriteVoxelWithConstant
protected boolean shouldOverwriteVoxelWithConstant(int voxel, int constant) Description copied from class:ArithmeticWithConstantConditionallyWriteBase
Determines whether to overwrite the current voxel value with the constant.- Specified by:
shouldOverwriteVoxelWithConstant
in classArithmeticWithConstantConditionallyWriteBase
- Parameters:
voxel
- the current voxel valueconstant
- the constant value to potentially overwrite with- Returns:
- true if the voxel should be overwritten, false otherwise
-