Skip to main content

Policy-driven quality control and validation of DICOM metadata for research release.

Project description

dicomqc

Policy-driven DICOM de-identification audit and research-release readiness reporting

Build Documentation PyPI Python License


dicomqc is a policy-driven, standards-aware audit framework for validating DICOM de-identification and research-release readiness.

dicomqc inspects DICOM metadata after pseudonymization or anonymization and produces redaction-safe audit evidence in JSON, CSV, and MultiQC-compatible formats.

Documentation: https://cnag-biomedical-informatics.github.io/dicomqc/

dicomqc is not an anonymizer. It never modifies original DICOM files. If it reports required changes, apply them with an external pseudonymization or anonymization tool and rerun the audit.

The intended operating mode is DICOM-in and DICOM-out: raw .dcm files are pseudonymized into release-candidate .dcm files, and dicomqc audits those outputs before research sharing.

Key Points

  • Metadata-only DICOM scanning with pydicom
  • Built-in research-release checks for direct PHI, pseudonym format, and private tags
  • Redaction-safe reports that do not emit raw DICOM values
  • JSON and CSV outputs for pipeline evidence
  • MultiQC custom-content output with a styled example report
  • Synthetic DICOM fixtures for reproducible tests and demonstrations
  • Read-only design: remediation is performed by external tools such as DCMTK, Orthanc, XNAT workflows, or custom pipeline steps
  • Future scope for policy DSLs, DICOM PS3.15 profiles, BIDS-oriented checks, plugin architecture, and vendor metadata fingerprinting

Installation

Install the release from PyPI in an isolated environment:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install dicomqc
dicomqc --version

From a source checkout, install the package in editable mode:

python3 -m pip install -e .

Contributors who need the test and coverage tools can install the test optional dependency group:

python3 -m pip install -e ".[test]"

For local remediation workflows, install external DICOM tools separately. For example, DCMTK provides dcmodify and dcmdump, but dicomqc itself remains read-only.

Quick Start

Generate a complete synthetic DICOM demo and report bundle:

dicomqc demo

This creates dicomqc-demo/ with synthetic .dcm files, report.json, findings.csv, and MultiQC custom-content files. The demo includes intentional findings so users can see what a failed release gate looks like.

Run an audit on a directory of candidate release .dcm files:

dicomqc scan study/ --json report.json --csv findings.csv --multiqc

Exit codes:

  • 0: no warnings or errors
  • 1: warnings only
  • 2: validation errors or fatal scan failure

Reports

Output Purpose
JSON Full structured audit result for pipelines and archival evidence
CSV One row per finding for review and spreadsheet workflows
MultiQC Custom-content summary for projects that aggregate QC reports

Render the demo with MultiQC, if installed:

multiqc dicomqc-demo/dicomqc --outdir dicomqc-demo --force

Use examples/multiqc/multiqc_config.yaml when rendering the demo report if you want the repository logo and styling in local MultiQC output.

Documentation

The documentation site lives in docs-site/ and uses Docusaurus.

cd docs-site
npm install
npm run build

Important docs:

Prior Work

dicomqc is intended to build on and complement related work, not duplicate it. Known related projects include:

  • SPMIC-UoN/xnat-dicomqc: an XNAT container script for configurable tag-based QC on scan DICOMs.
  • IUSCA/SQAN: Scalable Quality Assurance for Neuroimaging, a broader DICOM metadata ETL and QC verification system.

The initial dicomqc direction is a backend-independent, policy-driven audit framework focused on de-identification validation, release-readiness evidence, and future standards-aware rule packs.

Citation

dicomqc is early-stage research software. Until a stable release, archived DOI, or manuscript is available, cite the repository URL and the exact version or commit used in your analysis.

Author

Written by Manuel Rueda. GitHub repository: https://github.com/CNAG-Biomedical-Informatics/dicomqc.

Copyright and License

Copyright 2026 Manuel Rueda, CNAG.

dicomqc is distributed under the Apache License 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dicomqc-0.1.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dicomqc-0.1.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file dicomqc-0.1.0.tar.gz.

File metadata

  • Download URL: dicomqc-0.1.0.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for dicomqc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b30ac4f22f553831a545260bab78654f6c739711c9624f7bd1bf4c623ee2204f
MD5 f2212ce13bc6d67d1c95f3fd30d9ddcb
BLAKE2b-256 88bf1349ec36a3cb13c268b8b2911e13af00cd7d489cb46b4d5b082f981d441d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dicomqc-0.1.0.tar.gz:

Publisher: publish-pypi.yml on CNAG-Biomedical-Informatics/dicomqc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dicomqc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dicomqc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for dicomqc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22b3a63643529dda73f9399687745a59f21664a0e6b38ab3bb03b5d6491e3345
MD5 810e98b25639626322bb6ad068127120
BLAKE2b-256 4e3d7f1bc0f65e36cabca2b2e4f6b3b5375280f1dbbe4a9245d1c5f537fefe69

See more details on using hashes here.

Provenance

The following attestation bundles were made for dicomqc-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on CNAG-Biomedical-Informatics/dicomqc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page