diff --git a/Python/01_Image_Basics.ipynb b/Python/01_Image_Basics.ipynb index 712ea9c4..b9b789f9 100644 --- a/Python/01_Image_Basics.ipynb +++ b/Python/01_Image_Basics.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# SimpleITK Image Basics \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\" \n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# SimpleITK Image Basics \n", "\n", "This document will give a brief orientation to the SimpleITK Image class.\n", "\n", @@ -427,7 +458,7 @@ "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -441,9 +472,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.12.11" } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 } diff --git a/Python/02_Pythonic_Image.ipynb b/Python/02_Pythonic_Image.ipynb index a6bc81e8..9f0dfd17 100644 --- a/Python/02_Pythonic_Image.ipynb +++ b/Python/02_Pythonic_Image.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Pythonic Syntactic Sugar \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\" \n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Pythonic Syntactic Sugar\n", "\n", "The Image Basics Notebook was straight forward and closely follows ITK's C++ interface.\n", "\n", @@ -423,7 +454,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.11" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/03_Image_Details.ipynb b/Python/03_Image_Details.ipynb index 271d44ea..483260d0 100644 --- a/Python/03_Image_Details.ipynb +++ b/Python/03_Image_Details.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# SimpleITK Images, They're Physical Objects \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# SimpleITK Images, They're Physical Objects\n", "\n", "**SimpleITK conventions**:\n", "* Image access is in x,y,z order, image.GetPixel(x,y,z) or image[x,y,z], with zero based indexing.\n", @@ -1429,7 +1460,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.10" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/04_Image_Display.ipynb b/Python/04_Image_Display.ipynb index 2f925c36..91cb5e03 100644 --- a/Python/04_Image_Display.ipynb +++ b/Python/04_Image_Display.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Image Display \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Image Display\n", "\n", "The native SimpleITK approach to displaying images is to use an external viewing program. In the notebook environment it is convenient to use matplotlib to display inline images and if the need arises we can implement some reasonably rich inline graphical user interfaces, combining control components from the ipywidgets package and matplotlib based display.\n", "\n", @@ -338,7 +369,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/05_Results_Visualization.ipynb b/Python/05_Results_Visualization.ipynb index abe06a6c..4969dc0d 100644 --- a/Python/05_Results_Visualization.ipynb +++ b/Python/05_Results_Visualization.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Visualization of Segmentation and Registration Results \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Visualization of Segmentation and Registration Results\n", "\n", "In this notebook we illustrate various ways one can display the results of segmentation and registration algorithms so that they can be easily incorporated into a manuscript or presentation. For interactive data exploration we recommend using dedicated programs (e.g. 3D slicer). \n", "\n", @@ -1430,7 +1461,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/10_matplotlibs_imshow.ipynb b/Python/10_matplotlibs_imshow.ipynb index 9f425d1a..17dfe13b 100644 --- a/Python/10_matplotlibs_imshow.ipynb +++ b/Python/10_matplotlibs_imshow.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Using `matplotlib` to display inline images \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Using `matplotlib` to display inline images\n", "\n", "In this notebook we will explore using `matplotlib` to display images in our notebooks, and work towards developing a reusable function to display 2D,3D, color, and label overlays for SimpleITK images.\n", "\n", @@ -15,6 +46,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "jupyter": { "outputs_hidden": true } @@ -85,6 +117,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "jupyter": { "outputs_hidden": true } @@ -132,6 +165,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "jupyter": { "outputs_hidden": true } @@ -338,6 +372,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "jupyter": { "outputs_hidden": true } @@ -540,7 +575,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/11_Progress.ipynb b/Python/11_Progress.ipynb index 33431b11..c059a61b 100644 --- a/Python/11_Progress.ipynb +++ b/Python/11_Progress.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Progress Reporting and Command Observers \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Progress Reporting and Command Observers\n", "\n", "SimpleITK `Filter`s and other classes derived from `ProcessObject`s have the ability for user code to be executed when certain events occur. This is known as the Command and Observer design patters to implement user callbacks. This allows for the monitoring and abortion of processes as they are being executed.\n", "\n", @@ -571,7 +602,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/20_Expand_With_Interpolators.ipynb b/Python/20_Expand_With_Interpolators.ipynb index 4f39a154..14bfee3c 100644 --- a/Python/20_Expand_With_Interpolators.ipynb +++ b/Python/20_Expand_With_Interpolators.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Expand With Interpolators \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Expand With Interpolators\n", "\n", "This notebook demonstrates the different interpolators available in SimpleITK available for image resampling. Their effect is demonstrated on the Marschner-Lobb image." ] @@ -142,7 +173,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/21_Transforms_and_Resampling.ipynb b/Python/21_Transforms_and_Resampling.ipynb index ac7e2edc..18f56bd6 100644 --- a/Python/21_Transforms_and_Resampling.ipynb +++ b/Python/21_Transforms_and_Resampling.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Transforms and Resampling " + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Transforms and Resampling" ] }, { @@ -258,9 +289,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [], "source": [ "def affine_translate(transform, x_translation=3.1, y_translation=4.6):\n", @@ -355,9 +384,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [], "source": [ "def affine_shear(transform, x_shear=0.3, y_shear=0.1):\n", @@ -670,9 +697,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [], "source": [ "# Create an image of size [num_samples,1...1], actual size is dependent on the image dimensionality. The pixel\n", @@ -1221,7 +1246,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/22_Transforms.ipynb b/Python/22_Transforms.ipynb index e6343e54..c459f803 100644 --- a/Python/22_Transforms.ipynb +++ b/Python/22_Transforms.ipynb @@ -4,8 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# SimpleITK Spatial Transformations \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# SimpleITK Spatial Transformations\n", "\n", "**Summary:**\n", "\n", @@ -1200,9 +1230,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [], "source": [ "def composite2affine(composite_transform, result_center=None):\n", @@ -1492,9 +1520,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [], "source": [ "# Create a 2D rigid transformation, write it to disk and read it back.\n", @@ -1622,7 +1648,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/300_Segmentation_Overview.ipynb b/Python/300_Segmentation_Overview.ipynb index 5ba1b1fe..87283135 100644 --- a/Python/300_Segmentation_Overview.ipynb +++ b/Python/300_Segmentation_Overview.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Introduction to ITK Segmentation in SimpleITK Notebooks \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Introduction to ITK Segmentation in SimpleITK Notebooks\n", "\n", "Goal: To become familiar with basic segmentation algorithms available in ITK, and interactively explore their parameter space.\n", "\n", @@ -366,7 +397,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/30_Segmentation_Region_Growing.ipynb b/Python/30_Segmentation_Region_Growing.ipynb index 373665b8..9bcc791c 100644 --- a/Python/30_Segmentation_Region_Growing.ipynb +++ b/Python/30_Segmentation_Region_Growing.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Segmentation: Region Growing \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Segmentation: Region Growing\n", "\n", "In this notebook we use one of the simplest segmentation approaches, region growing. We illustrate \n", "the use of three variants of this family of algorithms. The common theme for all algorithms is that a voxel's neighbor is considered to be in the same class if its intensities are similar to the current voxel. The definition of similar is what varies:\n", @@ -80,6 +111,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "jupyter": { "outputs_hidden": true } @@ -256,7 +288,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/31_Levelset_Segmentation.ipynb b/Python/31_Levelset_Segmentation.ipynb index 34210aaf..e9469b4f 100644 --- a/Python/31_Levelset_Segmentation.ipynb +++ b/Python/31_Levelset_Segmentation.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Levelset Segmentation \n" + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Levelset Segmentation" ] }, { @@ -185,7 +216,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/32_Watersheds_Segmentation.ipynb b/Python/32_Watersheds_Segmentation.ipynb index 4405b7fc..3928821f 100644 --- a/Python/32_Watersheds_Segmentation.ipynb +++ b/Python/32_Watersheds_Segmentation.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Watersheds Segmentation " + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Watersheds Segmentation" ] }, { @@ -306,7 +337,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/33_Segmentation_Thresholding_Edge_Detection.ipynb b/Python/33_Segmentation_Thresholding_Edge_Detection.ipynb index bf9da513..a533524e 100644 --- a/Python/33_Segmentation_Thresholding_Edge_Detection.ipynb +++ b/Python/33_Segmentation_Thresholding_Edge_Detection.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Segmentation: Thresholding and Edge Detection \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Segmentation: Thresholding and Edge Detection\n", "\n", "In this notebook our goal is to estimate the location and radius of spherical markers visible in a Cone-Beam CT volume.\n", "\n", @@ -393,7 +424,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/34_Segmentation_Evaluation.ipynb b/Python/34_Segmentation_Evaluation.ipynb index d410dfb2..ada74379 100644 --- a/Python/34_Segmentation_Evaluation.ipynb +++ b/Python/34_Segmentation_Evaluation.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Segmentation Evaluation \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Segmentation Evaluation\n", "\n", "Evaluating segmentation algorithms is most often done using reference data to which you compare your results. \n", "\n", @@ -597,7 +628,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/60_Registration_Introduction.ipynb b/Python/60_Registration_Introduction.ipynb index 056191e4..3099e42f 100644 --- a/Python/60_Registration_Introduction.ipynb +++ b/Python/60_Registration_Introduction.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Introduction to SimpleITKv4 Registration \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Introduction to SimpleITKv4 Registration\n", "\n", "First, a reminder of some SimpleITK conventions:\n", "* The dimensionality of images being registered is required to be the same (i.e. 2D/2D or 3D/3D).\n", @@ -446,7 +477,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/62_Registration_Tuning.ipynb b/Python/62_Registration_Tuning.ipynb index 35690413..3381013e 100644 --- a/Python/62_Registration_Tuning.ipynb +++ b/Python/62_Registration_Tuning.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Registration Settings: Choices, Choices, Choices \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Registration Settings: Choices, Choices, Choices\n", "\n", "The performance of most registration algorithms is dependent on a large number of parameter settings. For optimal performance you will need to customize your settings, turning all the knobs to their \"optimal\" position:
\n", "\n", @@ -389,7 +420,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.12.11" } }, "nbformat": 4, diff --git a/Python/64_Registration_Memory_Time_Tradeoff.ipynb b/Python/64_Registration_Memory_Time_Tradeoff.ipynb index fc18f20a..1a77fd83 100644 --- a/Python/64_Registration_Memory_Time_Tradeoff.ipynb +++ b/Python/64_Registration_Memory_Time_Tradeoff.ipynb @@ -4,7 +4,38 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Registration: Memory-Time Trade-off \n", + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \"Binder\"\n", + " \n", + " \"Colab\"/\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Setup to enable running the notebook in the Google Colab environment\n", + "import os\n", + "\n", + "if \"COLAB_NOTEBOOK_ID\" in os.environ:\n", + " !git clone https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks\n", + " %cd SimpleITK-Notebooks/Python\n", + " !pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Registration: Memory-Time Trade-off\n", "\n", "When developing a registration algorithm or when selecting parameter value settings for an existing algorithm our choices are dictated by two, often opposing, constraints:\n", "