webknossos.skeleton.group
To create a group, it is recommended to use webknossos.skeleton.skeleton.Skeleton.add_group
or
Group.add_group
. That way, the newly created group
is automatically attached as a child to the object the method was
called on.
A small usage example:
subgroup = group.add_group("a subgroup")
tree = subgroup.add_tree("a tree")
Read-only property.
Adds a tree to the current group. If the first parameter is a string, a new tree will be added with the provided name and color if specified. Otherwise, the first parameter is assumed to be a tree object (e.g., from another skeleton). A copy of that tree will then be added. If the id of the tree already exists, a new id will be generated.
Deprecated, please use add_tree
.
Returns all (immediate) children (groups and trees) as an iterator.
Returns all (immediate) tree children as an iterator. Use flattened_trees if you need also need trees within subgroups.
Deprecated, please use trees
.
Returns all (immediate) group children as an iterator. Use flattened_groups if you need also need groups within subgroups.
Adds a (sub) group to the current group with the provided name.
Returns the total number of nodes of all trees within this group (and its subgroups).
Returns the highest tree id of all trees within this group (and its subgroups).
Deprecated, please use get_max_tree_id
.
Returns the highest node id of all nodes of all trees within this group (and its subgroups).
Returns an iterator of all trees within this group (and its subgroups).
Deprecated, please use flattened_trees
.
Returns an iterator of all groups within this group (and its subgroups).
Returns the node which has the specified node id.
Returns the tree which has the specified tree id.
Returns true if this group (or a subgroup) contains a tree with the given id.
Deprecated, please use get_tree_by_id
.
Returns the group which has the specified group id.
Returns a named tuple representation of this group.