Python library and app to extract images from DCM in private-eye format
Project description
Process DCM
About The Project
Python library and app to extract images from DCM files with metadata in private-eye format
Installation and Usage
pip install process-dcm
Usage: process-dcm [OPTIONS] INPUT_DIR
Process DICOM files in subfolders, extract images and metadata using parallel processing.
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * input_dir TEXT Input directory containing subfolders with DICOM files. [default: None] [required] │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --image_format -f TEXT Image format for extracted images (png, jpg, webp). Defaults to: png [default: png] │
│ --output_dir -o TEXT Output directory for extracted images and metadata. Defaults to: __input_dir__/exported_data │
│ Use absolute path if you want to save the output in a specific location. │
│ [default: exported_data] │
│ --n_jobs -j INTEGER Number of parallel jobs. Defaults to: 1 [default: 1] │
│ --overwrite -w Overwrite existing images if found. │
│ --verbose -v Verbose output. │
│ --version -V Prints app version │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help -h Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
For Developers
To run this project locally, you will need to install the prerequisites and follow the installation section.
Prerequisites
This Project depends on the poetry
.
-
Install poetry, via
homebrew
orpipx
:brew install poetry
or
pipx install poetry
-
Don't forget to use the python environment you set before and, if using
VScode
, apply it there. -
It's optional, but we strongly recommend
commitizen
, which follows Conventional Commits
Installation
-
Clone the repo
git clone https://github.com/Moorfields-Reading-Centre/process-dcm cd process-dcm
Bumping Version
We use commitizen
. The instructions below are only for exceptional cases.
-
Using poetry-bumpversion. Bump the version number by running
poetry version [part] [--dry-run]
where[part]
ismajor
,minor
, orpatch
, depending on which part of the version number you want to bump.Use
--dry-run
option to check it in advance. -
Push the tagged commit created above and the tag itself, i.e.:
ver_tag=$(poetry version | cut -d ' ' -f2) git tag -a v"$ver_tag" -m "Tagged version $ver_tag" git push git push --tags
Changelog
- 0.0.1
- First commit
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
File details
Details for the file process_dcm-0.0.2.tar.gz
.
File metadata
- Download URL: process_dcm-0.0.2.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20151df533bfcc40f93ab615b169ad40bb23931c9955c2f6c06b8cfc515af10f |
|
MD5 | f782571244a0f16fee9eb5b37e4b822d |
|
BLAKE2b-256 | a3041b6e56c2dd74f16ff648eee1363de0f121cc18222e4f04a151c337e25dc4 |
File details
Details for the file process_dcm-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: process_dcm-0.0.2-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5de68b76911659fadfd446e3c78baeb4c2a77d6b7bc33eda70db0e658c0f6f3 |
|
MD5 | b58a49c0c0f8c30bb88cd8ef3e8c2990 |
|
BLAKE2b-256 | 68919e46ed94267e36e05603a114fd23b4796555a1b909813786c91598862469 |