snow_partitioning_n
#
Similar to snow_partitioning
except that it works on an image containing an arbitrary number of phases
Import packages#
import matplotlib.pyplot as plt
import numpy as np
import porespy as ps
ps.visualization.set_mpl_style()
np.random.seed(0)
im
#
Generate a test 3 phase image by overlaying two 2 phase images. This works with 3D images as well.
Apply snow_partitioning_n
filter#
The Results
of the filter includes several images
snow = ps.filters.snow_partitioning_n(im)
print(snow)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Results of snow_partitioning_n generated at Sat Jul 12 16:18:57 2025
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
im Array of size (200, 200)
dt Array of size (200, 200)
phase_max_label [71, 114]
regions Array of size (200, 200)
peaks Array of size (200, 200)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――