Package qupath.lib.objects.utils
Class OverlapFixer.Builder
java.lang.Object
qupath.lib.objects.utils.OverlapFixer.Builder
- Enclosing class:
- OverlapFixer
Builder for the OverlapFixer.
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Build the overlap fixer.Clip overlapping objects, excluding the parts that overlap with a 'higher priority' object according to the comparator.Equivalent to keepFragments(false).Retain only the 'highest priority' objects when overlaps occur, and drop the others.Equivalent to keepFragments(true).keepFragments(boolean doKeep) Set whether to keep fragments when clipping objects.setComparator(Comparator<PathObject> comparator) Set the comparator to use for sorting objects.setMinArea(double minArea) Set the minimum area for objects to be retained, in pixels.setStrategy(OverlapFixer.Strategy strategy) Set the strategy for handling overlaps.Set the comparator to sort by area, with the largest objects given a higher priority.Set the comparator to sort by solidity, with the most solid objects given a higher priority.
- 
Method Details- 
setMinAreaSet the minimum area for objects to be retained, in pixels. Objects with an area less than this (either before or after clipping) will be dropped.- Parameters:
- minArea-
- Returns:
 
- 
setComparatorSet the comparator to use for sorting objects. This assigns a 'priority' to objects, which is used to determine which objects are kept when overlaps occur. Objects that are sorted to be earlier in the list are considered to have a higher priority.- Parameters:
- comparator-
- Returns:
 
- 
sortBySoliditySet the comparator to sort by solidity, with the most solid objects given a higher priority. Subsequent sorting is by area, length, number of points, and finally by the default comparator.- Returns:
 
- 
sortByAreaSet the comparator to sort by area, with the largest objects given a higher priority. Subsequent sorting is by length, number of points, and finally by the default comparator.- Returns:
 
- 
keepFragmentsEquivalent to keepFragments(true).- Returns:
 
- 
keepFragmentsSet whether to keep fragments when clipping objects. Fragments are defined as objects that are split into more pieces after clipping than they were before.- Parameters:
- doKeep-
- Returns:
 
- 
discardFragmentsEquivalent to keepFragments(false).- Returns:
 
- 
setStrategySet the strategy for handling overlaps.- Parameters:
- strategy-
- Returns:
 
- 
clipOverlapsClip overlapping objects, excluding the parts that overlap with a 'higher priority' object according to the comparator.- Returns:
 
- 
dropOverlapsRetain only the 'highest priority' objects when overlaps occur, and drop the others. Priority is determined by the comparator.- Returns:
 
- 
buildBuild the overlap fixer.- Returns:
 
 
-