Package qupath.ext.braian.config
Class ChannelClassifierConfig
java.lang.Object
qupath.ext.braian.config.ChannelClassifierConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<qupath.lib.objects.PathAnnotationObject> getAnnotationsToClassify(qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) It searches all annotations specified by their name in the configuration file.getName()<T> qupath.lib.classifiers.object.ObjectClassifier<T> Loads the object classifier specified in the configuration file.voidsetAnnotationsToClassify(List<String> annotationsToClassify) voidsetChannel(String channel) void<T> PartialClassifier<T> toPartialClassifier(qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) Loads the classifier and associates it to the annotations whose name is listed in the configuration file.
-
Constructor Details
-
ChannelClassifierConfig
public ChannelClassifierConfig()
-
-
Method Details
-
getChannel
-
setChannel
-
getName
-
setName
-
getAnnotationsToClassify
-
setAnnotationsToClassify
-
loadClassifier
Loads the object classifier specified in the configuration file. If the specified name is equals to"ALL", it returns aSingleClassifierthat classifies all detections as part positive cells from this configuration's image channel. Else, it searches for the a JSON file named after the specified string, as described byBraiAn.resolvePath(String)and reads it.- Returns:
- an instance of
ObjectClassifierloaded based on the configuration file - Throws:
IOException- if any problem raises when reading the JSON file, supposedly corresponding to a QuPath object classifier.
-
getAnnotationsToClassify
public Collection<qupath.lib.objects.PathAnnotationObject> getAnnotationsToClassify(qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) It searches all annotations specified by their name in the configuration file. If a name does not correspond to any annotation in the current hierarchy, it silently skips it.- Parameters:
hierarchy- where to search teh annotations in- Returns:
- a collection of annotations, if they were specified in the configuration file.
Otherwise,
null.
-
toPartialClassifier
public <T> PartialClassifier<T> toPartialClassifier(qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) throws IOException Loads the classifier and associates it to the annotations whose name is listed in the configuration file.- Parameters:
hierarchy- where to search the annotations in- Returns:
- an instance of
PartialClassifier - Throws:
IOException- See Also:
-