Skip to main content

Python library and app to extract images from DCM in private-eye format

Project description

Process DCM

Maintenance GitHub GitHub release (latest by date) GitHub Release Poetry Ruff pre-commit

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.

  1. Install poetry, via homebrew or pipx:

    brew install poetry
    

    or

    pipx install poetry
    
  2. Don't forget to use the python environment you set before and, if using VScode, apply it there.

  3. It's optional, but we strongly recommend commitizen, which follows Conventional Commits

Installation

  1. Clone the repo

    git clone https://github.com/pontikos-lab/process-dcm
    cd process-dcm
    

Bumping Version

We use commitizen. The instructions below are only for exceptional cases.

  1. Using poetry-bumpversion. Bump the version number by running poetry version [part] [--dry-run] where [part] is major, minor, or patch, depending on which part of the version number you want to bump.

    Use --dry-run option to check it in advance.

  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

process_dcm-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

process_dcm-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file process_dcm-0.1.0.tar.gz.

File metadata

  • Download URL: process_dcm-0.1.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1024-azure

File hashes

Hashes for process_dcm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d029f462d5b9c9e75ad5b24356b4f958ef91f879a1ba4c032d3d72c12ad8f9a
MD5 426c70b3059460a1d79c426b09d10c95
BLAKE2b-256 88f7ea556266e14fb0bc38b0d12c92d859f288ce22b87c83d4b01ce96ac9eb65

See more details on using hashes here.

File details

Details for the file process_dcm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: process_dcm-0.1.0-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.11.9 Linux/6.5.0-1024-azure

File hashes

Hashes for process_dcm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a39c802ab75e8303fa3caa57cae14e1673c67a5da4b6fa6c5d57112f09679b6c
MD5 0bdf515a3ae12b6df803d4b88e20fc8d
BLAKE2b-256 39d65972cf1ba115bd98d7ef091e319df7f395813594e628c37049eb519130af

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