find_dt_artifacts

Import packages

[1]:
import numpy as np
import porespy as ps
import scipy.ndimage as spim
import matplotlib.pyplot as plt
import skimage
ps.visualization.set_mpl_style()

Create image and variables

[2]:
im = ps.generators.blobs(shape=[500, 500])
axis=0
dt = spim.distance_transform_edt(im)
plt.figure(figsize=[7,7])
plt.axis(False)
plt.imshow(dt);
[2]:
<matplotlib.image.AxesImage at 0x7fe0f9266220>
../../../_images/examples_filters_howtos_find_dt_artifacts_4_1.png

Apply filter function

[3]:
x = ps.filters.find_dt_artifacts(dt=dt)
plt.figure(figsize=[10, 10])
plt.axis(False)
plt.imshow(x);
[3]:
<matplotlib.image.AxesImage at 0x7fe0f91571f0>
../../../_images/examples_filters_howtos_find_dt_artifacts_6_1.png