Class Invert
- All Implemented Interfaces:
Provider<Mask>
,ProviderAsStack
Switches on voxels to off and vice-versa.
By default, this occurs by modifying the associated binary-values (an index) rather than modifying the voxel buffers.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFromMask
(Mask maskToInvert) Creates aMask
given the entity provided by the delegate.If set, the inversion only occurs on a particular region of the mask, as determined by this maskboolean
If true, rather than modifying the binary-values (an index) bytes are modified in the buffer to reflect the existing binary-values.void
setForceChangeBytes
(boolean forceChangeBytes) If true, rather than modifying the binary-values (an index) bytes are modified in the buffer to reflect the existing binary-values.void
setRestrictTo
(MaskProvider restrictTo) If set, the inversion only occurs on a particular region of the mask, as determined by this maskMethods inherited from class org.anchoranalysis.image.bean.provider.MaskProviderUnary
get, getMask, setMask
Methods inherited from class org.anchoranalysis.image.bean.provider.MaskProvider
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
-
Invert
public Invert()
-
-
Method Details
-
createFromMask
Description copied from class:MaskProviderUnary
Creates aMask
given the entity provided by the delegate.- Specified by:
createFromMask
in classMaskProviderUnary
- Parameters:
maskToInvert
- the entity provided by the delegate.- Returns:
- the created
Mask
that is returned by the provider. - Throws:
ProvisionFailedException
- if the provider cannot complete successfully.
-
getRestrictTo
If set, the inversion only occurs on a particular region of the mask, as determined by this mask -
setRestrictTo
If set, the inversion only occurs on a particular region of the mask, as determined by this mask -
isForceChangeBytes
public boolean isForceChangeBytes()If true, rather than modifying the binary-values (an index) bytes are modified in the buffer to reflect the existing binary-values. -
setForceChangeBytes
public void setForceChangeBytes(boolean forceChangeBytes) If true, rather than modifying the binary-values (an index) bytes are modified in the buffer to reflect the existing binary-values.
-