Skip to content

webknossos.skeleton.nml.from_skeleton

#   def from_skeleton( group: webknossos.skeleton.group.Group, parameters: Union[Dict[str, Any], NoneType] = None, volume_dict: Union[Dict[str, Any], NoneType] = None ) -> webknossos.skeleton.nml.NML:

A utility to convert a NetworkX graph object into wK NML skeleton annotation object. Accepts both a simple list of multiple skeletons/trees or a dictionary grouping skeleton inputs.

Arguments: tree_dict (Union[List[nx.Graph], Dict[str, List[nx.Graph]]]): A list of wK tree-like structures as NetworkX graphs or a dictionary of group names and same lists of NetworkX tree objects. parameters (Dict[str, Any]): A dictionary representation of the skeleton annotation metadata. See NmlParameters for accepted attributes. volume (Optional[Dict[str, Any]] = None): A dictionary representation of a reference to a wK volume annotation. See NmlVolume object for attributes.

Return: nml (NML): A wK NML skeleton annotation object

Back to top