Class ChannelClassifierConfig

java.lang.Object
qupath.ext.braian.config.ChannelClassifierConfig

public class ChannelClassifierConfig extends Object
  • Constructor Details

    • ChannelClassifierConfig

      public ChannelClassifierConfig()
  • Method Details

    • getChannel

      public String getChannel()
    • setChannel

      public void setChannel(String channel)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getAnnotationsToClassify

      public List<String> getAnnotationsToClassify()
    • setAnnotationsToClassify

      public void setAnnotationsToClassify(List<String> annotationsToClassify)
    • loadClassifier

      public qupath.lib.classifiers.object.ObjectClassifier loadClassifier() throws IOException
      Loads the object classifier specified in the configuration file. If the specified name is equals to "ALL", it returns a SingleClassifier that 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 by BraiAn.resolvePath(String) and reads it.
      Returns:
      an instance of ObjectClassifier loaded 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 PartialClassifier 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: