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
-
Clone this repository:
git clone https://github.com/yourusername/dicom-maker.git cd dicom-maker
-
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.
Metadata
Release files for dicom-maker 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dicom_maker-1.0.6.tar.gz | 20.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dicom_maker-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.6 kB
Release files / dicom_maker-1.0.6.tar.gz
| Download URL | dicom_maker-1.0.6.tar.gz |
|---|---|
| Size | 20.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c483e78e95d16b6e2286eab6443ac5f1d73af3278fa85a8354e1055604cd7129
|
|
BLAKE2b-256 checksum How to use checksums |
bb96c08ae1c6ea5aed34dc33ea39076e28da9f07cafc21faade905113f193c44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.8
|
Release files / dicom_maker-1.0.6-py3-none-any.whl
| Download URL | dicom_maker-1.0.6-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18d0c6cf22c6276d55da20bdf163bd74604ef10ef8f367ba93dbb46c01790e9a
|
|
BLAKE2b-256 checksum How to use checksums |
923c3f8d7aee1b360d9985c53dfeb7b3b101d30deedcf345538ac2a02d3b86ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.8
|
Security for dicom-maker 1.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.