<jupyter_start><jupyter_text>SNOW partitioning parallelThe filter is used to perform SNOW algorithm in parallel and serial mode to save computational time and memory requirement respectively. [SNOW](https://journals.aps.org/pre/abstract/10.1103/PhysRevE.96.023307) algorithm converts a binary image in to partitioned regions while avoiding oversegmentation. SNOW_partitioning_parallel speeds up this process by decomposing the domain into several subdomains and either process them in different cores in parallel to save time or one by one in single core to save memory requirements.       Import Modules<jupyter_code>import numpy as np
import porespy as ps
from porespy.tools import randomize_colors
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
gs = gridspec.GridSpec(2, 4)
gs.update(wspace=0.5)
np.random.seed(10)
ps.visualization.set_mpl_style()<jupyter_output><empty_output><jupyter_text>Create a random image of overlapping spheres<jupyter_code>im = ps.generators.overlapping_spheres([1000, 1000], r=10, porosity=0.5)
fig, ax = plt.subplots()
ax.imshow(im, origin='lower');<jupyter_output><empty_output><jupyter_text>Apply SNOW_partitioning_parallel on the binary image<jupyter_code>snow_out = ps.filters.snow_partitioning_parallel(
    im=im, divs=2, r_max=5, sigma=0.4)<jupyter_output><empty_output><jupyter_text>Plot output results<jupyter_code>fig, ax = plt.subplots(1, 3, figsize=[9, 3])
ax[0].imshow(snow_out.im);
ax[1].imshow(snow_out.dt);
ax[2].imshow(randomize_colors(snow_out.regions));
ax[0].set_title('Binary Image');
ax[1].set_title('Euclidean Distance Transform')
ax[2].set_title('Segmented Image');
print(f"Number of regions: {snow_out.regions.max()}")<jupyter_output>Number of regions: 1006
{'fraction_non_alphanumeric': 0.10362694300518134, 'fraction_numerical': 0.028785261945883708, 'mean_word_length': 7.436893203883495, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '667946', 'license': 'MIT', 'n_tokens_mistral': 625, 'n_tokens_neox': 572, 'n_words': 147, 'path': 'examples/filters/tutorials/snow_partitioning_parallel.ipynb', 'repo_name': 'jamesobutler/porespy', 'size': '1737'}