habitat_volume_fractions
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_volume_fractions(label_array: ndarray, habitat_ids: Iterable[int]) Dict[int, float][source]
Compute each habitat’s voxel fraction of the non-background volume.
- Parameters:
label_array – Integer habitat labels,
0denoting background.habitat_ids – Habitat ids to report, in output order. Ids absent from the array receive fraction
0.0.
- Returns:
Mapping of habitat id to fraction in
[0, 1]; all zeros when the array contains no non-background voxel.
Examples using habit.kernels.habitat_volume_fractions
Comparing habitat maps with and without preprocessing
Comparing habitat maps with and without preprocessing