habitat_region_stats
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.
- habitat_region_stats(label_array: ndarray) Dict[int, Tuple[int, int]][source]
Measure connected-component fragmentation per habitat.
Connected components use face connectivity, matching the SimpleITK
ConnectedComponentdefault used by the v0.1 ITH implementation. The volume is cropped to the tumour bounding box first; that does not change region counts or sizes.- Parameters:
label_array – Integer habitat labels,
0denoting background.- Returns:
Mapping of habitat id to
(num_regions, largest_region_size)in voxels. Habitats absent from the array do not appear.