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

  • 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.1.3.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

pynrrd-1.1.3-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynrrd-1.1.3.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pynrrd-1.1.3.tar.gz
Algorithm Hash digest
SHA256 a331263bc9f05c3168182e61d6098e256a34e0fadbb7427a1d086d8942fbcbe0
MD5 c17d58c2f2bf3f66b35897a5613165bd
BLAKE2b-256 d7885cf97e319ca11a2983938e6e486011166a4e580678cfe575d980146c74af

See more details on using hashes here.

File details

Details for the file pynrrd-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: pynrrd-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pynrrd-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 21f7e370045e7ef8a86841965b2ff3a18937efbb4e2078e346168463f8f34b7e
MD5 fd959f6faf8b360e137eda0faef56768
BLAKE2b-256 218434fa17e364f8332021d4b0f75beecd4b95a76a41449e96ed0ddac5a767e0

See more details on using hashes here.

Supported by

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