render_habitat_graph_network_3d

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

render_habitat_graph_network_3d(label_array: ndarray, *, options: HabitatGraphFeatureOptions = HabitatGraphFeatureOptions(include_single_habitat_graph=True, include_pairwise_habitat_graph=True, edge_method='min_distance', distance_threshold=5.0, adjacency_connectivity='corner', adjacency_min_voxels=10, edge_weight='none', min_region_voxels=1, connectivity='full', erosion_radius=0, node_method='uniform_grid', subdivide_region_voxels=1000, block_size=8, block_min_coverage=0.2, pairwise_include_intra_edges=True, include_extended_metrics=True, extended_min_nodes=10, small_world_nrand=100, small_world_niter=100, rich_club_q=100, graph_null_sampler='analytic', graph_null_device='auto'), spacing: Tuple[float, float, float] = (1.0, 1.0, 1.0), black_background: bool = True, render_window: int = 1600) → ndarray | None[source]

Render the 3D feature-aligned spatial graph on a dark scene (PyVista).

Nodes are spheres at region centroids colored by habitat; intra-habitat edges are thin gray tubes and inter-habitat edges are thicker accent tubes.

Parameters:
  • label_array – 3D habitat label map (background encoded as 0).

  • options – Graph construction options shared with the feature extractor.

  • spacing – Voxel spacing as (sz, sy, sx).

  • black_background – Whether the scene uses a black background.

  • render_window – Off-screen render window edge length in pixels.

Returns:

RGB render of shape (H, W, 3), or None when the volume yields no graph nodes.

Return type:

Optional[np.ndarray]

Raises: