xray¶
- xray(im, axis=0)[source]¶
Simulates an X-ray radiograph looking through the porous material.
The resulting image is colored according to the amount of attenuation an X-ray would experience, so regions with more solid will appear darker.
- Parameters:
im (array_like) – ndarray of the porous material with the solid phase marked as 1 or True
axis (int) – Specifes the axis along which the camera will point.
- Returns:
image – A 2D greyscale image suitable for use in matplotlib's
`imshow`
function.- Return type:
ndarray
Examples
Click here to view online example.