voxcell


Namevoxcell JSON
Version 3.1.7 PyPI version JSON
download
home_pagehttps://github.com/BlueBrain/voxcell
SummaryVoxcell is a small library to handle probability distributions that have a spatial component and to use them to build collection of cells in space.
upload_time2024-03-25 13:31:28
maintainerNone
docs_urlNone
authorBlue Brain Project, EPFL
requires_python>=3.8
licenseApache-2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Overview
========

This is a library to build circuits and atlases. It contains tools to handle

* "traits fields" and collections and the logic to assign them.
* volumetric data within NRRD files
* Cell collection access / writer.
* to build, transform and handle fields of vectors and orientations.
* querying `Region hierarchy tree`, such as the one available from the `Allen Institute for Brain Science (AIBS)`_: `Mouse Brain Atlas Ontology's StructureGraph`_ (aka 1.json).

Installation
============

Install from PyPI:

.. code-block:: bash

    pip install voxcell

Or an editable install:

.. code-block:: bash

    git clone https://github.com/BlueBrain/voxcell
    cd voxcell
    pip install -e .

Examples
========

To use the following examples, one must download an NRRD file and the Ontology Structure:

.. code-block:: bash

    curl -o brain_regions.nrrd http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/ccf_2017/annotation_100.nrrd
    curl -o hierarchy.json http://api.brain-map.org/api/v2/structure_graph_download/1.json

One can open NRRD files, and perform operations on them:

.. code-block:: python

    import voxcell
    voxels = voxcell.VoxelData.load_nrrd('brain_regions.nrrd')
    print(voxels.voxel_dimensions)  # prints array([100., 100., 100.], dtype=float32)

One can also use the `Atlas` object to load at both the atlas and the hierarchy:

.. code-block:: python

    import numpy as np
    from voxcell.nexus.voxelbrain import Atlas
    atlas = Atlas.open('.')
    brain_regions = atlas.load_data('brain_regions')
    rm = atlas.load_region_map()
    # count the number of voxels in the VIS region, and all its descendents
    ids = rm.find('VIS', 'acronym', with_descendants=True)
    np.count_nonzero(np.isin(brain_regions.raw, list(ids)))

Citation
========

When you use this software, we kindly ask you to cite the following DOI:

.. image:: https://zenodo.org/badge/451807050.svg
   :target: https://zenodo.org/badge/latestdoi/451807050
   

Acknowledgements
================

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

For license and authors, see LICENSE.txt and AUTHORS.txt respectively.

Copyright (c) 2022-2024 Blue Brain Project/EPFL

.. _`Allen Institute for Brain Science (AIBS)`: https://alleninstitute.org/what-we-do/brain-science/
.. _`Mouse Brain Atlas Ontology's StructureGraph`: http://api.brain-map.org/api/v2/structure_graph_download/1.json
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BlueBrain/voxcell",
    "name": "voxcell",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Blue Brain Project, EPFL",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/eb/21/632cafa10830b230e54b282e88ece912dbdb8a76746286091bd79ba87183/voxcell-3.1.7.tar.gz",
    "platform": null,
    "description": "Overview\n========\n\nThis is a library to build circuits and atlases. It contains tools to handle\n\n* \"traits fields\" and collections and the logic to assign them.\n* volumetric data within NRRD files\n* Cell collection access / writer.\n* to build, transform and handle fields of vectors and orientations.\n* querying `Region hierarchy tree`, such as the one available from the `Allen Institute for Brain Science (AIBS)`_: `Mouse Brain Atlas Ontology's StructureGraph`_ (aka 1.json).\n\nInstallation\n============\n\nInstall from PyPI:\n\n.. code-block:: bash\n\n    pip install voxcell\n\nOr an editable install:\n\n.. code-block:: bash\n\n    git clone https://github.com/BlueBrain/voxcell\n    cd voxcell\n    pip install -e .\n\nExamples\n========\n\nTo use the following examples, one must download an NRRD file and the Ontology Structure:\n\n.. code-block:: bash\n\n    curl -o brain_regions.nrrd http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/ccf_2017/annotation_100.nrrd\n    curl -o hierarchy.json http://api.brain-map.org/api/v2/structure_graph_download/1.json\n\nOne can open NRRD files, and perform operations on them:\n\n.. code-block:: python\n\n    import voxcell\n    voxels = voxcell.VoxelData.load_nrrd('brain_regions.nrrd')\n    print(voxels.voxel_dimensions)  # prints array([100., 100., 100.], dtype=float32)\n\nOne can also use the `Atlas` object to load at both the atlas and the hierarchy:\n\n.. code-block:: python\n\n    import numpy as np\n    from voxcell.nexus.voxelbrain import Atlas\n    atlas = Atlas.open('.')\n    brain_regions = atlas.load_data('brain_regions')\n    rm = atlas.load_region_map()\n    # count the number of voxels in the VIS region, and all its descendents\n    ids = rm.find('VIS', 'acronym', with_descendants=True)\n    np.count_nonzero(np.isin(brain_regions.raw, list(ids)))\n\nCitation\n========\n\nWhen you use this software, we kindly ask you to cite the following DOI:\n\n.. image:: https://zenodo.org/badge/451807050.svg\n   :target: https://zenodo.org/badge/latestdoi/451807050\n   \n\nAcknowledgements\n================\n\nThe development of this software was supported by funding to the Blue Brain Project, a research center of the \u00c9cole polytechnique f\u00e9d\u00e9rale de Lausanne (EPFL), from the Swiss government\u2019s ETH Board of the Swiss Federal Institutes of Technology.\n\nFor license and authors, see LICENSE.txt and AUTHORS.txt respectively.\n\nCopyright (c) 2022-2024 Blue Brain Project/EPFL\n\n.. _`Allen Institute for Brain Science (AIBS)`: https://alleninstitute.org/what-we-do/brain-science/\n.. _`Mouse Brain Atlas Ontology's StructureGraph`: http://api.brain-map.org/api/v2/structure_graph_download/1.json",
    "bugtrack_url": null,
    "license": "Apache-2",
    "summary": "Voxcell is a small library to handle probability distributions that have a spatial component and to use them to build collection of cells in space.",
    "version": "3.1.7",
    "project_urls": {
        "Download": "https://github.com/BlueBrain/voxcell",
        "Homepage": "https://github.com/BlueBrain/voxcell"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eb21632cafa10830b230e54b282e88ece912dbdb8a76746286091bd79ba87183",
                "md5": "9c46981822d52cc2aad767b65df042ad",
                "sha256": "7a8f4c58857f1c6e37cac00dd688d57f97e8ddb87c8c271718d0f49a08775434"
            },
            "downloads": -1,
            "filename": "voxcell-3.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "9c46981822d52cc2aad767b65df042ad",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 224364,
            "upload_time": "2024-03-25T13:31:28",
            "upload_time_iso_8601": "2024-03-25T13:31:28.429574Z",
            "url": "https://files.pythonhosted.org/packages/eb/21/632cafa10830b230e54b282e88ece912dbdb8a76746286091bd79ba87183/voxcell-3.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-25 13:31:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BlueBrain",
    "github_project": "voxcell",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "voxcell"
}
        
Elapsed time: 0.25781s