From c94993ff2cab7255d30f713aa09773d06e1f4ae9 Mon Sep 17 00:00:00 2001 From: Md Abdur Rakib <103581704+rifatrakib@users.noreply.github.com> Date: Wed, 10 Aug 2022 16:08:05 +0600 Subject: [PATCH 1/2] imageio.imread replaced with imageio.v2.imread imageio.imread not supported anymore, imageio.v2.imread is suggested as a replacement from the module maintainers. --- content/tutorial-x-ray-image-processing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/tutorial-x-ray-image-processing.md b/content/tutorial-x-ray-image-processing.md index 54d59f4f..3d6ddd69 100644 --- a/content/tutorial-x-ray-image-processing.md +++ b/content/tutorial-x-ray-image-processing.md @@ -119,7 +119,7 @@ import imageio DIR = "tutorial-x-ray-image-processing" -xray_image = imageio.imread(os.path.join(DIR, "00000011_001.png")) +xray_image = imageio.v2.imread(os.path.join(DIR, "00000011_001.png")) ``` **2.** Check that its shape is 1024x1024 pixels and that the array is made up of @@ -157,7 +157,7 @@ import numpy as np num_imgs = 9 combined_xray_images_1 = np.array( - [imageio.imread(os.path.join(DIR, f"00000011_00{i}.png")) for i in range(num_imgs)] + [imageio.v2.imread(os.path.join(DIR, f"00000011_00{i}.png")) for i in range(num_imgs)] ) ``` From be32e20809caa511a0b62e47278ec7b171ec679d Mon Sep 17 00:00:00 2001 From: Md Abdur Rakib <103581704+rifatrakib@users.noreply.github.com> Date: Wed, 10 Aug 2022 16:39:02 +0600 Subject: [PATCH 2/2] Use v3 to replace v2 as recommended by imageio `imageio.imread` is not supported and `imageio.v2` has issues with lazy import, replaced with `imageio.v3.imread` instead as recommended by the `imageio` module maintainers. --- content/tutorial-x-ray-image-processing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/tutorial-x-ray-image-processing.md b/content/tutorial-x-ray-image-processing.md index 3d6ddd69..c8dd3a2b 100644 --- a/content/tutorial-x-ray-image-processing.md +++ b/content/tutorial-x-ray-image-processing.md @@ -119,7 +119,7 @@ import imageio DIR = "tutorial-x-ray-image-processing" -xray_image = imageio.v2.imread(os.path.join(DIR, "00000011_001.png")) +xray_image = imageio.v3.imread(os.path.join(DIR, "00000011_001.png")) ``` **2.** Check that its shape is 1024x1024 pixels and that the array is made up of @@ -157,7 +157,7 @@ import numpy as np num_imgs = 9 combined_xray_images_1 = np.array( - [imageio.v2.imread(os.path.join(DIR, f"00000011_00{i}.png")) for i in range(num_imgs)] + [imageio.v3.imread(os.path.join(DIR, f"00000011_00{i}.png")) for i in range(num_imgs)] ) ```