{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "62d5330239f042a4ab91c9c5e56550ca", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HTML(value='


Click here to open 3D Slicer in a new window

')" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Run this cell (Shift+Enter) to show application here\n", "slicernb.AppWindow(contents='full')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "65bb9334fae24f4d82e51951c078f2dc", "version_major": 2, "version_minor": 0 }, "text/plain": [ "IntProgress(value=0)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Run this cell to load a file from a URL.\n", "# You can load your own data by changing inputs of downloadFromURL.\n", "# Any questions? Write us on the Slicer forum: https://discourse.slicer.org\n", "slicer.mrmlScene.Clear()\n", "\n", "volume = slicernb.downloadFromURL(\n", " uris=\"https://github.com/Slicer/SlicerTestingData/releases/download/MD5/39b01631b7b38232a220007230624c8e\",\n", " fileNames=\"MRHead.nrrd\",\n", " nodeNames=\"Volume\")\n", "\n", "slicernb.showVolumeRendering(volume)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# Show viewers only\n", "slicernb.AppWindow(contents='viewers');" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "# Show full application window\n", "slicernb.AppWindow(contents='full');" ] } ], "metadata": { "kernelspec": { "display_name": "Slicer 5.0", "language": "python", "name": "slicer-5.0" }, "language_info": { "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "version": "3.9.10" } }, "nbformat": 4, "nbformat_minor": 4 }