cylindrical_plug¶
- cylindrical_plug(shape, r=None, axis=2)[source]¶
Generates a cylindrical plug suitable for use as a mask on a tomogram
- Parameters:
shape (array_like) – The shape of the image to create. Can be 3D, or 2D in which case a circle is returned.
r (int (optional)) – The diameter of the cylinder to create. If not provided then the largest possible radius is used to fit within the image.
axis (int) – The direction along with the cylinder’s axis of rotation should be oriented. The default is 2, which is the z-direction.
- Returns:
cylinder – A boolean image of the size given by
shape
withTrue
’s inside the cylinder andFalse
’s outside.- Return type:
ndarray
Examples
Click here to view online example.