Skip to content

Commit 6fc1435

Browse files
committed
Update TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb
Updated with the guidance provided in Project-MONAI#1852.
1 parent 90d0a9f commit 6fc1435

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,29 +108,28 @@
108108
"# such as voxel image, image orientation, and image directions,\n",
109109
"# which are critical to image processing and display.\n",
110110
"\n",
111+
"import sys\n",
112+
"\n",
111113
"# Upgrade pip, just in case.\n",
112-
"!python -m pip install --upgrade -q pip\n",
114+
"!{sys.executable} -m pip install --upgrade -q pip\n",
113115
"\n",
114116
"# installations required for monai\n",
115-
"!python -c \"import monai\" || pip install -q \"monai[nibabel,itk,tqdm,pandas,skimage]\"\n",
116-
"!python -c \"import cv2\" || pip install -q opencv-python-headless\n",
117+
"!{sys.executable} -m pip install -q \"monai[nibabel,itk,tqdm,pandas,skimage]\"\n",
118+
"!{sys.executable} -m pip install -q opencv-python-headless\n",
117119
"\n",
118120
"# These are the libraries used to read DICOM Seg objects.\n",
119-
"!python -m pip install -q \"pydicom<3\" pydicom-seg\n",
121+
"!{sys.executable} -m pip install -q \"pydicom==2.4.4\" pydicom-seg\n",
120122
"\n",
121123
"# Install the dependency manually to avoid installing opencv-python.\n",
122-
"!python -m pip install -q plotly bs4 unidecode\n",
123-
"!python -m pip install -q --no-deps rt-utils\n",
124+
"!{sys.executable} -m pip install -q plotly bs4 unidecode\n",
125+
"!{sys.executable} -m pip install -q --no-deps rt-utils\n",
124126
"\n",
125127
"# Install tcia_utils to download the datasets.\n",
126-
"!python -m pip install --upgrade -q --no-deps tcia_utils\n",
128+
"!{sys.executable} -m pip install --upgrade -q --no-deps tcia_utils\n",
127129
"\n",
128130
"# This is the installation required for itkWidgets.\n",
129-
"!python -m pip install --upgrade --pre -q \"itkwidgets[all]\" imjoy_elfinder\n",
130-
"\n",
131-
"# TEMPORARY WORKAROUND TO RESOLVE: https://github.com/kirbyju/TCIA_Notebooks/issues/30\n",
132-
"!python -m pip uninstall -y -q zarr ngff_zarr\n",
133-
"!python -m pip install -q zarr ngff_zarr"
131+
"!{sys.executable} -m pip install --upgrade -q \"itkwidgets[all]==1.0a53\" imjoy_elfinder\n",
132+
"\n"
134133
]
135134
},
136135
{
@@ -450,7 +449,9 @@
450449
},
451450
{
452451
"data": {
453-
"application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")",
452+
"application/javascript": [
453+
"window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")"
454+
],
454455
"text/plain": [
455456
"<IPython.core.display.Javascript object>"
456457
]
@@ -586,7 +587,9 @@
586587
},
587588
{
588589
"data": {
589-
"application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")",
590+
"application/javascript": [
591+
"window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")"
592+
],
590593
"text/plain": [
591594
"<IPython.core.display.Javascript object>"
592595
]
@@ -659,7 +662,9 @@
659662
},
660663
{
661664
"data": {
662-
"application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")",
665+
"application/javascript": [
666+
"window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")"
667+
],
663668
"text/plain": [
664669
"<IPython.core.display.Javascript object>"
665670
]
@@ -753,9 +758,9 @@
753758
"provenance": []
754759
},
755760
"kernelspec": {
756-
"display_name": "Python 3 (ipykernel)",
761+
"display_name": "monai",
757762
"language": "python",
758-
"name": "python3"
763+
"name": "monai"
759764
},
760765
"language_info": {
761766
"codemirror_mode": {
@@ -771,5 +776,5 @@
771776
}
772777
},
773778
"nbformat": 4,
774-
"nbformat_minor": 1
779+
"nbformat_minor": 4
775780
}

0 commit comments

Comments
 (0)