Skip to content
Snippets Groups Projects
Commit 6ffe14f6 authored by Vedrana Andersen Dahl's avatar Vedrana Andersen Dahl
Browse files

fixed np.bool

parent fda1d164
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,11 @@ import matplotlib.pyplot as plt
import skimage.io
import slgbuilder
# This is to fix deprecated alias in numpy, but still used in slgbuilder
np.bool = bool
np.int = int
I = skimage.io.imread('../../../../Data/week7/peaks_image.png').astype(np.int32)
I = skimage.io.imread('../../data/week7/peaks_image.png').astype(np.int32)
fig, ax = plt.subplots(1,2)
ax[0].imshow(I, cmap='gray')
......@@ -34,5 +37,7 @@ ax[1].imshow(I, cmap='gray')
for line in segmentation_lines:
ax[1].plot(line, 'r')
plt.show()
......@@ -3,8 +3,12 @@ import matplotlib.pyplot as plt
import skimage.io
import slgbuilder
# This is to fix deprecated alias in numpy, but still used in slgbuilder
np.bool = bool
np.int = int
#%% input
I = skimage.io.imread('../../../../Data/week7/layers_A.png').astype(np.int32)
I = skimage.io.imread('../../data/week7/layers_A.png').astype(np.int32)
fig, ax = plt.subplots(1,4)
ax[0].imshow(I, cmap='gray')
......@@ -64,3 +68,5 @@ ax[3].imshow(I, cmap='gray')
for line in segmentation_lines:
ax[3].plot(line, 'r')
ax[3].set_title('two dark lines')
plt.show()
\ No newline at end of file
......@@ -13,7 +13,7 @@ import numpy as np
import scipy.interpolate
import matplotlib.pyplot as plt
I = skimage.io.imread('../../../../Data/week1/dental/slice100.png')
I = skimage.io.imread('../../data/week1/dental/slice100.png')
a = 180 # number of angles for unfolding
......@@ -33,3 +33,5 @@ U = U.reshape((r,a)).astype(np.uint8)
fig, ax = plt.subplots(1,2)
ax[0].imshow(I, cmap='gray')
ax[1].imshow(U, cmap='gray')
plt.show()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment