autods_pet.results#

Structured result types for ROI extraction and Deauville Score computation.

class autods_pet.results.ROIResult(stats=<factory>, refined_mask=None, shrinkage=None)[source]#

Bases: object

Result from a single ROI extraction.

Parameters:
stats#

Computed statistics (e.g. {"median": 2.8, "p95": 3.1}).

Type:

dict[str, float | None]

refined_mask#

The refined binary mask, if available.

Type:

sitk.Image or None

shrinkage#

Voxel-count and volume deltas from refinement (see shrinkage_report()).

Type:

dict[str, Any] or None

Examples

>>> from autods_pet.results import ROIResult
>>> roi = ROIResult(stats={"median": 2.8, "p95": 3.1})
>>> roi.stats["median"]
2.8
class autods_pet.results.DeauvilleResult(patient_id, scores=<factory>, rois=<factory>, error=None)[source]#

Bases: object

Result from a full pipeline run.

Parameters:
patient_id#

The patient identifier.

Type:

str

scores#

Deauville Scores keyed by short name (e.g. {"FL_DS": 4, "BM_DS": 3}) or float ratios (e.g. {"BLR": 1.8}).

Type:

dict[str, int | float]

rois#

Per-ROI extraction results.

Type:

dict[str, ROIResult]

error#

Error message if the pipeline failed, else None.

Type:

str or None

Examples

>>> from autods_pet.results import DeauvilleResult, ROIResult
>>> result = DeauvilleResult(
...     patient_id="PAT001",
...     scores={"FL_DS": 4},
...     rois={"Liver": ROIResult(stats={"median": 2.8})},
... )
>>> result.scores["FL_DS"]
4