Skip to content

Commit

Permalink
Update TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb
Browse files Browse the repository at this point in the history
Updated with the guidance provided in #1852.
  • Loading branch information
kirbyju committed Oct 8, 2024
1 parent 90d0a9f commit 6fc1435
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -108,29 +108,28 @@
"# such as voxel image, image orientation, and image directions,\n",
"# which are critical to image processing and display.\n",
"\n",
"import sys\n",
"\n",
"# Upgrade pip, just in case.\n",
"!python -m pip install --upgrade -q pip\n",
"!{sys.executable} -m pip install --upgrade -q pip\n",
"\n",
"# installations required for monai\n",
"!python -c \"import monai\" || pip install -q \"monai[nibabel,itk,tqdm,pandas,skimage]\"\n",
"!python -c \"import cv2\" || pip install -q opencv-python-headless\n",
"!{sys.executable} -m pip install -q \"monai[nibabel,itk,tqdm,pandas,skimage]\"\n",
"!{sys.executable} -m pip install -q opencv-python-headless\n",
"\n",
"# These are the libraries used to read DICOM Seg objects.\n",
"!python -m pip install -q \"pydicom<3\" pydicom-seg\n",
"!{sys.executable} -m pip install -q \"pydicom==2.4.4\" pydicom-seg\n",
"\n",
"# Install the dependency manually to avoid installing opencv-python.\n",
"!python -m pip install -q plotly bs4 unidecode\n",
"!python -m pip install -q --no-deps rt-utils\n",
"!{sys.executable} -m pip install -q plotly bs4 unidecode\n",
"!{sys.executable} -m pip install -q --no-deps rt-utils\n",
"\n",
"# Install tcia_utils to download the datasets.\n",
"!python -m pip install --upgrade -q --no-deps tcia_utils\n",
"!{sys.executable} -m pip install --upgrade -q --no-deps tcia_utils\n",
"\n",
"# This is the installation required for itkWidgets.\n",
"!python -m pip install --upgrade --pre -q \"itkwidgets[all]\" imjoy_elfinder\n",
"\n",
"# TEMPORARY WORKAROUND TO RESOLVE: https://github.com/kirbyju/TCIA_Notebooks/issues/30\n",
"!python -m pip uninstall -y -q zarr ngff_zarr\n",
"!python -m pip install -q zarr ngff_zarr"
"!{sys.executable} -m pip install --upgrade -q \"itkwidgets[all]==1.0a53\" imjoy_elfinder\n",
"\n"
]
},
{
Expand Down Expand Up @@ -450,7 +449,9 @@
},
{
"data": {
"application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")",
"application/javascript": [
"window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")"
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
Expand Down Expand Up @@ -586,7 +587,9 @@
},
{
"data": {
"application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")",
"application/javascript": [
"window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")"
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
Expand Down Expand Up @@ -659,7 +662,9 @@
},
{
"data": {
"application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")",
"application/javascript": [
"window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")"
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
Expand Down Expand Up @@ -753,9 +758,9 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "monai",
"language": "python",
"name": "python3"
"name": "monai"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -771,5 +776,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}

0 comments on commit 6fc1435

Please sign in to comment.