DICOM
For site-specific access setup, see DICOMweb authentication. Choose the method and permissions approved by your administrator.
fyron.dicom is the DICOM-native boundary for imaging projects: DICOMweb acquisition, generated synthetic image export, and standards-compliant DICOM SEG writing. Keep protocol-specific work here, then hand local files to Imaging for array/NIfTI/QC operations.
Requests-based FHIR, DICOMweb, document, and LLM clients follow redirects only within the same scheme, host, and port. Cross-origin redirects, HTTPS downgrades, and URLs containing user credentials are blocked before forwarding request bodies or custom authentication headers. Configure the approved final endpoint directly when a service redirects elsewhere. This guard is also installed on supplied sessions, while preserving existing response hooks.
DICOM Submodules
| Chapter | Use it for |
|---|---|
| DICOMDownloader | Download DICOMweb studies or series and write manifests. |
| Synthetic DICOM/NIfTI export | Write generated or GAN-derived volumes with synthetic identifiers. |
| DICOM SEG export | Write segmentation masks as source-referenced DICOM SEG objects. |
Choose The Right Path
| Need | Prefer |
|---|---|
| Download one study or series | DICOMDownloader |
| Batch-download imaging rows from a cohort table | DICOMDownloader |
| Export generated CT/MR-like volumes | Synthetic Export |
| Export model/manual segmentation masks to DICOM viewers | DICOM SEG |
| Read local headers, series, NIfTI, geometry, or mask QC | Imaging |
Typical Workflow
- Configure DICOMweb endpoint credentials.
- Download one test series and inspect the result.
- Scale to a DataFrame-driven batch download.
- Store manifests beside the cohort.
- Run local imaging QC before segmentation, radiomics, or DICOM SEG export.
Imports
from fyron import DICOMDownloader
from fyron.dicom.synthetic import write_synthetic_dicom_series
from fyron.dicom.seg import write_dicom_segMinimal Acquisition Example
from fyron import DICOMDownloader
downloader = DICOMDownloader(
dicom_web_url="https://pacs.example.org/dicomweb",
output_format="dicom",
)
result = downloader.download_series(
study_uid="1.2.3",
series_uid="1.2.3.4",
output_dir="dicom_out",
)CLI Examples
fyron dicom-download \
--dicom-web-url https://pacs.example.org/dicomweb \
--study-uid 1.2.3 \
--series-uid 1.2.3.4 \
--output-dir dicom_out \
--output-format dicomfyron dicom-seg \
--mask total.nii.gz \
--source-dicom original_dicom/case_001 \
--segments segments.json \
--output segmentations/case_001.seg.dcm \
--validateCommon Pitfalls
- Use
output_format="dicom"if later writing DICOM SEG; SEG needs original source images. - Keep download manifests with the study cohort for reproducibility.
- Do not use synthetic DICOM export for segmentation masks; use DICOM SEG.
- Confirm UID columns before large batch downloads.
Related Modules
- Imaging for local DICOM/NIfTI I/O and QC.
- BOA for body-composition extraction, radiomics, and visualization.
- Audit & Provenance for reproducibility manifests.