Metadata-Version: 2.1
Name: deidcm
Version: 0.0.3
Summary: Reusable toolset for deidentifiying images and metadata contained inside DICOM files
Home-page: https://github.com/Epiconcept-Paris/deidcm
Author: ['Francisco Orchard', 'William Madié']
Author-email: ['f.orchard@epiconcept.fr', 'w.madie@epiconcept.fr']
License: MIT License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: easyocr
Requires-Dist: opencv-python
Requires-Dist: opencv-python-headless
Requires-Dist: Numpy >=1.21.6
Requires-Dist: matplotlib
Requires-Dist: pandas
Requires-Dist: pillow
Requires-Dist: pydicom
Provides-Extra: mkdocs
Requires-Dist: mkdocs ; extra == 'mkdocs'
Requires-Dist: mkdocs-material ; extra == 'mkdocs'
Requires-Dist: mkdocs-material-extensions ; extra == 'mkdocs'
Requires-Dist: mkdocstrings-python ; extra == 'mkdocs'
Requires-Dist: pymdown-extensions ; extra == 'mkdocs'
Requires-Dist: mkdocs-pymdownx-material-extras ; extra == 'mkdocs'
Provides-Extra: quality-tools
Requires-Dist: pylint ; extra == 'quality-tools'
Requires-Dist: autopep8 ; extra == 'quality-tools'
Requires-Dist: pytest ; extra == 'quality-tools'
Requires-Dist: coverage ; extra == 'quality-tools'
Requires-Dist: pytest-cov ; extra == 'quality-tools'

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/deidcm)

## 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/](https://epiconcept-paris.github.io/deidcm/)

### Installation

```bash
pip install deidcm
```

### Installation for contributors

1. Download source code

```bash
git clone https://github.com/Epiconcept-Paris/deidcm.git
cd deidcm
```

2. Create and activate a virtual environment

```bash
python3 -m venv env
. env/bin/activate
```

3. Install deidcm

```bash
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:
```python
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

```bash
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
```py
pytest
```

Run a specific test file
```py
pytest test/test_df2dicom.py
```

Run all except OCR tests
```py
pytest --ignore=test/test_ocr_deidentification.py --ignore=test/test_df2dicom
```

Show full error message
```py
pytest test/test_df2dicom.py --showlocals
```

### Calculate Tests Coverage

```py
pytest --cov --cov-report=term
```

### Documentation

Run development server
```py
mkdocs serve
```

Deploy documentation to GitHub Pages
```py
mkdocs gh-deploy
```
