Epiconcept-Paris / kskit

python reusable tools for breast cancer imaging processing based on deep.piste project

Home Page:https://epiconcept-paris.github.io/kskit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kskit 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

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

Installation

pip install kskit

Installation for contributors

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

Checking installation

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

from kskit.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

  1. Produce the .coverage file
coverage run --omit="*/test*" -m pytest
  1. Visualize the coverage report in the terminal
coverage report -i
  1. Produce an HTML report with test coverage

(The report will be available in htmlcov/index.html )

coverage html -i

Documentation

Run development server

mkdocs serve

Deploy documentation to GitHub Pages

mkdocs gh-deploy

About

python reusable tools for breast cancer imaging processing based on deep.piste project

https://epiconcept-paris.github.io/kskit/

License:MIT License


Languages

Language:Python 98.7%Language:Shell 0.7%Language:Makefile 0.6%