build_voxel_field
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.
- build_voxel_field(subject: Subject, mask: ImageVolume, voxel_index: ndarray, feature_names: Sequence[str], values: ndarray, spec: Spec) VoxelFeatureField[source]
Assemble a
VoxelFeatureFieldwith provenance for one subject.- Parameters:
subject – Subject the features describe.
mask – ROI mask defining the field’s geometry.
voxel_index – ROI voxel coordinates, matching
valuesrow order.feature_names – Column names, in column order.
values – Voxel-by-feature matrix.
spec – The extractor’s specification, recorded in provenance.
- Returns:
The per-voxel feature field.
- Raises:
HABITAPIError – If
valuesdoes not describe every ROI voxel with one column per feature name.