Package qupath.lib.objects
Class PathObjectConnections
java.lang.Object
qupath.lib.objects.PathObjectConnections
- All Implemented Interfaces:
Externalizable
,Serializable
Data structure for storing multiple PathObjectConnectionGroups.
- Author:
- Pete Bankhead
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new connections group.void
clear()
Clear all existing connections.Get an unmodifiable list containing all connections groups.getConnections
(PathObject pathObject) Get all the connections to a specified PathObject.boolean
isEmpty()
Returns true if the group is empty.void
boolean
Remove a connections group.void
-
Constructor Details
-
PathObjectConnections
public PathObjectConnections()Default constructor.
-
-
Method Details
-
getConnections
Get all the connections to a specified PathObject.This will iterate through all the groups and return the connections from the first group containing this object.
If the object may be contained in multiple groups, then the groups will need to be requested instead with getConnectionGroups(), and searched elsewhere.
- Parameters:
pathObject
-- Returns:
-
getConnectionGroups
Get an unmodifiable list containing all connections groups.- Returns:
-
addGroup
Add a new connections group.- Parameters:
group
-
-
removeGroup
Remove a connections group.- Parameters:
group
-- Returns:
-
isEmpty
public boolean isEmpty()Returns true if the group is empty.- Returns:
-
clear
public void clear()Clear all existing connections. -
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-