Skip to content

Commit

Permalink
fix error in rendering processing notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocerrone committed Oct 1, 2024
1 parent 84e679a commit ae26cf3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/notebooks/processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"\n",
"mip_ngff = ngff_image.derive_new_image(\"../../data/20200812-CardiomyocyteDifferentiation14-Cycle1.zarr/B/03/0_mip\",\n",
" name=\"MIP\",\n",
" shape=(3, 1, 4320, 5120))"
" shape=(1, 1, 2160, 5120))"
]
},
{
Expand Down Expand Up @@ -131,7 +131,7 @@
"\n",
"image_after_consolidation = mip_image_2.get_data(c=0, z=0)\n",
"\n",
"fig, axs = plt.subplots(1, 2, figsize=(10, 5))\n",
"fig, axs = plt.subplots(2, 1, figsize=(10, 5))\n",
"axs[0].set_title(\"Before consolidation\")\n",
"axs[0].imshow(image_before_consolidation, cmap=\"gray\")\n",
"axs[1].set_title(\"After consolidation\")\n",
Expand Down Expand Up @@ -255,17 +255,17 @@
" print(\" - Processing ROI\", roi.field_index)\n",
" patch = source_image.get_data_from_roi(roi, c=dapi_idx)\n",
" segmentation = otsu_threshold_segmentation(patch, max_label)\n",
" \n",
"\n",
" # Add the max label of the previous segmentation to avoid overlapping labels\n",
" max_label = segmentation.max()\n",
" \n",
"\n",
" nuclei_image.set_data_from_roi(patch=segmentation, roi=roi)\n",
" \n",
"\n",
"# Consolidate the segmentation image\n",
"nuclei_image.consolidate()\n",
"\n",
"print(\"Segmentation image saved\")\n",
"fig, axs = plt.subplots(1, 2, figsize=(10, 5))\n",
"fig, axs = plt.subplots(2, 1, figsize=(10, 5))\n",
"axs[0].set_title(\"MIP\")\n",
"axs[0].imshow(source_image.array[0, 0], cmap=\"gray\")\n",
"axs[1].set_title(\"Nuclei segmentation\")\n",
Expand Down

0 comments on commit ae26cf3

Please sign in to comment.