Skip to main content

Pure python module for reading and writing NRRD files.

Project description

Build Status DOI Python version PyPi version Documentation Status https://codecov.io/gh/mhe/pynrrd/branch/master/graph/badge.svg

pynrrd

pynrrd is a pure-Python module for reading and writing NRRD files into and from numpy arrays.

Dependencies

The module’s only dependency is numpy.

Installation

Install via pip and GitHub

pip install git+https://github.com/mhe/pynrrd.git

Example usage

import numpy as np
import nrrd

# Some sample numpy data
data = np.zeros((5,4,3,2))
filename = 'testdata.nrrd'

# Write to a NRRD file
nrrd.write(filename, data)

# Read the data back from file
readdata, header = nrrd.read(filename)
print(readdata.shape)
print(header)

Next Steps

For more information, see the documentation.

License

See the LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynrrd-0.4.3.tar.gz (17.6 kB view hashes)

Uploaded Source

Built Distribution

pynrrd-0.4.3-py2.py3-none-any.whl (18.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page