Class Invert
Object
AnchorBean<MaskProvider>
InitializableBean<MaskProvider, ImageInitialization>
ImageBean<MaskProvider>
BeanProviderAsStackBase<MaskProvider, Mask>
MaskProvider
MaskProviderUnary
Invert
- All Implemented Interfaces:
Provider<Mask>,ProviderAsStack
public class Invert
extends MaskProviderUnary
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 TypeMethodDescriptionMaskcreateFromMask(Mask maskToInvert) MaskProviderIf set, the inversion only occurs on a particular region of the mask, as determined by this maskbooleanIf true, rather than modifying the binary-values (an index) bytes are modified in the buffer to reflect the existing binary-values.voidsetForceChangeBytes(boolean forceChangeBytes) If true, rather than modifying the binary-values (an index) bytes are modified in the buffer to reflect the existing binary-values.voidsetRestrictTo(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, setMaskMethods inherited from class org.anchoranalysis.image.bean.provider.MaskProvider
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
-
Invert
public Invert()
-
-
Method Details
-
createFromMask
public Mask createFromMask(Mask maskToInvert) throws ProvisionFailedException - Specified by:
createFromMaskin classMaskProviderUnary- Throws:
ProvisionFailedException
-
getRestrictTo
public MaskProvider getRestrictTo()If set, the inversion only occurs on a particular region of the mask, as determined by this mask -
setRestrictTo
public void setRestrictTo(MaskProvider restrictTo) 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.
-