RawVoxelFeatures
Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- class RawVoxelFeatures(modalities: Sequence[str] = (), roi: str | None = None, modality: str | None = None, as_: str | None = None)[source]
Bases:
objectPer-voxel raw intensity of every requested modality inside the ROI.
This is the simplest possible
VoxelFeatureExtractorand serves as the reference implementation for the protocol: one subject in, oneVoxelFeatureFieldout, with geometry validated before any computation.- Parameters:
modality – Single modality key – the explicit form used inside feature trees (
raw("T1")). Mutually exclusive withmodalities.modalities – Modality keys to read from the subject, in feature order – the historical convenience that stacks several modalities into one node without a
concatcombiner.as – Optional output-column alias. Valid only with exactly one resolved modality; the column is then named after the alias instead of the modality.
roi – Mask key defining the region of interest;
Noneuses the subject’s single mask.
- __init__(modalities: Sequence[str] = (), roi: str | None = None, modality: str | None = None, as_: str | None = None) None[source]
- __call__(subject: Subject) VoxelFeatureField[source]
Compute per-voxel intensities for one subject.
- Parameters:
subject – Subject providing the requested modalities and mask.
- Returns:
One row per ROI voxel, one column per modality (named after the source label: the
as_alias when given, else the modality).- Raises:
KeyError – If a modality or the ROI is absent on the subject.
GeometryError – If a modality and the mask do not share a grid.