Package qupath.ext.braian
Class ChannelDetections
java.lang.Object
qupath.ext.braian.AbstractDetections
qupath.ext.braian.ChannelDetections
This class allows to manage detections computed with
WatershedCellDetection
on a given image channel. It does so by leveraging AbstractDetections
interface-
Field Summary
-
Constructor Summary
ConstructorDescriptionChannelDetections
(String channelName, qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) Creates an instance based on pre-computed cell detections.ChannelDetections
(ImageChannelTools channel, Collection<qupath.lib.objects.PathAnnotationObject> annotations, WatershedCellDetectionConfig config, qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) Computes the detections usingWatershedCellDetection
algorithm inside the given annotationsChannelDetections
(ImageChannelTools channel, qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) Creates an instance based on pre-computed cell detections.ChannelDetections
(ImageChannelTools channel, qupath.lib.objects.PathAnnotationObject annotation, WatershedCellDetectionConfig config, qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) Computes the detections usingWatershedCellDetection
algorithm inside the given annotations -
Method Summary
Modifier and TypeMethodDescriptionstatic qupath.lib.objects.classes.PathClass
createClassification
(String channelName) static qupath.lib.objects.PathAnnotationObject
getFullImageDetectionAnnotation
(qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) Returns the annotation used when working with detections on the whole imageMethods inherited from class qupath.ext.braian.AbstractDetections
applyClassifiers, createContainer, equals, fireUpdate, getChildrenDetections, getContainers, getContainersPathClass, getDetectionsInside, getDetectionsInside, getDetectionsPathClasses, getDiscardedDetectionsPathClass, getHierarchy, getId, getOverlappingObjectIfPresent, isChannelDetection, isCompatibleClassifier, isCompatibleWith, isContainer, isEmpty, toStream
-
Field Details
-
FULL_IMAGE_DETECTIONS_NAME
- See Also:
-
-
Constructor Details
-
ChannelDetections
public ChannelDetections(String channelName, qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) throws NoCellContainersFoundException Creates an instance based on pre-computed cell detections. It selects all detections that are computed in a container identified bychannelName
.- Parameters:
channelName
- the name of the channel to which the detections are linked tohierarchy
- where to find the detections- Throws:
NoCellContainersFoundException
- if no pre-computed detection was found in the given hierarchy- See Also:
-
ChannelDetections
public ChannelDetections(ImageChannelTools channel, qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) throws NoCellContainersFoundException Creates an instance based on pre-computed cell detections. It selects all detections that are computed in a container identified bychannel
.- Parameters:
channel
- the channel to which the detections are linked tohierarchy
- where to find the detections- Throws:
NoCellContainersFoundException
- if no pre-computed detection was found in the given hierarchy- See Also:
-
ChannelDetections
public ChannelDetections(ImageChannelTools channel, Collection<qupath.lib.objects.PathAnnotationObject> annotations, WatershedCellDetectionConfig config, qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) throws NoCellContainersFoundException Computes the detections usingWatershedCellDetection
algorithm inside the given annotations- Parameters:
channel
- the channel to which the detections are linked toannotations
- the annotations inside of which to compute the detections. If null or empty, it will compute them on the whole imageconfig
- parameters to give to theWatershedCellDetection
hierarchy
- where to compute the detections- Throws:
NoCellContainersFoundException
- See Also:
-
ChannelDetections
public ChannelDetections(ImageChannelTools channel, qupath.lib.objects.PathAnnotationObject annotation, WatershedCellDetectionConfig config, qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) throws NoCellContainersFoundException Computes the detections usingWatershedCellDetection
algorithm inside the given annotations- Parameters:
channel
- the channel to which the detections are linked toannotation
- the annotation inside of which to compute the detections. If null, it will compute them on the whole imageconfig
- parameters to give to theWatershedCellDetection
hierarchy
- where to compute the detections- Throws:
NoCellContainersFoundException
- See Also:
-
-
Method Details
-
getFullImageDetectionAnnotation
public static qupath.lib.objects.PathAnnotationObject getFullImageDetectionAnnotation(qupath.lib.objects.hierarchy.PathObjectHierarchy hierarchy) Returns the annotation used when working with detections on the whole image- Parameters:
hierarchy
- where to find/compute the detections- Returns:
- the full image detection named as
FULL_IMAGE_DETECTIONS_NAME
-
createClassification
-
getContainersName
- Specified by:
getContainersName
in classAbstractDetections
- Returns:
- the name used by the containers of detections of the instance kind
-