Skip to content

update visualization in resample benchmark #1052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions modules/resample_benchmark.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"outputs": [],
"source": [
"!pip install -q ipywidgets==7.6\n",
"!pip install -q ipywidgets\n",
"!python -c \"import monai\" || pip install -q \"monai-weekly[nibabel]\"\n",
"import monai\n",
"from monai.apps.utils import download_url\n",
Expand All @@ -48,8 +48,7 @@
"import numpy as np\n",
"\n",
"%matplotlib inline\n",
"from matplotlib import pyplot as plt\n",
"from ipywidgets import interact, fixed"
"from matplotlib import pyplot as plt"
]
},
{
Expand Down Expand Up @@ -240,14 +239,15 @@
" plt.show()\n",
"\n",
"\n",
"# generate the interactive display\n",
"interact(\n",
" transformation_display,\n",
" img_path=fixed(f\"{root_dir}/SimpleITK.jpg\"),\n",
" tx=(-128.0, 128.0, 2.0),\n",
" ty=(-64.0, 64.0),\n",
" theta=(-np.pi/4.0, np.pi/4.0)\n",
")"
"# # umcomment the following to generate the interactive display\n",
"# from ipywidgets import interact, fixed\n",
"# interact(\n",
"# transformation_display,\n",
"# img_path=fixed(f\"{root_dir}/SimpleITK.jpg\"),\n",
"# tx=(-128.0, 128.0, 2.0),\n",
"# ty=(-64.0, 64.0),\n",
"# theta=(-np.pi/4.0, np.pi/4.0)\n",
"# )"
]
},
{
Expand Down Expand Up @@ -689,7 +689,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.0"
"version": "3.8.13"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down