Class ThresholdConfidence
Combines object-masks by projecting the maximum confidence-level for each voxel and thresholding.
After thresholding, a connected-components algorithm splits the thresholded-mask into single-objects.
Depending on the number of objects, two types of projection occur:
- the projection occurs globally on an identically sized image to the entire size (more efficient for a larger number of objects and/or small image), or
- using an R-Tree clusters of intersecting boxes are found, and each is processed separately (more efficient for a smaller number of objects and/or large image).
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionThresholdConfidence
(double minConfidence) Creates with a minimum-confidence level. -
Method Summary
Modifier and TypeMethodDescriptiondouble
The minimum confidence of an element for its object-mask to be initially included for consideration (before merging).int
The minimum number of voxels that must exist in a connected-component to be included.int
When the number of objects is greater or equal than this, they are reduced globally, without separation.reduce
(List<LabelledWithConfidence<ObjectMask>> elements, Extent extent, ExecutionTimeRecorder executionTimeRecorder) Reduce a list of elements (each with a confidence score and a label) to a smaller-list.void
setMinConfidence
(double minConfidence) The minimum confidence of an element for its object-mask to be initially included for consideration (before merging).void
setMinNumberVoxels
(int minNumberVoxels) The minimum number of voxels that must exist in a connected-component to be included.void
setThresholdNumberObjectsGlobal
(int thresholdNumberObjectsGlobal) When the number of objects is greater or equal than this, they are reduced globally, without separation.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
ThresholdConfidence
public ThresholdConfidence(double minConfidence) Creates with a minimum-confidence level.- Parameters:
minConfidence
- the minimum confidence of an element for its object-mask to be finally included (after merging).
-
ThresholdConfidence
public ThresholdConfidence()
-
-
Method Details
-
reduce
public ReductionOutcome<LabelledWithConfidence<ObjectMask>> reduce(List<LabelledWithConfidence<ObjectMask>> elements, Extent extent, ExecutionTimeRecorder executionTimeRecorder) throws OperationFailedException Description copied from class:ReduceElements
Reduce a list of elements (each with a confidence score and a label) to a smaller-list.It is not guaranteed that the resulting list will have fewer elements than the input list, but never more.
- Specified by:
reduce
in classReduceElements<ObjectMask>
- Parameters:
elements
- proposed bounding-boxes with scores.extent
- an area in which allelements
must exclusively reside.executionTimeRecorder
- records the execution time of particular operations.- Returns:
- the outcome of the operation, indicating which elements are retained / removed / added.
- Throws:
OperationFailedException
- if anything goes wrong.
-
getMinConfidence
public double getMinConfidence()The minimum confidence of an element for its object-mask to be initially included for consideration (before merging). -
setMinConfidence
public void setMinConfidence(double minConfidence) The minimum confidence of an element for its object-mask to be initially included for consideration (before merging). -
getMinNumberVoxels
public int getMinNumberVoxels()The minimum number of voxels that must exist in a connected-component to be included. -
setMinNumberVoxels
public void setMinNumberVoxels(int minNumberVoxels) The minimum number of voxels that must exist in a connected-component to be included. -
getThresholdNumberObjectsGlobal
public int getThresholdNumberObjectsGlobal()When the number of objects is greater or equal than this, they are reduced globally, without separation. See class javadoc. -
setThresholdNumberObjectsGlobal
public void setThresholdNumberObjectsGlobal(int thresholdNumberObjectsGlobal) When the number of objects is greater or equal than this, they are reduced globally, without separation. See class javadoc.
-