TraditionalRadiomicsHabitatFeatures

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 TraditionalRadiomicsHabitatFeatures(params_file: str | None = None, params: Dict[str, Any] | None = None, modalities: Sequence[str] | None = None, modality: str | None = None, as_: str | None = None, use_torch_radiomics: str | bool = False, torch_device: str = 'auto', torch_dtype: str = 'float64')[source]

Bases: object

PyRadiomics features of the raw image(s) within the whole ROI.

This is the v1 form of the v0.1 traditional feature type (and of the standalone habit radiomics path): the habitat map is binarised into a single ROI mask and PyRadiomics runs on each raw modality within it. The mask construction, the mask-metadata harmonisation and the PyRadiomics invocation replicate the v0.1 HabitatRadiomicsExtractor.extract_tranditional_radiomics exactly, so extracted numbers stay comparable with previously published results.

Column names keep the v0.1 CSV scheme {feature}_of_{modality} with diagnostic entries dropped. A per-subject failure (e.g. an unreadable modality) raises instead of yielding a silently empty row – the execution layer’s failure policy decides whether the cohort run continues, which is where that decision belongs in v1.

The single-modality form modality="T1" is the tree-friendly alternative to modalities=["T1"]; as_ renames the _of_ column suffix so the same modality can appear twice in a tree under two parameter sets without a name clash.

__init__(params_file: str | None = None, params: Dict[str, Any] | None = None, modalities: Sequence[str] | None = None, modality: str | None = None, as_: str | None = None, use_torch_radiomics: str | bool = False, torch_device: str = 'auto', torch_dtype: str = 'float64') → None[source]
property spec: Spec

Return the algorithm specification.

__call__(subject: Subject, habitat_map: HabitatMap) → FeatureTable[source]

Compute the traditional-radiomics family for one subject.

Parameters:
  • subject – Owning subject; every selected modality is extracted.

  • habitat_map – Habitat labels; binarised into the ROI mask.

Returns:

One-row table of {feature}_of_{modality} columns.