Package qupath.lib.objects.utils
Interface MeasurementStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A strategy for handling measurements between objects being merged.
 Usually, it is safe to ignore, but if a pipeline creates objects and adds measurements before handling merges between tiles, then it is useful to consider how the measurements of each object will be passed to the output object.
 The default implementations assume that the measurement names are identical across all objects; to this end only the names of the measurements of the first object are queried.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final MeasurementStrategyThe default and previous strategy: ignore and discard.static final MeasurementStrategyCalculate the maximum of each measurement and pass these to the output object.static final MeasurementStrategyCalculate the mean of each measurement and pass these to the output object.static final MeasurementStrategyCalculate the median of each measurement and pass these to the output object.static final MeasurementStrategyCalculate the minimum of each measurement and pass these to the output object.static final MeasurementStrategyChoose an object at random and use the measurements from this object.static final MeasurementStrategyUse the measurements of the largest object by area, length or number of points.static final MeasurementStrategyAssign the measurements of the first object to the output object.static final MeasurementStrategyCalculate a mean weighted by object area and pass this to the output object.
- 
Method SummaryModifier and TypeMethodDescriptionvoidmergeMeasurements(List<? extends PathObject> pathObjects, MeasurementList outputList) Merge the measurements for a set of input objects to a single measurement list.
- 
Field Details- 
IGNOREThe default and previous strategy: ignore and discard.
- 
USE_FIRSTAssign the measurements of the first object to the output object.
- 
MEANCalculate the mean of each measurement and pass these to the output object.
- 
WEIGHTED_MEANCalculate a mean weighted by object area and pass this to the output object.
- 
MEDIANCalculate the median of each measurement and pass these to the output object.
- 
RANDOMChoose an object at random and use the measurements from this object.
- 
USE_BIGGESTUse the measurements of the largest object by area, length or number of points.
- 
MAXCalculate the maximum of each measurement and pass these to the output object.
- 
MINCalculate the minimum of each measurement and pass these to the output object.
 
- 
- 
Method Details- 
mergeMeasurementsMerge the measurements for a set of input objects to a single measurement list. This should operate by adding the calculated measurements to the measurement list passed in as second argument.- Parameters:
- pathObjects- the input objects
- outputList- the container that output measurements should be stored in
 
 
-