<jupyter_start><jupyter_text>insert_cylinder  Import packages<jupyter_code>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()<jupyter_output><empty_output><jupyter_text>Generate image for testing<jupyter_code>im = ps.generators.blobs([100, 100, 100])

fig, ax = plt.subplots(figsize=[4, 4]);
ax.imshow(im[..., 50]);
plt.axis(False);<jupyter_output><empty_output><jupyter_text>Demonstrate tool<jupyter_code>im = ps.tools.insert_cylinder(im=im*1.0, xyz0=[20, 20, 20], xyz1=[60, 60, 50], r=20)

fig, ax = plt.subplots(figsize=[4, 4]);
ax.imshow(ps.visualization.xray(~(im > 1)));
plt.axis(False);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15650969529085873, 'fraction_numerical': 0.04709141274238227, 'mean_word_length': 8.151898734177216, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, 'https://': 0, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '293949', 'license': 'MIT', 'n_tokens_mistral': 330, 'n_tokens_neox': 297, 'n_words': 50, 'path': 'examples/tools/howtos/insert_cylinder.ipynb', 'repo_name': 'jamesobutler/porespy', 'size': '722'}