habitat_ith_dispersion
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_ith_dispersion(label_array: ndarray) Dict[int, float][source]
Per-habitat ITH (dispersion) on the same formula as
ith_score().For habitat
iwith voxel countS_i, largest componentS_i,max, andn_iconnected regions:d_i = 1 - (S_i,max / n_i) / S_i
The global ITH score is the volume-weighted mean of these values. A single connected blob scores
0; many small fragments approach1.- Parameters:
label_array – Integer habitat labels,
0denoting background.- Returns:
Mapping of habitat id to dispersion in
[0, 1). Habitats absent from the array do not appear. An empty map returns{}.