medviz


Namemedviz JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryMedical Image Visualization Tool 🐍🚀🎉🦕
upload_time2024-03-26 02:56:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseGPL-3.0 License
keywords mri ct
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==============
MedViz
==============

MedViz is a Python package for medical image visualization. It provides a set of functions for visualizing medical images and masks. The package is built on top of the `matplotlib` and `nibabel` packages.

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

To install the package, use pip:

.. code-block:: bash

    pip install medviz


Usage
-----

To use the package, import it in your Python code:

.. code-block:: python

    import medviz

    medviz.layered_plot(image_path="dataset/1-1.nii", mask_paths=["dataset/small_bowel.nii", "dataset/1-1-label.nii"], mask_colors=["red", "yellow"], title="Layered Plot")

The `layered_plot` function creates a layered plot of an image and one or more masks. The masks are overlaid on top of the image using the specified colors. The resulting plot can be used to visualize the location of structures or regions of interest in the image.


.. code-block:: python

    import medviz

    medviz.gif(
        image_path="dataset/1-1.nii",
        mask_paths=[
            "dataset/small_bowel.nii",
            "dataset/1-1-label.nii",
            "dataset/vertebrae_L3.nii.gz",
            "dataset/vertebrae_L4.nii.gz",
            "dataset/vertebrae_L5.nii.gz",
        ],
        mask_colors=["red", "yellow", "green", "blue", "purple"],
        title="Expert Annotations",
        interval=70,
        start_slice=30,
        end_slice=130,
        save_path="animation.gif",
    )

The `gif` function creates an animated GIF of an image and one or more masks. The masks are overlaid on top of the image using the specified colors. The resulting GIF can be used to visualize the location of structures or regions of interest in the image.

GitHub repository: [https://github.com/mohsenhariri/medviz](https://github.com/mohsenhariri/medviz)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "medviz",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "MRI, CT",
    "author": null,
    "author_email": "Mohsen Hariri <mohsen.hariri@case.eud>",
    "download_url": "https://files.pythonhosted.org/packages/02/94/6560bb3f5d98b5841a907804b92fc3cd76ed0045f1b21243b804bc6cc14d/medviz-1.2.0.tar.gz",
    "platform": null,
    "description": "==============\nMedViz\n==============\n\nMedViz is a Python package for medical image visualization. It provides a set of functions for visualizing medical images and masks. The package is built on top of the `matplotlib` and `nibabel` packages.\n\nInstallation\n------------\n\nTo install the package, use pip:\n\n.. code-block:: bash\n\n    pip install medviz\n\n\nUsage\n-----\n\nTo use the package, import it in your Python code:\n\n.. code-block:: python\n\n    import medviz\n\n    medviz.layered_plot(image_path=\"dataset/1-1.nii\", mask_paths=[\"dataset/small_bowel.nii\", \"dataset/1-1-label.nii\"], mask_colors=[\"red\", \"yellow\"], title=\"Layered Plot\")\n\nThe `layered_plot` function creates a layered plot of an image and one or more masks. The masks are overlaid on top of the image using the specified colors. The resulting plot can be used to visualize the location of structures or regions of interest in the image.\n\n\n.. code-block:: python\n\n    import medviz\n\n    medviz.gif(\n        image_path=\"dataset/1-1.nii\",\n        mask_paths=[\n            \"dataset/small_bowel.nii\",\n            \"dataset/1-1-label.nii\",\n            \"dataset/vertebrae_L3.nii.gz\",\n            \"dataset/vertebrae_L4.nii.gz\",\n            \"dataset/vertebrae_L5.nii.gz\",\n        ],\n        mask_colors=[\"red\", \"yellow\", \"green\", \"blue\", \"purple\"],\n        title=\"Expert Annotations\",\n        interval=70,\n        start_slice=30,\n        end_slice=130,\n        save_path=\"animation.gif\",\n    )\n\nThe `gif` function creates an animated GIF of an image and one or more masks. The masks are overlaid on top of the image using the specified colors. The resulting GIF can be used to visualize the location of structures or regions of interest in the image.\n\nGitHub repository: [https://github.com/mohsenhariri/medviz](https://github.com/mohsenhariri/medviz)\n",
    "bugtrack_url": null,
    "license": "GPL-3.0 License",
    "summary": "Medical Image Visualization Tool \ud83d\udc0d\ud83d\ude80\ud83c\udf89\ud83e\udd95",
    "version": "1.2.0",
    "project_urls": null,
    "split_keywords": [
        "mri",
        " ct"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ebbf19bd2be9bf70357f2da2dbd699ed7bba02574f0e2087f645531e630401e",
                "md5": "5f4fe8d9fe4c7d4feae36c42d64cd330",
                "sha256": "2e0e9742c6e6d9321bb7d8a1146e99e09dc027b21bfeacfe3f6662cff2f4187a"
            },
            "downloads": -1,
            "filename": "medviz-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5f4fe8d9fe4c7d4feae36c42d64cd330",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 56521,
            "upload_time": "2024-03-26T02:56:54",
            "upload_time_iso_8601": "2024-03-26T02:56:54.232221Z",
            "url": "https://files.pythonhosted.org/packages/6e/bb/f19bd2be9bf70357f2da2dbd699ed7bba02574f0e2087f645531e630401e/medviz-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02946560bb3f5d98b5841a907804b92fc3cd76ed0045f1b21243b804bc6cc14d",
                "md5": "9fa2ef6bb8d0dfba9c0f3867c2bb0b64",
                "sha256": "57a6c140e2d2c95585a93f5b2043429faaae7d6a93e6400f3b800c198a7257ed"
            },
            "downloads": -1,
            "filename": "medviz-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9fa2ef6bb8d0dfba9c0f3867c2bb0b64",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 46507,
            "upload_time": "2024-03-26T02:56:56",
            "upload_time_iso_8601": "2024-03-26T02:56:56.186826Z",
            "url": "https://files.pythonhosted.org/packages/02/94/6560bb3f5d98b5841a907804b92fc3cd76ed0045f1b21243b804bc6cc14d/medviz-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-26 02:56:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "medviz"
}
        
Elapsed time: 0.21462s