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:
objectPyRadiomics features of the raw image(s) within the whole ROI.
This is the v1 form of the v0.1
traditionalfeature type (and of the standalonehabit radiomicspath): 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.1HabitatRadiomicsExtractor.extract_tranditional_radiomicsexactly, so extracted numbers stay comparable with previously published results.Column names keep the v0.1 CSV scheme
{feature}_of_{modality}withdiagnosticentries 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 tomodalities=["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]
- __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.