Skip to content

Throat diameters are much larger than pore diameters from snow extraction #548

Answered by jgostick
JoHommel asked this question in Q&A
Discussion options

You must be logged in to vote

When you tile this image to make it 'thick', you need to put 0's on the top and bottom to represent the plates or glass covers or whatever you have there. Otherwise the distance transform will treat the z-direction as infinite, so the nearest solid will be the pillar, not the plates. This may also help with the watershed partitioning problem since the contours of the distance transform will be better defined. The following code snippet explains how to do this:

import porespy as ps
import imageio
import numpy as np
import matplotlib.pyplot as plt

im = imageio.imread('micromodel.png')

im = np.tile(np.atleast_3d(im), reps=[1, 1, 10])
im[..., 0] = 0
im[..., -1] = 0

Replies: 2 comments 22 replies

Comment options

You must be logged in to vote
22 replies
@ma-sadeghi
Comment options

@kweishaupt
Comment options

@JoHommel
Comment options

@ma-sadeghi
Comment options

@JoHommel
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jgostick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants