generated from mohsenhariri/template-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e08139
commit 37000ea
Showing
5 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,4 +144,4 @@ dmypy.json | |
.pyre/ | ||
env_linux_3.9 | ||
env_linux_3.10 | ||
|
||
env_linux_3.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.1 | ||
0.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |