skillfed

dicom2nifti

package for converting dicom files to nifti

dicom2nifti v2.6.2 237.8K downloads/30d#8,953 on PyPI403
Permissive license MIT AGING released

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 dicom2nifti

uv

uv add dicom2nifti

poetry

poetry add dicom2nifti

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: Healthcare IndustryIntended Audience :: Science/ResearchOperating System :: MacOS :: MacOS XOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Scientific/Engineering :: Medical Science Apps.

Tags

dicom to nifti conversionmedical imaging format conversionct mr scan conversionnifti file generationdicom file processingneuroimaging data conversionfmri dti conversion
medical-imagingdicom-niftineuroimaging

More Medical Science Apps. packages