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.

Requirements

  • numpy

  • nptyping

  • typing_extensions

v1.0+ requires Python 3.7 or above. If you have an older Python version, please install a v0.x release instead.

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-1.0.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynrrd-1.0.0-py2.py3-none-any.whl (19.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pynrrd-1.0.0.tar.gz.

File metadata

  • Download URL: pynrrd-1.0.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for pynrrd-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4eb4caba03fbca1b832114515e748336cb67bce70c7f3ae36bfa2e135fc990d2
MD5 b3904b661c69c40094231c5989a3cb49
BLAKE2b-256 dd4143d98c7866ab0f57ee0ea71643b4c51efbe3af299340391693650fdc246f

See more details on using hashes here.

File details

Details for the file pynrrd-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pynrrd-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for pynrrd-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 65e5a61920d2f01ecf321eb41b0472940e181e4ba5e8a32f01ef5499d4192db5
MD5 b60271255b418e209d55dec2bfb31baf
BLAKE2b-256 ee431be50fe04e6a5df8cfdafa62151035a9358a768e26a5b9f33fc417e10bc6

See more details on using hashes here.

Supported by

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