pynrrd
Pure python module for reading and writing NRRD files.
What it is and what it does
pynrrd is a pure-Python library that serializes numpy arrays to and from NRRD files, a format commonly used in medical imaging and scientific visualization. It depends only on numpy and typing_extensions, making it lightweight and portable. The library handles both reading NRRD headers and data into memory and writing numpy arrays back to disk with full header metadata preservation.
The package is stable and dormant: the last release was 568 days ago, but the repository remains active (last commit 2025-01-23) and carries no known security vulnerabilities. It supports Python 3.7 through 3.13 and is classified as a scientific engineering tool. Use it when you need to exchange volumetric or medical imaging data with tools that speak NRRD, or when your pipeline requires programmatic control over NRRD serialization.
Use it for:
- Load volumetric medical imaging data stored in NRRD format into numpy for analysis or processing.
- Export numpy arrays as NRRD files for interchange with medical imaging software or research pipelines.
- Preserve and read NRRD headers (metadata, encoding, axis information) alongside raw volumetric data.
- Integrate NRRD support into scientific computing workflows that already use numpy.
- Convert between NRRD and other formats via numpy as an intermediate representation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reads and writes NRRD (Nearly Raw Raster Data) files to and from numpy arrays in pure Python, enabling interchange of volumetric and medical imaging data.
Yes. pynrrd is a stable, low-friction library with no security issues and minimal dependencies. Install it if you work with NRRD files in scientific or medical imaging contexts. The dormant maintenance status is not a concern for a format-conversion tool; the last commit is recent and the repository is not archived. Suitable for production use in stable workflows.
Install
pynrrd on PyPI
pip
pip install pynrrduv
uv add pynrrdpoetry
poetry add pynrrdInstalling pynrrd
Before you install
Low friction: pure-Python wheel with only numpy and typing_extensions as runtime dependencies. Dormant maintenance (568 days since last release) but repository is not archived and last commit is recent; suitable for stable, read-write workflows where active development is not expected.
License in practice
MIT license (permissive): you may use, modify, and distribute pynrrd freely in commercial and private projects, provided you retain the copyright notice and license text.
Quickstart
pip install pynrrd
import pynrrd
import numpy
data = numpy.zeros((5, 4, 3, 2))
pynrrd.write('testdata.nrrd', data)
readdata, header = pynrrd.read('testdata.nrrd')
Requires Python 3.7 or above; v1.0+ does not support older versions.
Verify before relying
- Performance characteristics and memory efficiency for large volumetric datasets.
- Completeness of NRRD format specification coverage (which NRRD versions and encodings are fully supported).
- Compatibility with non-standard or vendor-specific NRRD variants.
Package facts
| License | Copyright (c) 2012 Maarten H. Everts and contributors. See AUTHORS for more details. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — numpy, typing_extensions |
| Maintenance | dormant — 568 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 142,619/month — #11,204 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pynrrd-1.1.3-py3-none-any.whl
Keywords: nrrd, teem, image, processing, file, format
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
nibabelNiBabel reads and writes neuroimaging file…
permissive · top 5,000 on PyPI
trx-pythonReads, writes, and manipulates TRX tractography…
permissive · top 15,000 on PyPI
ImageIOImageIO reads and writes images and video in…
permissive · top 1,000 on PyPI
pydicomPydicom reads, modifies, and writes DICOM…
permissive · top 5,000 on PyPI
dicom2niftiConverts DICOM medical imaging files to NIfTI…
permissive · top 15,000 on PyPI
rasterioRasterio reads and writes geospatial raster…
permissive · top 5,000 on PyPI
pylibjpegDecodes and encodes JPEG, JPEG-LS, JPEG 2000,…
permissive · top 15,000 on PyPI
highdicomHighdicom provides a high-level Python API for…
permissive · top 15,000 on PyPI
pure-pcapy3Pure-Python implementation of the pcapy API for…
permissive · top 15,000 on PyPI
fabioFabIO reads and writes 2D X-ray detector images…
permissive · top 15,000 on PyPI