Class SubtractMean
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
Subtracts the mean intensity (of the entire channel or a masked portion thereof) from every
voxel.
This class extends UnaryWithMaskBase
to perform mean subtraction on a channel,
optionally restricted to a masked region.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Channel
createFromMaskedChannel
(Channel channel, Mask mask) Creates a newChannel
from the input channel and mask.boolean
Whether to subtract the mean only from voxels within the mask.void
setSubtractFromMaskOnly
(boolean subtractFromMaskOnly) Whether to subtract the mean only from voxels within the mask.Methods inherited from class org.anchoranalysis.plugin.image.bean.channel.provider.mask.UnaryWithMaskBase
createFromChannel, getMask, setMask
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
-
SubtractMean
public SubtractMean()
-
-
Method Details
-
createFromMaskedChannel
Description copied from class:UnaryWithMaskBase
Creates a newChannel
from the input channel and mask.- Specified by:
createFromMaskedChannel
in classUnaryWithMaskBase
- Parameters:
channel
- the inputChannel
mask
- theMask
to apply to the channel- Returns:
- a new
Channel
created from the input channel and mask
-
isSubtractFromMaskOnly
public boolean isSubtractFromMaskOnly()Whether to subtract the mean only from voxels within the mask.If true, only voxels within the mask are modified. If false, all voxels in the channel are modified.
-
setSubtractFromMaskOnly
public void setSubtractFromMaskOnly(boolean subtractFromMaskOnly) Whether to subtract the mean only from voxels within the mask.If true, only voxels within the mask are modified. If false, all voxels in the channel are modified.
-