bundle_of_tubes¶
- bundle_of_tubes(shape: List[int], spacing: int, distribution=None, smooth: bool = True, seed: int = None)[source]¶
Create a 3D image of a bundle of tubes, in the form of a rectangular plate with randomly sized holes through it.
- Parameters:
shape (list) – The size the image, with the 3rd dimension indicating the plate thickness. If the 3rd dimension is not given then a thickness of 1 voxel is assumed.
spacing (int) – The center to center distance of the holes. The hole sizes will be distributed between this values down to 3 voxels.
distribution (scipy.stats object) – A handle to a scipy stats object with the desired parameters.
seed (int, optional, default = None) – Initializes numpy’s random number generator to the specified state. If not provided, the current global value is used. This means calls to
np.random.state(seed)
prior to calling this function will be respected.
- Returns:
image – A boolean array with
True
values denoting the pore space- Return type:
ndarray
Examples
Click here to view online example.