Class Thresholder
Object
org.anchoranalysis.bean.AnchorBean<B>
org.anchoranalysis.bean.initializable.InitializableBean<T,NullInitialization>
org.anchoranalysis.bean.NullParametersBean<org.anchoranalysis.image.voxel.thresholder.VoxelsThresholder>
org.anchoranalysis.image.bean.threshold.Thresholder
- Direct Known Subclasses:
ThresholderGlobal
public abstract class Thresholder extends NullParametersBean<org.anchoranalysis.image.voxel.thresholder.VoxelsThresholder>
Thresholds voxels to create a binary-voxels using global
thresholding.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Modifier Constructor Description protectedThresholder() -
Method Summary
Modifier and Type Method Description org.anchoranalysis.image.voxel.binary.BinaryVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer>threshold(org.anchoranalysis.image.voxel.VoxelsUntyped voxels)Likethreshold(VoxelsUntyped)but using default binary-values.org.anchoranalysis.image.voxel.binary.BinaryVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer>threshold(org.anchoranalysis.image.voxel.VoxelsUntyped voxels, org.anchoranalysis.image.voxel.binary.values.BinaryValuesByte binaryValues)Likethreshold(VoxelsUntyped, BinaryValuesByte, Optional, Optional)applying the thresholding to the entire set of voxels.abstract org.anchoranalysis.image.voxel.binary.BinaryVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer>threshold(org.anchoranalysis.image.voxel.VoxelsUntyped voxels, org.anchoranalysis.image.voxel.binary.values.BinaryValuesByte binaryValues, Optional<org.anchoranalysis.math.histogram.Histogram> histogram, Optional<org.anchoranalysis.image.voxel.object.ObjectMask> objectMask)Thresholds voxels (across a range of values) so that they have only binary range (i.e.Methods inherited from class org.anchoranalysis.bean.NullParametersBean
initializeRecursive, onInitialization, onInitializationMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitializedMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
Thresholder
protected Thresholder()
-
-
Method Details
-
threshold
public org.anchoranalysis.image.voxel.binary.BinaryVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> threshold(org.anchoranalysis.image.voxel.VoxelsUntyped voxels) throws OperationFailedExceptionLikethreshold(VoxelsUntyped)but using default binary-values.The default values are off(0) and on(255).
- Parameters:
voxels- the voxels to be thresholded.- Returns:
- a binary-channel as described above, which may possibly reuse the input voxel-buffers.
- Throws:
OperationFailedException- if the thresholding operation cannot complete successfully.
-
threshold
public org.anchoranalysis.image.voxel.binary.BinaryVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> threshold(org.anchoranalysis.image.voxel.VoxelsUntyped voxels, org.anchoranalysis.image.voxel.binary.values.BinaryValuesByte binaryValues) throws OperationFailedExceptionLikethreshold(VoxelsUntyped, BinaryValuesByte, Optional, Optional)applying the thresholding to the entire set of voxels.The thresholder does not accept a histogram as input.
- Parameters:
voxels- the voxels to be thresholded.binaryValues- what binary values to be used in the output.- Returns:
- a binary-channel as described above, which may possibly reuse the input voxel-buffers.
- Throws:
OperationFailedException- if the thresholding operation cannot complete successfully.
-
threshold
public abstract org.anchoranalysis.image.voxel.binary.BinaryVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> threshold(org.anchoranalysis.image.voxel.VoxelsUntyped voxels, org.anchoranalysis.image.voxel.binary.values.BinaryValuesByte binaryValues, Optional<org.anchoranalysis.math.histogram.Histogram> histogram, Optional<org.anchoranalysis.image.voxel.object.ObjectMask> objectMask) throws OperationFailedExceptionThresholds voxels (across a range of values) so that they have only binary range (i.e. two voxel values representing on and off).If a mask is used, the voxels outside the object-mask are left unchanged. They will be either identical to the input-volume or 0 if a new buffer needs to be created.
- Parameters:
voxels- the voxels to be thresholded.binaryValues- what binary values to be used in the output.histogram- a histogram if it's available, which must exactly match the intensity-values ofvoxelsafter any object-mask is applied. This exists for calculation efficiency.objectMask- an object-mask to restrict thresholding to only some region(s) of the voxels.- Returns:
- a binary-channel as described above, which may possibly reuse the input voxel-buffers.
- Throws:
OperationFailedException- if the thresholding operation cannot complete successfully.
-