extract_features

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.

extract_features(image: ImageVolume | ndarray | str | Path | Any, mask: MaskVolume | ndarray | str | Path | Any, params: Mapping[str, Any] | str | Path | None = None, *, label: int = 1, backend: str = 'pyradiomics', geometry_policy: GeometryPolicy = GeometryPolicy.STRICT, geometry_tolerance: float = 1e-06) → FeatureResult[source]

Extract segment-based radiomics features from one image/mask pair.

Parameters:
  • image – Image data as an ImageVolume, NumPy array, SimpleITK image, or supported image file path.

  • mask – Segmentation data as a MaskVolume, NumPy array, SimpleITK image, or supported mask file path.

  • params – PyRadiomics parameter mapping or YAML parameter-file path. None selects PyRadiomics defaults.

  • label – Positive mask label identifying the region of interest.

  • backend – Explicit extraction backend. Only "pyradiomics" is currently implemented by the stable low-level API.

  • geometry_policy – How to handle image/mask geometry mismatch.

  • geometry_tolerance – Absolute tolerance used by geometry validation.

Returns:

A structured result containing scalar feature values, diagnostics, resolved parameters, and the geometry action applied before extraction.

Raises: