Class ThresholderGlobal
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
org.anchoranalysis.image.bean.threshold.ThresholderGlobal
public class ThresholderGlobal extends Thresholder
Performs global thresholding.
This implies that the threshold-level is identical for every voxel.
The thresholding occurs inplace on the existing voxels i.e. a new buffer is not created.
An on voxel is placed in the buffer if voxel-value >= level or off
otherwise.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description ThresholderGlobal()ThresholderGlobal(CalculateLevel calculateLevel) -
Method Summary
Modifier and Type Method Description CalculateLevelgetCalculateLevel()voidsetCalculateLevel(CalculateLevel calculateLevel)org.anchoranalysis.image.voxel.binary.BinaryVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer>threshold(org.anchoranalysis.image.voxel.VoxelsUntyped inputBuffer, org.anchoranalysis.image.voxel.binary.values.BinaryValuesByte bvOut, 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.image.bean.threshold.Thresholder
threshold, thresholdMethods 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
-
ThresholderGlobal
public ThresholderGlobal() -
ThresholderGlobal
-
-
Method Details
-
threshold
public org.anchoranalysis.image.voxel.binary.BinaryVoxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> threshold(org.anchoranalysis.image.voxel.VoxelsUntyped inputBuffer, org.anchoranalysis.image.voxel.binary.values.BinaryValuesByte bvOut, Optional<org.anchoranalysis.math.histogram.Histogram> histogram, Optional<org.anchoranalysis.image.voxel.object.ObjectMask> objectMask) throws OperationFailedExceptionDescription copied from class:ThresholderThresholds 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.
- Specified by:
thresholdin classThresholder- Parameters:
inputBuffer- the voxels to be thresholded.bvOut- 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.
-
getCalculateLevel
-
setCalculateLevel
-