Skip to main content

Medical Image Visualization Tool 🐍🚀🎉🦕

Project description

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:

pip install medviz

Usage

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

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.

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)

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

medviz-0.1.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

medviz-0.1.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file medviz-0.1.1.tar.gz.

File metadata

  • Download URL: medviz-0.1.1.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for medviz-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ff365bea65a097b8e053b58c11ba9618a2e399a3cca3a763878e7f0cddcde053
MD5 76fbc654c2e0effebf39a5fd74b956e1
BLAKE2b-256 ab0fbbdf6c52fe0bc044008b42336a9bee53188105d8b63a7d3cbeb46225eaeb

See more details on using hashes here.

File details

Details for the file medviz-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: medviz-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for medviz-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 685f16126079b5ee62b1b1db0213a5f5c56e2ad7d1896f48f28e3914aaeeb2b4
MD5 96a9b75323392d35602617bafb4e1d39
BLAKE2b-256 310729b47ebc88590fc83212c8010c5e8924de6bb7ed9efa60e8fc78046138fc

See more details on using hashes here.

Supported by

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