Guide to Results Interpretation¶
The pipeline produces a rich hierarchy of artefacts for each patient course. This document explains where to find them, how to interpret key columns, and which sanity checks you should perform before downstream analyses.
1. Course Directory Overview¶
Each course lives under Data_Snakemake/<patient>/<course>/ and contains:
DICOM/CT/… # planning CT slices
DICOM/MR/… # MR slices copied directly under the course
MR/<SeriesInstanceUID>/
DICOM/… # MR source series
NIFTI/<name>.nii.gz # compressed NIfTI + metadata JSON
Segmentation_TotalSegmentator/
total_mr--<roi>.nii.gz # MR binary masks
<name>--total_mr.dcm # MR RTSTRUCT
Segmentation_TotalSegmentator/… # CT TotalSegmentator outputs
Segmentation_CustomModels/<model>/… # nnUNet masks (e.g. cardiac_STOPSTORM, HN_lymph_nodes)
Segmentation_Original/… # manual RTSTRUCT converted to masks (if available)
RS.dcm / RS_auto.dcm / RS_custom.dcm
radiomics_ct.xlsx
MR/radiomics_mr.xlsx
dvh_metrics.xlsx
fractions.xlsx
metadata/case_metadata.xlsx
qc_reports/*.json
RTSTRUCT quick reference
| File | Origin | What it represents | Primary consumers |
|---|---|---|---|
RS.dcm |
Copied verbatim during the organize stage. | Untouched physician RTSTRUCT (manual contours + beam associations). | Regulatory archive, DVH/radiomics comparisons against manual ROIs. |
RS_auto.dcm |
Generated from TotalSegmentator CT masks. | Auto contours aligned to the full CT grid. | Auto-contour import, DVH/radiomics when automation is acceptable. |
RS_auto_cropped.dcm |
Created by anatomical_cropping.py when ct_cropping.enabled: true; clamp extents live in cropping_metadata.json. |
Same ROIs as RS_auto.dcm, but intersected with the systematic cropping box so voxel counts match trimmed images. |
Radiomics/DVH/QC when ct_cropping.use_cropped_for_* toggles are enabled (cropped ROIs marked as INFO in QC reports). |
RS_custom.dcm |
Built by structure_merger.py by combining manual, auto, and Boolean definitions from custom_structures*.yaml. |
Clean superset with derived ROIs (bowel bag, merged bones, etc.) plus provenance tags. | Default source for DVH, CT/MR radiomics (Custom source), robustness perturbations. |
Aggregated artefacts reside in Data_Snakemake/_RESULTS/:
dvh_metrics.xlsxradiomics_ct.xlsx,radiomics_mr.xlsxfractions.xlsxcase_metadata.xlsxqc_reports.xlsx
2. Radiotherapy Metrics (DVH)¶
File: dvh_metrics.xlsx
Key columns:
| Column | Meaning |
|---|---|
ROI_Name |
Clean display name (cropped structures append __partial). |
ROI_OriginalName |
Raw name from RTSTRUCT / segmentation output. |
Segmentation_Source |
Provenance: Manual, AutoRTS_total, AutoRTS_total_mr, Merged, Custom, CustomModel:<name>. |
structure_cropped |
True when the mask touches the image boundary (quality flag). |
DmeanGy, DmaxGy, … |
Standard DVH metrics. |
Recommended checks
- Filter out
__partialstructures unless your analysis explicitly handles cropped contours. - Cross-check
Segmentation_Sourceto ensure you understand which model produced each ROI. - Review
_RESULTS/qc_reports.xlsxfor courses markedWARNINGorFAIL.
3. Radiomics Outputs¶
CT (radiomics_ct.xlsx)¶
- Parameters from
rtpipeline/radiomics_params.yaml. - Includes manual, TotalSegmentator, custom structures, and nnUNet outputs.
- Important columns:
roi_name,segmentation_source,structure_cropped, feature columns (GLCM, GLRLM, etc.).
MR (MR/radiomics_mr.xlsx)¶
- Parameters from
rtpipeline/radiomics_params_mr.yaml. - Rows correspond to masks produced by TotalSegmentator
total_mr. - Columns:
roi_name,series_uid,segmentation_source(AutoTS_total_mr), feature columns.
Aggregated copies are in _RESULTS/radiomics_ct.xlsx and _RESULTS/radiomics_mr.xlsx with additional patient_id / course_id context.
Usage tips
* Drop or flag rows where structure_cropped == True.
* When merging CT and MR features, include modality and segmentation_source to avoid mixing sources inadvertently.
4. Segmentation Manifests¶
Segmentation_TotalSegmentator/<base>/manifest.json– CT segmentation manifest listing models and masks.MR/<series>/Segmentation_TotalSegmentator/manifest.json– MR counterpart fortotal_mr.Segmentation_CustomModels/<model>/manifest.json– nnUNet model manifest (structures + originating networks).
These files are useful when auditing which masks exist, the order they were combined in, or updating post-processing pipelines.
5. MR-Specific Layout¶
For every referenced MR series:
MR/<SeriesInstanceUID>/DICOM/… # original slices
MR/<SeriesInstanceUID>/NIFTI/<name>.nii.gz # compressed volume
MR/<SeriesInstanceUID>/NIFTI/<name>.metadata.json # modality + linkage
MR/<SeriesInstanceUID>/Segmentation_TotalSegmentator/
total_mr--<ROI>.nii.gz
<name>--total_mr.dcm
The metadata JSON contains:
modality: "MR"series_instance_uidnifti_path/source_directory- Timestamp of conversion
Radiomics results for the whole course are consolidated into MR/radiomics_mr.xlsx.
6. Quality Control¶
qc_reports/*.json– per-course, structured QC results (overall_status,checks.structure_cropping, etc.)._RESULTS/qc_reports.xlsx– flattened version for cohort summaries.metadata/custom_structure_warnings.json– lists composite structures built from missing sources or cropped inputs (look for__partialsuffixes).
Recommended practice
* Investigate any course with overall_status != PASS.
* When structure_cropping lists critical OARs or targets, consider excluding them or regenerating masks with manual corrections.
7. Anonymisation Footprint¶
If you run scripts/anonymize_pipeline_results.py, the anonymised tree mirrors the structure above with remapped identifiers. Keep the generated key file secure; it restores patient/course mappings if needed.
8. Quick Checklist Before Analysis¶
- Course completeness – verify expected CT/MR series and check QC status.
- Segmentation provenance – filter by
Segmentation_Sourceto separate manual vs automated contours. - Partial structures – remove or flag
__partialentries in DVH and radiomics tables. - MR availability – confirm
MR/<series>/Segmentation_TotalSegmentator/exists before using MR radiomics. - Custom models – inspect
Segmentation_CustomModels/<model>/manifest.jsonto confirm network and label names.
With these checks you can confidently use the pipeline outputs for statistical modelling, quality monitoring, or downstream AI experiments.