pynrrd


Namepynrrd JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/mhe/pynrrd
SummaryPure python module for reading and writing NRRD files.
upload_time2022-10-09 12:08:10
maintainer
docs_urlNone
authorMaarten Everts
requires_python>=3.7
licenseMIT License
keywords nrrd teem image processing file format
VCS
bugtrack_url
requirements numpy nptyping typing_extensions
Travis-CI No Travis.
coveralls test coverage
            
.. image:: https://travis-ci.org/mhe/pynrrd.svg?branch=master
    :target: https://travis-ci.org/mhe/pynrrd
    :alt: Build Status

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592532.svg
   :target: https://doi.org/10.5281/zenodo.592532
   :alt: DOI

.. image:: https://img.shields.io/pypi/pyversions/pynrrd.svg
    :target: https://img.shields.io/pypi/pyversions/pynrrd.svg
    :alt: Python version

.. image:: https://badge.fury.io/py/pynrrd.svg
    :target: https://badge.fury.io/py/pynrrd
    :alt: PyPi version

.. image:: https://readthedocs.org/projects/pynrrd/badge/?version=stable
    :target: https://pynrrd.readthedocs.io/en/stable/?badge=stable
    :alt: Documentation Status

.. image:: https://codecov.io/gh/mhe/pynrrd/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/mhe/pynrrd

|

pynrrd
======
pynrrd is a pure-Python module for reading and writing `NRRD <http://teem.sourceforge.net/nrrd/>`_ files into and
from numpy arrays.

Requirements
------------

* `numpy <https://numpy.org/>`_
* 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 PyPi repository (recommended)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: bash

    pip install pynrrd

Install via pip and GitHub
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: bash

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

Install from source (recommended for contributing to pynrrd)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For developers that want to contribute to pynrrd, you can clone the pynrrd repository and install it using the following commands:

.. code-block:: bash

    git clone https://github.com/mhe/pynrrd.git
    cd pynrrd
    pip install .

or, for the last line, instead use:

.. code-block:: bash

    pip install -e .

to install in 'develop' or 'editable' mode, where changes can be made to the local working code and Python will use
the updated pynrrd code.

**Tests**

The tests can be run via the following command from the base directory:

.. code-block:: bash

    python -m unittest discover -v nrrd/tests

**Format and Lint code**

 This repository uses pre-commit hooks to run format and lint the code and they are enforced in CI. See [pre-commit](https://pre-commit.com)

Example usage
-------------
.. code-block:: python

    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 <http://pynrrd.readthedocs.io/>`_.

License
-------
See the `LICENSE <https://github.com/mhe/pynrrd/blob/master/LICENSE>`_ for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mhe/pynrrd",
    "name": "pynrrd",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "nrrd teem image processing file format",
    "author": "Maarten Everts",
    "author_email": "me@nn8.nl",
    "download_url": "https://files.pythonhosted.org/packages/dd/41/43d98c7866ab0f57ee0ea71643b4c51efbe3af299340391693650fdc246f/pynrrd-1.0.0.tar.gz",
    "platform": null,
    "description": "\n.. image:: https://travis-ci.org/mhe/pynrrd.svg?branch=master\n    :target: https://travis-ci.org/mhe/pynrrd\n    :alt: Build Status\n\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592532.svg\n   :target: https://doi.org/10.5281/zenodo.592532\n   :alt: DOI\n\n.. image:: https://img.shields.io/pypi/pyversions/pynrrd.svg\n    :target: https://img.shields.io/pypi/pyversions/pynrrd.svg\n    :alt: Python version\n\n.. image:: https://badge.fury.io/py/pynrrd.svg\n    :target: https://badge.fury.io/py/pynrrd\n    :alt: PyPi version\n\n.. image:: https://readthedocs.org/projects/pynrrd/badge/?version=stable\n    :target: https://pynrrd.readthedocs.io/en/stable/?badge=stable\n    :alt: Documentation Status\n\n.. image:: https://codecov.io/gh/mhe/pynrrd/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/mhe/pynrrd\n\n|\n\npynrrd\n======\npynrrd is a pure-Python module for reading and writing `NRRD <http://teem.sourceforge.net/nrrd/>`_ files into and\nfrom numpy arrays.\n\nRequirements\n------------\n\n* `numpy <https://numpy.org/>`_\n* nptyping\n* typing_extensions\n\nv1.0+ requires Python 3.7 or above. If you have an older Python version, please install a v0.x release instead.\n\nInstallation\n------------\n\nInstall via pip and PyPi repository (recommended)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n.. code-block:: bash\n\n    pip install pynrrd\n\nInstall via pip and GitHub\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n.. code-block:: bash\n\n    pip install git+https://github.com/mhe/pynrrd.git\n\nInstall from source (recommended for contributing to pynrrd)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nFor developers that want to contribute to pynrrd, you can clone the pynrrd repository and install it using the following commands:\n\n.. code-block:: bash\n\n    git clone https://github.com/mhe/pynrrd.git\n    cd pynrrd\n    pip install .\n\nor, for the last line, instead use:\n\n.. code-block:: bash\n\n    pip install -e .\n\nto install in 'develop' or 'editable' mode, where changes can be made to the local working code and Python will use\nthe updated pynrrd code.\n\n**Tests**\n\nThe tests can be run via the following command from the base directory:\n\n.. code-block:: bash\n\n    python -m unittest discover -v nrrd/tests\n\n**Format and Lint code**\n\n This repository uses pre-commit hooks to run format and lint the code and they are enforced in CI. See [pre-commit](https://pre-commit.com)\n\nExample usage\n-------------\n.. code-block:: python\n\n    import numpy as np\n    import nrrd\n\n    # Some sample numpy data\n    data = np.zeros((5,4,3,2))\n    filename = 'testdata.nrrd'\n\n    # Write to a NRRD file\n    nrrd.write(filename, data)\n\n    # Read the data back from file\n    readdata, header = nrrd.read(filename)\n    print(readdata.shape)\n    print(header)\n\n\nNext Steps\n----------\nFor more information, see the `documentation <http://pynrrd.readthedocs.io/>`_.\n\nLicense\n-------\nSee the `LICENSE <https://github.com/mhe/pynrrd/blob/master/LICENSE>`_ for more information.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Pure python module for reading and writing NRRD files.",
    "version": "1.0.0",
    "split_keywords": [
        "nrrd",
        "teem",
        "image",
        "processing",
        "file",
        "format"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "b60271255b418e209d55dec2bfb31baf",
                "sha256": "65e5a61920d2f01ecf321eb41b0472940e181e4ba5e8a32f01ef5499d4192db5"
            },
            "downloads": -1,
            "filename": "pynrrd-1.0.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b60271255b418e209d55dec2bfb31baf",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 19887,
            "upload_time": "2022-10-09T12:08:08",
            "upload_time_iso_8601": "2022-10-09T12:08:08.889926Z",
            "url": "https://files.pythonhosted.org/packages/ee/43/1be50fe04e6a5df8cfdafa62151035a9358a768e26a5b9f33fc417e10bc6/pynrrd-1.0.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "b3904b661c69c40094231c5989a3cb49",
                "sha256": "4eb4caba03fbca1b832114515e748336cb67bce70c7f3ae36bfa2e135fc990d2"
            },
            "downloads": -1,
            "filename": "pynrrd-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b3904b661c69c40094231c5989a3cb49",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 18079,
            "upload_time": "2022-10-09T12:08:10",
            "upload_time_iso_8601": "2022-10-09T12:08:10.324906Z",
            "url": "https://files.pythonhosted.org/packages/dd/41/43d98c7866ab0f57ee0ea71643b4c51efbe3af299340391693650fdc246f/pynrrd-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-10-09 12:08:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "mhe",
    "github_project": "pynrrd",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.11.1"
                ]
            ]
        },
        {
            "name": "nptyping",
            "specs": []
        },
        {
            "name": "typing_extensions",
            "specs": []
        }
    ],
    "lcname": "pynrrd"
}
        
Elapsed time: 0.01442s