Porespy is ploting a pore sheet closer to the PNM. How to resolve this? #994
Unanswered
lucianoguedes8
asked this question in
Q&A
Replies: 1 comment 1 reply
-
check your network to see which pores all have identical x coordinates. Then you can delete them from the network. I would assume the problem is coming from your original image, but you say that you've tried trimming the image. Nonetheless, I don't see how else they could appear there. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I'm geologist and I'm trying to make PNMs. I used PoreSpy code to generate a network, but after i use PoreSpy library codes, after I creating the PNM, when I try to plot there is a sheet made of porebodies on my model.
I believe this pore sheet do not came from my segmented image, because I removed some lateral slices from my image stack and this didn't remove this problem.
To generate my network, I created a matrix maded of a image stack with Numpy library. The image stack is maded by image slices.
So, I have 3 important variables that I worked before use PoreSpy codes:
image_slice
image_stack
stack_matrix → Furthermore, I have made variables named by new_stack_matrix and pnm_stack_matrix
Can someone help me to solve this? Thank you all.
Print screen of two attempts. The second, I have removed some slices from the side of image_stack.
My code after other codes from image uploads:
"""Generating Network"""
Generate seeds (I don't believe this will help)
ps.visualization.set_mpl_style()
np.random.seed(10)
Applying SNOW algorithm - Sub-Network of an Over-segmented Watershed
snow_output = ps.networks.snow2(pnm_stack_matrix, voxel_size=1)
Generate the configuration of the tridimensional network by PoreSpy library codes:
pn = op.io.network_from_porespy(snow_output.network)
Exhibit network configurations:
print(pn)
Now, I expected that I can visualize the network, but this sheet appears at the side of my model.
There is a command that I use an "image slice", I believe this could generate the pores.
Plotting the network:
fig, ax = plt.subplots(figsize=[8, 8])
ax.imshow(image_slice.T, cmap=plt.cm.bone);
op.visualization.plot_coordinates(ax=fig,
network=pn,
size_by=pn["pore.inscribed_diameter"],
color_by=pn["pore.inscribed_diameter"],
markersize=200)
op.visualization.plot_connections(network=pn, ax=fig)
ax.axis("on");
Beta Was this translation helpful? Give feedback.
All reactions