De-identification procedure that descibes how to de-identify DICOM files
Project description
Grand-Challenge DICOM De-Identification Procedure
This repository contains the code that generate the procedure for the Grand-Challenge.org de-identification methods. The procedure describes which action needs to be taken for a DICOM tag in order to be de-identified.
It is based on the DICOM Basic Profile of the Standard DICOM de-identification profile but customized for the use on the Grand-Challenge platform.
More information about de-identification choices can be found in the standard-operation procedure.
Procedure Usage
For JavaScript you can use the ESM + UDM bundles via the npmjs package:
The procedure.json has two lookups: firstly by SOPClassUID and secondly by the data element tag. This results in a "default" action that is to be executed for the data element in question. The action can be any of:
| Code | Action |
|---|---|
| "D" | replace with a non-zero length value that may be a dummy value and consistent with the VR |
| "Z" | replace with a zero length value, or a non-zero length value that may be a dummy value and consistent with the VR |
| "X" | remove |
| "K" | keep (unchanged for non-Sequence Attributes, cleaned for Sequences) |
| "C" | clean, that is replace with values of similar meaning known not to contain identifying information and consistent with the VR |
| "U" | replace with a non-zero length UID that is internally consistent within a set of Instances |
| "R" | reject the entire DICOM file |
For Python you can use the PyPi package: https://pypi.org/project/grand-challenge-dicom-de-id-procedure/
$ pip install grand-challenge-dicom-de-id-procedure
To load the procedure import it as follows:
from grand_challenge_dicom_de_id_procedure import procedure
# Check the version
print(procedure["version"])
# Get an action for tag (0008,0005) of SOPClassUID "1.2.840.10008.5.1.4.1.1.2" (CT image)
action = procedure["sopClass"]["1.2.840.10008.5.1.4.1.1.2"]["tag"]["(0008,0005)"]["default"]
print(action) # "K"
Procedure Building
First, install uv you should then be able to run the any of the following make commands:
$ make base
Which will create the base procedure, see Action logic below for details.
$ make candidate
Which will merge BASE + MANUAL procedures to generate a CANDIDATE procedure. The MANUAL procedure is a hand-crafted action list for each DICOM tag that is unset in the BASE procedure.
$ make worklist
Which will generate a reStructuredText that describes the tags for which no action has been set in the CANDIDATE procedure.
These will need to be addressed before we can generate the final procedure.
$ VERSION="2025.06.0" make final
Finally, above will run all the earlier make targets (i.e. base, candidate, worklist) and then use the CANDIDATE procedure to build the distributable FINAL procedure Including a VERSION, as specified.
Procedure Release
Calling make final with a VERSION also inserts the version in the relevant Python and NPM package configuration. The actual package(s) release is done via GitHub actions. The steps are:
- Ensure that
maincontains the latest version you would like to release - Create and publish a release on GitHub, creating a new tag
- Versioning dated-semver and follows format
YYYY.0M.MINOR, whereYYYYis the year0Mis the month with zero padding and MINOR is the version bump within that month (starting at '0'). For instance2025.02.0.
- Versioning dated-semver and follows format
- GitHub actions to publish the new package(s) automatically starts when a release is published
- Once everything is published, the dependency needs to be updated downstream (e.g. in Grand-Challenge)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grand_challenge_dicom_de_id_procedure-2025.8.1.tar.gz.
File metadata
- Download URL: grand_challenge_dicom_de_id_procedure-2025.8.1.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97e6fcc1d815bb2adad5f1cfa78f0d88da0b55bb167c2d9bfcc917ae8bdc49de
|
|
| MD5 |
4721e4c8c9aacaad4840013bbe03e436
|
|
| BLAKE2b-256 |
772b2f9f5293395a6763b3b228c94a9822f282b6828451fb5c6762d958011f13
|
Provenance
The following attestation bundles were made for grand_challenge_dicom_de_id_procedure-2025.8.1.tar.gz:
Publisher:
release.yml on DIAGNijmegen/rse-grand-challenge-dicom-de-id-procedure
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grand_challenge_dicom_de_id_procedure-2025.8.1.tar.gz -
Subject digest:
97e6fcc1d815bb2adad5f1cfa78f0d88da0b55bb167c2d9bfcc917ae8bdc49de - Sigstore transparency entry: 418106371
- Sigstore integration time:
-
Permalink:
DIAGNijmegen/rse-grand-challenge-dicom-de-id-procedure@837519e36f423b8ba63c9f08d9932e00e6962fba -
Branch / Tag:
refs/tags/v2015.08.1 - Owner: https://github.com/DIAGNijmegen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@837519e36f423b8ba63c9f08d9932e00e6962fba -
Trigger Event:
release
-
Statement type:
File details
Details for the file grand_challenge_dicom_de_id_procedure-2025.8.1-py3-none-any.whl.
File metadata
- Download URL: grand_challenge_dicom_de_id_procedure-2025.8.1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
638355c14d188401a744ac8ec5a79937005a97d5e7bfbe253e33a09d9282efea
|
|
| MD5 |
611d72cd409179f892f41c617717b1df
|
|
| BLAKE2b-256 |
2a0780ee0da2da8297dbd3e1c2b69e88b99ff6dc214dabdd32e0e75c56e2ae1b
|
Provenance
The following attestation bundles were made for grand_challenge_dicom_de_id_procedure-2025.8.1-py3-none-any.whl:
Publisher:
release.yml on DIAGNijmegen/rse-grand-challenge-dicom-de-id-procedure
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grand_challenge_dicom_de_id_procedure-2025.8.1-py3-none-any.whl -
Subject digest:
638355c14d188401a744ac8ec5a79937005a97d5e7bfbe253e33a09d9282efea - Sigstore transparency entry: 418106423
- Sigstore integration time:
-
Permalink:
DIAGNijmegen/rse-grand-challenge-dicom-de-id-procedure@837519e36f423b8ba63c9f08d9932e00e6962fba -
Branch / Tag:
refs/tags/v2015.08.1 - Owner: https://github.com/DIAGNijmegen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@837519e36f423b8ba63c9f08d9932e00e6962fba -
Trigger Event:
release
-
Statement type: