Skip to main content

Enhanced DICOM Generator for creating sample DICOM studies

Project description

Enhanced DICOM Generator

This tool generates high-quality sample DICOM studies with realistic patient demographics, institution metadata, and consistent references for various modalities. It supports features to simulate clinical environments for testing and development purposes.

Updated Features

  • Improved Study Generation: Create multiple studies with interlinked series and instances.
  • Expanded Modality Support: Includes CT, MR, US, CR, and new modalities as needed.
  • Realistic Metadata: Utilize generated patient demographics, institution details, and physician information.
  • Modality-Specific Configurations: Tailor configurations for modality-specific needs.
  • UID Management: Consistent and reproducible DICOM UIDs across instances.

Requirements

  • Python 3.6+
  • DCMTK toolkit installed and available in PATH

Installation

System Requirements for DCMTK

Linux:

sudo apt-get install dcmtk

macOS:

brew install dcmtk

Windows: Download DCMTK from the official website and add it to your system PATH.

Install from PyPI

pip install dicom-maker

Install from Source

  1. Clone this repository:

    git clone https://github.com/yourusername/dicom-maker.git
    cd dicom-maker
    
  2. Install the package:

    pip install .
    

    Install in development mode:

    pip install -e .
    

Usage

Command Line Interface

Run the following command to generate DICOM studies:

dicom-maker --output-dir ./dicom-data --modality CT --body-part CHEST --num-studies 1 --num-series 3 --num-instances 5

Usage as a Python Module

You can import the package and use it as part of your Python code:

from make_dicom.dicom_maker import generate_dicom_data
from argparse import Namespace

# Define arguments
args = Namespace(
    output_dir="./dicom-data",
    modality="CT",
    body_part="CHEST",
    num_studies=1,
    num_series=3,
    num_instances=5
)

# Generate DICOM datasets
generate_dicom_data(args)

Accepted Parameters

Parameter Description Default
--output-dir Directory where generated DICOM files go ./dicom-data
--modality Modality for the DICOM files (e.g., CT, MR) CT
--body-part Body part being examined CHEST
--num-studies Number of studies to generate 1
--num-series Number of series per study 1
--num-instances Number of instances per series 1

Examples

Generate Multiple Studies

Generate 2 CT studies of the chest, each having 3 series and 10 instances:

dicom-maker --output-dir ./chest-ct-studies --modality CT --body-part CHEST --num-studies 2 --num-series 3 --num-instances 10

Generate a Brain MR Study

Generate a single MR study of the brain with 5 series (e.g., T1, T2, FLAIR, etc.):

dicom-maker --output-dir ./brain-mr-study --modality MR --body-part BRAIN --num-series 5

License

This project is released under the MIT License. See the LICENSE file for additional details.

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

dicom_maker-1.0.6.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dicom_maker-1.0.6-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file dicom_maker-1.0.6.tar.gz.

File metadata

  • Download URL: dicom_maker-1.0.6.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for dicom_maker-1.0.6.tar.gz
Algorithm Hash digest
SHA256 c483e78e95d16b6e2286eab6443ac5f1d73af3278fa85a8354e1055604cd7129
MD5 f7ceec9de3cc399c5a756238ec53afea
BLAKE2b-256 bb96c08ae1c6ea5aed34dc33ea39076e28da9f07cafc21faade905113f193c44

See more details on using hashes here.

File details

Details for the file dicom_maker-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: dicom_maker-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for dicom_maker-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 18d0c6cf22c6276d55da20bdf163bd74604ef10ef8f367ba93dbb46c01790e9a
MD5 876346863b41b745c2b4d6794a8590e1
BLAKE2b-256 923c3f8d7aee1b360d9985c53dfeb7b3b101d30deedcf345538ac2a02d3b86ac

See more details on using hashes here.

Supported by

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