Package qupath.ext.braian
Record Class PartialClassifier
java.lang.Object
java.lang.Record
qupath.ext.braian.PartialClassifier
- Record Components:
classifier
- an object classifierannotations
- the annotations to which contained detection solely apply theclassifier
. Ifnull
, it applies it to the whole image.
public record PartialClassifier(qupath.lib.classifiers.object.ObjectClassifier<?> classifier, Collection<qupath.lib.objects.PathAnnotationObject> annotations)
extends Record
Creates a classifier to apply to an instance of
AbstractDetections
-
Constructor Summary
ConstructorDescriptionPartialClassifier
(qupath.lib.classifiers.object.ObjectClassifier<?> classifier, Collection<qupath.lib.objects.PathAnnotationObject> annotations) Creates an instance of aPartialClassifier
record class. -
Method Summary
Modifier and TypeMethodDescriptionCollection<qupath.lib.objects.PathAnnotationObject>
Returns the value of theannotations
record component.qupath.lib.classifiers.object.ObjectClassifier<?>
Returns the value of theclassifier
record component.boolean
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PartialClassifier
public PartialClassifier(qupath.lib.classifiers.object.ObjectClassifier<?> classifier, Collection<qupath.lib.objects.PathAnnotationObject> annotations) Creates an instance of aPartialClassifier
record class.- Parameters:
classifier
- the value for theclassifier
record componentannotations
- the value for theannotations
record component
-
-
Method Details
-
coversFullImage
public boolean coversFullImage()- Returns:
- true, if the partial classifier covers the whole whole image, thus causing all detections to be classified
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
classifier
public qupath.lib.classifiers.object.ObjectClassifier<?> classifier()Returns the value of theclassifier
record component.- Returns:
- the value of the
classifier
record component
-
annotations
Returns the value of theannotations
record component.- Returns:
- the value of the
annotations
record component
-