diff --git a/notebooks/IDC_segmentation_primer.ipynb b/notebooks/IDC_segmentation_primer.ipynb
index 9655b64..c26acad 100644
--- a/notebooks/IDC_segmentation_primer.ipynb
+++ b/notebooks/IDC_segmentation_primer.ipynb
@@ -413,7 +413,7 @@
"!pip install pydicom\n",
"# For later visualization\n",
"!pip install \"itk-io>=5.3.0\"\n",
- "!pip install \"itkwidgets[all]>=1.0a27\"\n",
+ "!pip install \"itkwidgets[all]>=1.0a32\"\n",
"!pip install --upgrade rt-utils\n",
"!pip install pydicom-seg"
]
@@ -1137,10 +1137,10 @@
"\n",
"itk_ct = itk.imread(ct_nrrd_path)\n",
"\n",
- "nrrd_spacing = itk_ct.GetSpacing()\n",
+ "nrrd_spacing = tuple(itk_ct.GetSpacing())\n",
"nrrd_dim = itk_ct.shape\n",
"\n",
- "nii_spacing = itk.imread(pred_nii_path).GetSpacing()\n",
+ "nii_spacing = tuple(nib.load(pred_nii_path).header['pixdim'][1:4])\n",
"nii_dim = itk.imread(pred_nii_path).shape\n",
"\n",
"assert (nrrd_spacing == nii_spacing) & (nrrd_dim == nii_dim)\n",
@@ -1228,11 +1228,11 @@
"data": {
"text/html": [
"\n",
- "
\n",
+ "
\n",
" \n",
@@ -1616,10 +1616,8 @@
},
"outputs": [],
"source": [
- "viewer.set_image_gradient_opacity(0.45)\n",
- "viewer.set_image_gradient_opacity_scale(0.35)\n",
- "viewer.set_label_image_blend(0.65)\n",
- "viewer.set_image_color_range([-829,2251])"
+ "viewer.set_image_gradient_opacity(0.4)\n",
+ "viewer.set_label_image_blend(0.8)"
]
},
{
@@ -1689,11 +1687,11 @@
"data": {
"text/html": [
"\n",
- "
\n",
+ "
\n",
" \n",
@@ -2082,9 +2080,8 @@
"outputs": [],
"source": [
"aorta_viewer.set_image_gradient_opacity(0.45)\n",
- "aorta_viewer.set_image_gradient_opacity_scale(0.35)\n",
- "aorta_viewer.set_label_image_blend(0.75)\n",
- "aorta_viewer.set_image_color_range([-1024,1208])"
+ "aorta_viewer.set_image_gradient_opacity_scale(0.45)\n",
+ "aorta_viewer.set_label_image_blend(0.85)"
]
},
{
@@ -2298,11 +2295,11 @@
"data": {
"text/html": [
"\n",
- "
\n",
+ "
\n",
" \n",
@@ -2993,11 +2990,11 @@
"data": {
"text/html": [
"\n",
- "
\n",
+ "
\n",
" \n",
@@ -3382,9 +3379,8 @@
"outputs": [],
"source": [
"seg_viewer.set_image_gradient_opacity(0.45)\n",
- "seg_viewer.set_image_gradient_opacity_scale(0.35)\n",
- "seg_viewer.set_label_image_blend(0.75)\n",
- "seg_viewer.set_image_color_range([-954,3156])"
+ "seg_viewer.set_image_gradient_opacity_scale(0.45)\n",
+ "seg_viewer.set_label_image_blend(0.75)"
]
},
{
@@ -3431,11 +3427,11 @@
"data": {
"text/html": [
"\n",
- "
\n",
+ "
\n",
" \n",
@@ -4381,7 +4377,8 @@
"metadata": {
"accelerator": "GPU",
"colab": {
- "provenance": []
+ "provenance": [],
+ "include_colab_link": true
},
"gpuClass": "standard",
"kernelspec": {
diff --git a/notebooks/getting_started/part3_exploring_cohorts.ipynb b/notebooks/getting_started/part3_exploring_cohorts.ipynb
index e523ad6..4e087c2 100644
--- a/notebooks/getting_started/part3_exploring_cohorts.ipynb
+++ b/notebooks/getting_started/part3_exploring_cohorts.ipynb
@@ -787,7 +787,7 @@
"outputs": [],
"source": [
"# Install the packages required for sorting and loading the data as well as visualization\n",
- "!pip install -q pydicom-seg \"itk-io>=5.3.0\" \"itkwidgets[all]>=1.0a27\""
+ "!pip install -q pydicom-seg \"itk-io>=5.3.0\" \"itkwidgets[all]>=1.0a32\""
]
},
{
@@ -836,7 +836,7 @@
},
"outputs": [],
"source": [
- "label_image_series_UID = os.listdir(f\"IDC_sorted/{patient_ID}/{study_UID}/SEG\")[0] # Select the first segmentation\n",
+ "label_image_series_UID = sorted(os.listdir(f\"IDC_sorted/{patient_ID}/{study_UID}/SEG\"))[-1] # Select the last segmentation\n",
"label_image_SOP_UID = os.listdir(f\"IDC_sorted/{patient_ID}/{study_UID}/SEG/{label_image_series_UID}\")[0] # Get the name of the DICOM file\n",
"\n",
"# Read the DICOM SEG object using pydicom and pydicom_seg.\n",
@@ -865,22 +865,18 @@
"height": 567
},
"id": "tiA1Da5iLuid",
- "outputId": "17db4c01-603f-4e0c-b1fa-019bfce915b9"
+ "outputId": "a564c0d7-c06c-4396-fe2b-1da675ce1719"
},
"outputs": [
{
- "output_type": "display_data",
"data": {
- "text/plain": [
- ""
- ],
"text/html": [
"\n",
- "
\n",
+ "
\n",
" \n",
@@ -1269,10 +1265,8 @@
},
"outputs": [],
"source": [
- "viewer.set_image_gradient_opacity(0.45)\n",
"viewer.set_image_gradient_opacity_scale(0.35)\n",
- "viewer.set_label_image_blend(0.65)\n",
- "viewer.set_image_color_range([-829,2251])"
+ "viewer.set_label_image_blend(0.7)"
]
},
{
@@ -1295,7 +1289,7 @@
"viewer.set_background_color([0.1,0.1,0.1])\n",
"viewer.set_image_color_map(\"Grayscale\")\n",
"viewer.set_image_color_range([-1727,273])\n",
- "viewer.set_label_image_blend(0.45)\n",
+ "viewer.set_label_image_blend(0.75)\n",
"viewer.set_view_mode('ZPlane')"
]
},
@@ -1313,11 +1307,8 @@
{
"cell_type": "markdown",
"source": [
- ""
- ],
- "metadata": {
- "id": "F1JKCw8IfYRE"
- }
+ ""
+ ]
},
{
"cell_type": "markdown",