Package qupath.opencv.features
Class DelaunayTriangulation
java.lang.Object
qupath.opencv.features.DelaunayTriangulation
- All Implemented Interfaces:
PathObjectConnectionGroup
Compute Delaunay triangulation using OpenCV.
- Author:
- Pete Bankhead
-
Constructor Summary
ConstructorDescriptionDelaunayTriangulation
(List<PathObject> pathObjects, double pixelWidth, double pixelHeight, double distanceThresholdPixels, boolean limitByClass) Compute Delaunay triangulation - optionally omitting links above a fixed distance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Compute mean measurements from clustering all connected objects.void
Add Delaunay measurements to each pathObject.boolean
containsObject
(PathObject pathObject) Returns true if the specified PathObject is contained within this group.Get a list of PathObjects that are connected to each other in this triangulation.Collection
<double[]> getConnectedNodes
(Collection<PathObject> pathObjects, Collection<double[]> connections) Deprecated.getConnectedNodes
(PathObject pathObject, Collection<PathObject> list) Get all the PathObjects immediately connected to the specified object, adding the points into a collection (or creating a new one).getConnectedObjects
(PathObject pathObject) Get all the connections to a specified PathObject stored in this group.Get an unmodifiable collection containing all the PathObjects contained within this group.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface qupath.lib.objects.PathObjectConnectionGroup
getPathObjectsForRegion
-
Constructor Details
-
DelaunayTriangulation
public DelaunayTriangulation(List<PathObject> pathObjects, double pixelWidth, double pixelHeight, double distanceThresholdPixels, boolean limitByClass) Compute Delaunay triangulation - optionally omitting links above a fixed distance.- Parameters:
pathObjects
-pixelWidth
-pixelHeight
-distanceThresholdPixels
- - Note, this is in *pixels* (and not scaled according to pixelWidth & pixelHeight)limitByClass
-
-
-
Method Details
-
getConnectedObjects
Description copied from interface:PathObjectConnectionGroup
Get all the connections to a specified PathObject stored in this group.If containsObject(pathObject) returns null, this will return an empty list (and not null).
- Specified by:
getConnectedObjects
in interfacePathObjectConnectionGroup
- Parameters:
pathObject
-- Returns:
-
getPathObjects
Description copied from interface:PathObjectConnectionGroup
Get an unmodifiable collection containing all the PathObjects contained within this group.- Specified by:
getPathObjects
in interfacePathObjectConnectionGroup
- Returns:
-
getConnectedNodes
@Deprecated public Collection<double[]> getConnectedNodes(Collection<PathObject> pathObjects, Collection<double[]> connections) Deprecated.Get connected nodes. Returned as a list where pairs are consecutive, i.e. get(i) links to get(i+1) (although get(i+1) doesn't necessarily link to get(i+2)...)- Parameters:
pathObjects
-connections
-- Returns:
-
getConnectedNodes
Get all the PathObjects immediately connected to the specified object, adding the points into a collection (or creating a new one).- Parameters:
pathObject
-list
-- Returns:
-
getConnectedClusters
Get a list of PathObjects that are connected to each other in this triangulation. Warning: This list is recomputed on every call, therefore references should be cached by the caller if necessary to avoid too much recomputation.- Returns:
-
addClusterMeasurements
public void addClusterMeasurements()Compute mean measurements from clustering all connected objects. -
addNodeMeasurements
public void addNodeMeasurements()Add Delaunay measurements to each pathObject. -
containsObject
Description copied from interface:PathObjectConnectionGroup
Returns true if the specified PathObject is contained within this group.- Specified by:
containsObject
in interfacePathObjectConnectionGroup
- Parameters:
pathObject
-- Returns:
-