Skip to main content

Reusable toolset for deidentifiying images and metadata contained inside DICOM files

Project description

PyPI - Python Version

deidcm module

Functionality for cancer screening data pipeline including DICOM image importing and processing.

Initially conceived for french breast cancer screening program during the execution of deep.piste study

Documentation

deidcm documentation can be found at: https://epiconcept-paris.github.io/deidcm/

Installation

pip install deidcm

Installation for contributors

  1. Download source code
git clone https://github.com/Epiconcept-Paris/deidcm.git
cd deidcm
  1. Create and activate a virtual environment
python3 -m venv env
. env/bin/activate
  1. Install deidcm
pip install -e .

How to contribute

Please send a PR for small bugs/improvements. For bigger ones, open an issue first.

Checking installation

Open a python interpreter and try to deidentify a dicom file:

from deidcm_deid.dicom.deid_mammogram import deidentify_image_png

deidentify_image_png(
    "/path/to/mammogram.dcm",
    "/path/to/processed/output-folder",
    "output-filename"
)

Tools for developers

Installation

pip install -e .[quality-tools]

Usage

Format your files with python3 -m autopep8 --in-place file/to/format

Lint your files with python3 -m pylint file/to/lint

Run Tests

Run all tests

pytest

Run a specific test file

pytest test/test_df2dicom.py

Run all except OCR tests

pytest --ignore=test/test_ocr_deidentification.py --ignore=test/test_df2dicom

Show full error message

pytest test/test_df2dicom.py --showlocals

Calculate Tests Coverage

pytest --cov --cov-report=term

Documentation

Run development server

mkdocs serve

Deploy documentation to GitHub Pages

mkdocs gh-deploy

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

deidcm-0.0.3.tar.gz (41.4 kB view details)

Uploaded Source

Built Distribution

deidcm-0.0.3-py3-none-any.whl (39.3 kB view details)

Uploaded Python 3

File details

Details for the file deidcm-0.0.3.tar.gz.

File metadata

  • Download URL: deidcm-0.0.3.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for deidcm-0.0.3.tar.gz
Algorithm Hash digest
SHA256 db8ffa70d730fb4e4548e9eaabc16f024cfe84424bb3061734d648500d0fe6ca
MD5 f2764eb7850ae8cc0def8f045f821b44
BLAKE2b-256 9257a685d818ec2745d87d2f9a5ca5848c98020532cbcadcda7e31d52941f408

See more details on using hashes here.

File details

Details for the file deidcm-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: deidcm-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 39.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for deidcm-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f65fab9ed76a2c4f122e6916d16888aa9fd1d752f18ea6d4744bd49808e01020
MD5 afa38f2244395e4d4987b9b9449e56b9
BLAKE2b-256 5910a7bc2867536b414b2284d1958c097aba901feaeb6a073742815b96168281

See more details on using hashes here.

Supported by

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