Skip to content
darksim33Public

About

Lossless DICOM ⇄ NIfTI round trips for MRI series

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

143 Commits

Folders and files

Repository files navigation

DCMtether logo

DCMtether

Lossless DICOM ⇄ NIfTI round trips for MRI series, as a basis for derivatives (segmentations, ADC/QSM maps) that are written back as properly referenced DICOM (SEG, Parametric Map, or derived MR images for any PACS).

Research use only — not for clinical or diagnostic use. A converted dataset identifies patients (file names are built from PatientName and StudyDate): never share it as is.

uv sync
uv run dcmtether run /path/to/dicom -o /path/to/dataset  # scan + convert (rerunnable; default output: the DICOM folder)
uv run dcmtether to-dcm DATASET/sub-…/….nii.gz rebuilt/  # back to identical DICOM
uv run dcmtether to-seg NIFTI labels.nii.gz seg-template.json seg.dcm

The same from Python (API):

import dcmtether as dt

result = dt.run("/path/to/dicom", "/path/to/dataset")
print(result.converted, result.failed)  # manifest ids
dt.to_dcm("dataset/sub-…/….nii.gz", "rebuilt/")

Development

uv run ruff format --check . && uv run ruff check . && uv run pytest

The first test run downloads public test data and the DICOM standard into .cache/. Test data coverage: docs/dev/test-data.md.

License

dcmtether: lossless DICOM ⇄ NIfTI round trips for MRI series. Copyright (C) 2026 Thomas Thiel

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details: LICENSE.

About

Lossless DICOM ⇄ NIfTI round trips for MRI series

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages