extract_cylinder(im, r=None, axis=0)¶
Returns a cylindrical section of the image of specified radius.
This is useful for making square images look like cylindrical cores such as those obtained from X-ray tomography.
im (ND-array) – The image of the porous material. Can be any data type.
r (scalr) – The radius of the cylinder to extract. If
Noneis given then the default is the largest cylinder that can fit inside the specified plane.
axis (scalar) – The axis along with the cylinder will be oriented.
image – A copy of
imwith values outside the cylindrical area set to 0 or
- Return type
Click here to view online example.