Package qupath.ext.braian.config
Class ProjectsConfig
java.lang.Object
qupath.ext.braian.config.ProjectsConfig
This class reads a YAML file and can be used to apply the given parameters to the computation offered by BraiAn extension
For more information, read this config file example.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCollection<qupath.lib.objects.PathAnnotationObject>
getAnnotationsForDetections
(qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) Finds (or creates) the annotations chosen for computing the detections, accordingly to the configuration file.Retrieves the name of the channel to be used as control in the overlappingstatic ProjectsConfig
Reads a BraiAn configuration filevoid
setChannelDetections
(List<ChannelDetectionsConfig> channelDetections) void
setClassForDetections
(String classForDetections) void
setDetectionsCheck
(DetectionsCheckConfig detectionsCheck)
-
Constructor Details
-
ProjectsConfig
public ProjectsConfig()
-
-
Method Details
-
read
public static ProjectsConfig read(String yamlFileName) throws IOException, org.yaml.snakeyaml.error.YAMLException Reads a BraiAn configuration file- Parameters:
yamlFileName
- the name of the file, not the path. It will then search it first into the project's directory and, if it wasn't there, in its parent directory. If it cannot still find it, it throwsFileNotFoundException
- Returns:
- an instance of
ProjectsConfig
- Throws:
IOException
- if it found the config file, but it had problems while reading it.org.yaml.snakeyaml.error.YAMLException
- if it found and read the config file, but it was badly formatted.
-
getClassForDetections
-
getAnnotationsForDetections
public Collection<qupath.lib.objects.PathAnnotationObject> getAnnotationsForDetections(qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) Finds (or creates) the annotations chosen for computing the detections, accordingly to the configuration file. It reads the value of 'classForDetections' in the YAML and searches all annotations having the appointed classification- Parameters:
hierarchy
- where to search the annotations in- Returns:
- the annotations to be used for computing the detections
- See Also:
-
setClassForDetections
-
getDetectionsCheck
-
setDetectionsCheck
-
getControlChannel
Retrieves the name of the channel to be used as control in the overlapping- Returns:
- an empty optional if no overlapping is desired or if there there is only one image channel to compute the detections for
- See Also:
-
getChannelDetections
-
setChannelDetections
-