Class ReduceElements<T>
Object
org.anchoranalysis.bean.AnchorBean<ReduceElements<T>>
org.anchoranalysis.image.inference.bean.segment.reduce.ReduceElements<T>
- Type Parameters:
T- the element-type that exists in the collection (with confidence)
- Direct Known Subclasses:
ReduceElementsGreedy
public abstract class ReduceElements<T> extends AnchorBean<ReduceElements<T>>
Reduces the number or spatial-extent of elements by favoring higher-confidence elements over
lower-confidence elements.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description ReduceElements() -
Method Summary
Modifier and Type Method Description abstract ReductionOutcome<LabelledWithConfidence<T>>reduce(List<LabelledWithConfidence<T>> elements, org.anchoranalysis.spatial.box.Extent extent, ExecutionTimeRecorder executionTimeRecorder)Reduce a list of elements (each with a confidence score and a label) to a smaller-list.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
ReduceElements
public ReduceElements()
-
-
Method Details
-
reduce
public abstract ReductionOutcome<LabelledWithConfidence<T>> reduce(List<LabelledWithConfidence<T>> elements, org.anchoranalysis.spatial.box.Extent extent, ExecutionTimeRecorder executionTimeRecorder) throws OperationFailedExceptionReduce 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.
- Parameters:
elements- proposed bounding-boxes with scores.extent- an area in which allelementsmust 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.
-