A node in a skeleton tree representing a point in 3D space with additional metadata.
The Node class represents individual points in a skeleton annotation. Each node has a 3D position and can contain additional metadata such as comments, radius, rotation, and viewport information. Nodes are typically created and managed through Tree instances rather than directly.
Attributes:
- 
          position(Vec3Int) –3D coordinates of the node as (x, y, z). 
- 
          comment(str | None) –Optional text annotation for the node. 
- 
          radius(float | None) –Optional radius value, useful for representing varying thicknesses. 
- 
          rotation(Vec3Float | None) –Optional 3D rotation as (x, y, z) in radians. 
- 
          inVp(int | None) –Optional viewport number where the node was created. 
- 
          inMag(int | None) –Optional magnification level at which the node was created. 
- 
          bitDepth(int | None) –Optional bit depth of the data at node creation. 
- 
          interpolation(bool | None) –Optional flag indicating if the node was created through interpolation. 
- 
          time(int | None) –Optional timestamp for node creation. 
- 
          is_branchpoint(bool) –Boolean indicating if this node is a branching point. 
- 
          branchpoint_time(int | None) –Optional timestamp when the node was marked as a branchpoint. 
Notes
Nodes should typically be created using Tree.add_node() rather than instantiated directly.
This ensures proper integration with the skeleton structure.
Examples:
# Create a skeleton and tree
skeleton = Skeleton(name="example")
tree = skeleton.add_tree("dendrite")
# Add nodes and connect them
node1 = tree.add_node(position=(0, 0, 0), comment="soma")
node2 = tree.add_node(position=(100, 0, 0), radius=1.5)
tree.add_edge(node1, node2)
# Mark as branchpoint if needed
node1.is_branchpoint = True
- Get Help
- Community Forums
- Email Support