diff --git a/.gitignore b/.gitignore index 0815d57..d170a7e 100644 --- a/.gitignore +++ b/.gitignore @@ -144,4 +144,4 @@ dmypy.json .pyre/ env_linux_3.9 env_linux_3.10 - +env_linux_3.11 diff --git a/README.md b/README.md index 3ff450f..006bd9c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Usage -Install the package using pip +Install the [package](https://pypi.org/project/medviz/) using `pip`: ```bash pip install medviz diff --git a/README.rst b/README.rst index e8cfc94..b638052 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,31 @@ +============== 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. + + +GitHub repository: [https://github.com/mohsenhariri/medviz](https://github.com/mohsenhariri/medviz) diff --git a/VERSION b/VERSION index 8a9ecc2..7bcd0e3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.1 \ No newline at end of file +0.0.2 \ No newline at end of file diff --git a/scripts/update_version.py b/scripts/update_version.py new file mode 100644 index 0000000..7c1b8b7 --- /dev/null +++ b/scripts/update_version.py @@ -0,0 +1,13 @@ +import tomllib +from pathlib import Path + +path = Path("pyproject.toml") + +with open("VERSION", "r") as f: + version = f.read().strip() + + +with path.open("rb") as fp: + config = tomllib.load(fp, parse_float=float) + +config["project"]["version"] = version