dicom2nifti
package for converting dicom files to nifti
What it is and what it does
dicom2nifti is a Python library that converts DICOM medical imaging files into NIfTI format, the standard for neuroimaging research. It handles anatomical CT and MR scans from multiple vendors (GE, Siemens, Philips, Hitachi) and includes vendor-specific support for 4D imaging like fMRI and DTI/DKI sequences. The library provides both a command-line interface and a Python API, with options to reorient images, resample to orthogonal geometry, and handle edge cases like gantry-tilted CT or inconsistent slice increments.
The package depends on nibabel for NIfTI I/O, numpy and scipy for array operations and interpolation, and pydicom plus python-gdcm for DICOM parsing and decompression. It is marked Production/Stable and targets healthcare and research audiences. Most classical anatomical DICOM files are supported; non-anatomical sequences may require explicit configuration, and some vendor-specific formats or transfer syntaxes remain unsupported.
Use it for:
- Convert a batch of DICOM scans from a hospital PACS into NIfTI for neuroimaging analysis pipelines.
- Prepare fMRI or DTI data from Siemens or GE scanners for preprocessing workflows.
- Handle gantry-tilted CT scans by resampling to orthogonal space while preserving geometry via affine transformation.
- Process Philips Enhanced DICOM files with vendor-specific metadata preservation for research studies.
- Automate single-series DICOM-to-NIfTI conversion in a clinical data workflow with command-line scripting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts DICOM medical imaging files to NIfTI format, supporting anatomical CT/MR scans and vendor-specific 4D imaging (fMRI, DTI) with optional resampling and reorientation.
Yes. The package is stable, permissive-licensed, and widely used. Install friction is low and dependencies are mature. The 417-day gap since last release is notable but not alarming given the narrow, well-defined scope; the repository is not archived and remains responsive. Choose it if you need robust DICOM-to-NIfTI conversion for medical imaging; be aware that some vendor formats and transfer syntaxes require workarounds or remain unsupported.
Install
dicom2nifti on PyPI
pip
pip install dicom2niftiuv
uv add dicom2niftipoetry
poetry add dicom2niftiInstalling dicom2nifti
Before you install
Low install friction with a pure-Python wheel; five runtime dependencies including nibabel, numpy, scipy, and pydicom are all stable and widely used. Last release was 417 days ago and the repository remains active, though maintenance pace has slowed.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions.
Quickstart
pip install dicom2nifti
import dicom2nifti
dicom2nifti.convert_directory(dicom_directory, output_folder, compression=True, reorient=True)
Compressed DICOM formats (JPEG, JPEG2000) require GDCM to be installed separately via your system package manager or conda.
Verify before relying
- Whether the package handles all Philips Enhanced DICOM variants reliably in production workflows.
- Current state of support for Hitachi MR DTI/DKI data—documentation notes it is not supported but invites contributions.
- Actual download volume and user base size to assess real-world adoption beyond ranking position.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — nibabel, numpy, scipy, pydicom, python-gdcm |
| Maintenance | aging — 417 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 237,818/month — #8,953 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dicom2nifti-2.6.2-py3-none-any.whl
Keywords: dicom, nifti, medical imaging
Tags
More Medical Science Apps. packages
Client library for the Firecrawl API that…
permissive · top 5,000 on PyPI
pydicomPydicom reads, modifies, and writes DICOM…
permissive · top 5,000 on PyPI
PubChemPyPubChemPy is a Python wrapper around the…
permissive · top 5,000 on PyPI
vtkVTK is a 3D graphics, image processing, and…
permissive · top 5,000 on PyPI
pyhmmerPyHMMER provides Python bindings to HMMER3, a…
permissive · top 5,000 on PyPI
firecrawlA Python SDK for web scraping, crawling,…
permissive · top 5,000 on PyPI
python-gdcmPython wrapper for GDCM (Grassroots DICOM), a…
permissive · top 15,000 on PyPI
highdicomHighdicom provides a high-level Python API for…
permissive · top 15,000 on PyPI
pylibjpegDecodes and encodes JPEG, JPEG-LS, JPEG 2000,…
permissive · top 15,000 on PyPI
dicomweb-clientA Python client library for interacting with…
permissive · top 15,000 on PyPI
TotalSegmentatorAutomated segmentation of anatomical structures…
permissive · top 15,000 on PyPI
nibabelNiBabel reads and writes neuroimaging file…
permissive · top 5,000 on PyPI
monaiMONAI is a PyTorch-based framework for building…
permissive · top 15,000 on PyPI
itk-ioitk-io provides Python bindings for reading and…
permissive · top 15,000 on PyPI
pynrrdReads and writes NRRD (Nearly Raw Raster Data)…
permissive · top 15,000 on PyPI