Class ThresholderAutoIJ
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe thresholding method to use.boolean
If true, the thresholding algorithm will not consider black pixels (value 0) in its calculations.void
The thresholding method to use.void
setNoBlack
(boolean noBlack) If true, the thresholding algorithm will not consider black pixels (value 0) in its calculations.threshold
(VoxelsUntyped inputBuffer, BinaryValuesByte binaryValues, Optional<Histogram> histogram, Optional<ObjectMask> objectMask) Thresholds voxels (across a range of values) so that they have only binary range (i.e. two voxel values representing on and off).Methods inherited from class org.anchoranalysis.image.bean.threshold.Thresholder
threshold, threshold
Methods inherited from class org.anchoranalysis.bean.NullParametersBean
initializeRecursive, onInitialization, onInitialization
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
ThresholderAutoIJ
public ThresholderAutoIJ()
-
-
Method Details
-
threshold
public BinaryVoxels<UnsignedByteBuffer> threshold(VoxelsUntyped inputBuffer, BinaryValuesByte binaryValues, Optional<Histogram> histogram, Optional<ObjectMask> objectMask) throws OperationFailedException Description copied from class:Thresholder
Thresholds 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:
threshold
in classThresholder
- Parameters:
inputBuffer
- 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 ofvoxels
after 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.
-
getMethod
The thresholding method to use.One of the following strings to identify ImageJ's thresholding algorithms: Default, Huang, "Intermodes", "IsoData", "Li", "MaxEntropy", "Mean", "MinError(I)", "Minimum", "Moments", "Otsu", "Percentile", "RenyiEntropy", "Shanbhag", "Triangle", "Yen"
An empty string will use the Default method.
-
setMethod
The thresholding method to use.One of the following strings to identify ImageJ's thresholding algorithms: Default, Huang, "Intermodes", "IsoData", "Li", "MaxEntropy", "Mean", "MinError(I)", "Minimum", "Moments", "Otsu", "Percentile", "RenyiEntropy", "Shanbhag", "Triangle", "Yen"
An empty string will use the Default method.
-
isNoBlack
public boolean isNoBlack()If true, the thresholding algorithm will not consider black pixels (value 0) in its calculations. -
setNoBlack
public void setNoBlack(boolean noBlack) If true, the thresholding algorithm will not consider black pixels (value 0) in its calculations.
-