medimages4tests


Namemedimages4tests JSON
Version 0.3.3 PyPI version JSON
download
home_pagehttps://github.com/australian-imaging-service/medimages4tests
SummaryGenerates dummy medical image data with realistic headers to be used in image handling tests
upload_time2023-11-14 04:02:40
maintainer
docs_urlNone
authorThomas G. Close
requires_python
licenseCC0
keywords repository analysis medical-imaging neuroimaging workflows pipelines
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            Medimages4tests
===============

.. image:: https://github.com/australian-imaging-service/medimages4tests/actions/workflows/test.yml/badge.svg
   :target: https://github.com/australian-imaging-service/medimages4tests/actions/workflows/test.yml
.. image:: https://codecov.io/gh/australian-imaging-service/medimages4tests/branch/main/graph/badge.svg?token=UIS0OGPST7
   :target: https://codecov.io/gh/australian-imaging-service/medimages4tests
.. image:: https://img.shields.io/pypi/pyversions/medimages4tests.svg
   :target: https://pypi.python.org/pypi/medimages4tests/
   :alt: Supported Python versions
.. image:: https://img.shields.io/pypi/v/medimages4tests.svg
   :target: https://pypi.python.org/pypi/medimages4tests/
   :alt: Latest Version

Generates dummy medical images, with junk image data but realistic headers,
to test imaging handling pipelines

Installation
------------

Medimage4tests is available on PyPI so to install, simply use pip

.. code-block:: bash

    $ pip3 install medimages4tests
    
or include in your package's ``test_requires``.


Usage
-----

Create a pytest fixture consisting of a dummy image with field-map metadata in DICOM format

.. code-block:: python

    # Import medimages4tests generator functions
    from medimages4tests.dummy.dicom.mri.fmap.ge.discovery_mr888.dv26_0_r05_2008a import get_image

    # Return generated images in pytest fixtures (or alternative test framework)
    @pytest.fixture()
    def ge_dicom_fmap():
        return get_image()

Create a dummy NIfTI image

.. code-block:: python

    import numpy
    # Import `get_image` function
    from medimages4tests.dummy.nifti import get_image

    # Create dummy nifti image of 10x10x10 containing all ones
    @pytest.fixture()
    def ones_nifti():
        return get_image(
            data=numpy.ones((10, 10, 10))
        )
        
Access real T1-weighted from OpenNeuro.org

.. code-block:: python


    from medimages4tests.mri.neuro.t1w import get_image

    @pytest.fixture()
    def t1w_nifti():
        return get_image(sample="ds004130-ON01016")


Acknowledgements
~~~~~~~~~~~~~~~~
The authors acknowledge the facilities and scientific and technical assistance of the National Imaging Facility, a National Collaborative Research Infrastructure Strategy (NCRIS) capability.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/australian-imaging-service/medimages4tests",
    "name": "medimages4tests",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "repository analysis medical-imaging neuroimaging workflows pipelines",
    "author": "Thomas G. Close",
    "author_email": "tom.g.close@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "Medimages4tests\n===============\n\n.. image:: https://github.com/australian-imaging-service/medimages4tests/actions/workflows/test.yml/badge.svg\n   :target: https://github.com/australian-imaging-service/medimages4tests/actions/workflows/test.yml\n.. image:: https://codecov.io/gh/australian-imaging-service/medimages4tests/branch/main/graph/badge.svg?token=UIS0OGPST7\n   :target: https://codecov.io/gh/australian-imaging-service/medimages4tests\n.. image:: https://img.shields.io/pypi/pyversions/medimages4tests.svg\n   :target: https://pypi.python.org/pypi/medimages4tests/\n   :alt: Supported Python versions\n.. image:: https://img.shields.io/pypi/v/medimages4tests.svg\n   :target: https://pypi.python.org/pypi/medimages4tests/\n   :alt: Latest Version\n\nGenerates dummy medical images, with junk image data but realistic headers,\nto test imaging handling pipelines\n\nInstallation\n------------\n\nMedimage4tests is available on PyPI so to install, simply use pip\n\n.. code-block:: bash\n\n    $ pip3 install medimages4tests\n    \nor include in your package's ``test_requires``.\n\n\nUsage\n-----\n\nCreate a pytest fixture consisting of a dummy image with field-map metadata in DICOM format\n\n.. code-block:: python\n\n    # Import medimages4tests generator functions\n    from medimages4tests.dummy.dicom.mri.fmap.ge.discovery_mr888.dv26_0_r05_2008a import get_image\n\n    # Return generated images in pytest fixtures (or alternative test framework)\n    @pytest.fixture()\n    def ge_dicom_fmap():\n        return get_image()\n\nCreate a dummy NIfTI image\n\n.. code-block:: python\n\n    import numpy\n    # Import `get_image` function\n    from medimages4tests.dummy.nifti import get_image\n\n    # Create dummy nifti image of 10x10x10 containing all ones\n    @pytest.fixture()\n    def ones_nifti():\n        return get_image(\n            data=numpy.ones((10, 10, 10))\n        )\n        \nAccess real T1-weighted from OpenNeuro.org\n\n.. code-block:: python\n\n\n    from medimages4tests.mri.neuro.t1w import get_image\n\n    @pytest.fixture()\n    def t1w_nifti():\n        return get_image(sample=\"ds004130-ON01016\")\n\n\nAcknowledgements\n~~~~~~~~~~~~~~~~\nThe authors acknowledge the facilities and scientific and technical assistance of the National Imaging Facility, a National Collaborative Research Infrastructure Strategy (NCRIS) capability.\n",
    "bugtrack_url": null,
    "license": "CC0",
    "summary": "Generates dummy medical image data with realistic headers to be used in image handling tests",
    "version": "0.3.3",
    "project_urls": {
        "Homepage": "https://github.com/australian-imaging-service/medimages4tests"
    },
    "split_keywords": [
        "repository",
        "analysis",
        "medical-imaging",
        "neuroimaging",
        "workflows",
        "pipelines"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7c5330bd7e0e6e6cdb100596193799c6b0d34ef9a009f490048183306aeb9f1",
                "md5": "6e43b50406181b3ee25d058f8f296b1d",
                "sha256": "8af0361fcec7e6508a5cac93bdc016021b269d7dbde0c58026055961804fd3e6"
            },
            "downloads": -1,
            "filename": "medimages4tests-0.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6e43b50406181b3ee25d058f8f296b1d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 894399,
            "upload_time": "2023-11-14T04:02:40",
            "upload_time_iso_8601": "2023-11-14T04:02:40.790695Z",
            "url": "https://files.pythonhosted.org/packages/e7/c5/330bd7e0e6e6cdb100596193799c6b0d34ef9a009f490048183306aeb9f1/medimages4tests-0.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-14 04:02:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "australian-imaging-service",
    "github_project": "medimages4tests",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "medimages4tests"
}
        
Elapsed time: 0.13985s