Package qupath.lib.objects
Class PathObjectPredicates
java.lang.Object
qupath.lib.objects.PathObjectPredicates
Classes to define JSON-serializable
Predicate
s for PathObject
s.- Author:
- Pete Bankhead
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
A JSON-serializablePredicate
for use withPathObject
s. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbaseClassification
(PathClass... pathClasses) Predicate that returns true if an object has any of the specified base classifications, regardless of any subclassification.containsClassification
(String... names) Predicate that returns true if any component of its classification has any of the specified names.exactClassification
(PathClass... pathClasses) Predicate that returns true if aPathObject
has at least one of the specifiedPathClass
es.filter
(PathObjectFilter filter) Wrap aPathObjectFilter
as aPathObjectPredicates.PathObjectPredicate
so that it can remain JSON-serializable when used in combination with other predicates.positiveClassification
(boolean allowGradedIntensity) Predicate that returns true of an object has a positive classification.
-
Constructor Details
-
PathObjectPredicates
public PathObjectPredicates()
-
-
Method Details
-
positiveClassification
public static PathObjectPredicates.PathObjectPredicate positiveClassification(boolean allowGradedIntensity) Predicate that returns true of an object has a positive classification.- Parameters:
allowGradedIntensity
- if true, 1+, 2+ and 3+ are also interpreted as positive; otherwise, only a final class component of "Positive" returns true.- Returns:
- See Also:
-
filter
Wrap aPathObjectFilter
as aPathObjectPredicates.PathObjectPredicate
so that it can remain JSON-serializable when used in combination with other predicates.- Parameters:
filter
-- Returns:
-
exactClassification
public static PathObjectPredicates.PathObjectPredicate exactClassification(PathClass... pathClasses) Predicate that returns true if aPathObject
has at least one of the specifiedPathClass
es.- Parameters:
pathClasses
- list of acceptable classifications; must be greater than 0.- Returns:
-
containsClassification
Predicate that returns true if any component of its classification has any of the specified names.- Parameters:
names
-- Returns:
- See Also:
-
baseClassification
Predicate that returns true if an object has any of the specified base classifications, regardless of any subclassification.- Parameters:
pathClasses
-- Returns:
- See Also:
-