- cylindrical_plug(shape, r=None, axis=2)#
Generates a cylindrical plug suitable for use as a mask on a tomogram
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.
cylinder – A boolean image of the size given by
True’s inside the cylinder and
- Return type:
Click here to view online example.