MIR.utils.dicom_utilsΒΆ

DICOM header inspection utilities.

Scan a directory of DICOM files, group them by series, and print a summary of the key header fields (patient/study/series, geometry, modality-specific acquisition parameters). Optionally dump the full header of one representative file per series.

Command line usage:

python -m MIR.utils.dicom_utils /path/to/dicom_dir
python -m MIR.utils.dicom_utils /path/to/dicom_dir --full
python -m MIR.utils.dicom_utils /path/to/dicom_dir --tags PatientWeight 0x00281053
python -m MIR.utils.dicom_utils /path/to/dicom_dir --hide-phi

Requires pydicom (pip install pydicom).

Functions

full_header_lines(ds[, hide_phi])

Return the full header of a dataset as a list of text lines.

main([argv])

Command-line entry point; parses arguments and calls print_dicom_info().

print_dicom_info(dicom_dir[, full, tags, ...])

Print the DICOM header information for every series in a directory.

scan_dicom_dir(dicom_dir[, recursive])

Read the headers of all DICOM files in a directory and group them by series.

summarize_series(datasets[, hide_phi])

Collect the summary header fields for one series.