Skip to content

Commit 45effa9

Browse files
authored
update visualization in resample benchmark (Project-MONAI#1052)
Signed-off-by: Wenqi Li <[email protected]> Fixes Project-MONAI#1038 ### Description the interactive display is not working in the regular tests. ### Checks <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [ ] Notebook runs automatically `./runner [-p <regex_pattern>]` Signed-off-by: Wenqi Li <[email protected]>
1 parent 49d8f91 commit 45effa9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

modules/resample_benchmark.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"outputs": [],
3232
"source": [
33-
"!pip install -q ipywidgets==7.6\n",
33+
"!pip install -q ipywidgets\n",
3434
"!python -c \"import monai\" || pip install -q \"monai-weekly[nibabel]\"\n",
3535
"import monai\n",
3636
"from monai.apps.utils import download_url\n",
@@ -48,8 +48,7 @@
4848
"import numpy as np\n",
4949
"\n",
5050
"%matplotlib inline\n",
51-
"from matplotlib import pyplot as plt\n",
52-
"from ipywidgets import interact, fixed"
51+
"from matplotlib import pyplot as plt"
5352
]
5453
},
5554
{
@@ -240,14 +239,15 @@
240239
" plt.show()\n",
241240
"\n",
242241
"\n",
243-
"# generate the interactive display\n",
244-
"interact(\n",
245-
" transformation_display,\n",
246-
" img_path=fixed(f\"{root_dir}/SimpleITK.jpg\"),\n",
247-
" tx=(-128.0, 128.0, 2.0),\n",
248-
" ty=(-64.0, 64.0),\n",
249-
" theta=(-np.pi/4.0, np.pi/4.0)\n",
250-
")"
242+
"# # umcomment the following to generate the interactive display\n",
243+
"# from ipywidgets import interact, fixed\n",
244+
"# interact(\n",
245+
"# transformation_display,\n",
246+
"# img_path=fixed(f\"{root_dir}/SimpleITK.jpg\"),\n",
247+
"# tx=(-128.0, 128.0, 2.0),\n",
248+
"# ty=(-64.0, 64.0),\n",
249+
"# theta=(-np.pi/4.0, np.pi/4.0)\n",
250+
"# )"
251251
]
252252
},
253253
{
@@ -689,7 +689,7 @@
689689
"name": "python",
690690
"nbconvert_exporter": "python",
691691
"pygments_lexer": "ipython3",
692-
"version": "3.8.0"
692+
"version": "3.8.13"
693693
},
694694
"widgets": {
695695
"application/vnd.jupyter.widget-state+json": {

0 commit comments

Comments
 (0)