webknossos._nml.nml
class
Nml(builtins.tuple):
Nml(meta, parameters, trees, branchpoints, comments, groups, volumes)
Nml( meta: List[webknossos._nml.meta.Meta], parameters: webknossos._nml.parameters.Parameters, trees: List[webknossos._nml.tree.Tree], branchpoints: List[webknossos._nml.branchpoint.Branchpoint], comments: List[webknossos._nml.comment.Comment], groups: List[webknossos._nml.group.Group], volumes: List[webknossos._nml.volume.Volume] = [])
Create new instance of Nml(meta, parameters, trees, branchpoints, comments, groups, volumes)
def
write(self, file: <class 'BinaryIO'>) -> None:
Writes the NML object to a file on disk.
Arguments: file (BinaryIO): A Python file handle
Example:
with open("out.nml", "wb") as f:
nml.write(f, nml)
Reads a WEBKNOSSOS NML skeleton file from disk, _parses it and returns an NML Python object
Arguments: file (BinaryIO): A Python file handle
Return: NML: A WEBKNOSSOS skeleton annotation as Python NML object
Example:
with open("input.nml", "rb") as f:
nml = Nml.parse(f)
Inherited Members
- builtins.tuple
- index
- count