show_panels#

This functions create a montage of many 2D slices through a 3D image. This is useful for very quick checks of the image to ensure the features are present, shapes are correct, etc.

import porespy as ps
import matplotlib.pyplot as plt
im = ps.generators.blobs([20, 40, 60], blobiness=0.5)

im#

This arugment receives the 3D image which is to be sliced:

fig, ax = ps.visualization.show_panels(im)
../../../_images/983d194a4854881f6e98c7a2f7092f0acebfb8feabf31fb39f42e9699a47e9d8.png

rc#

Indicates the number of rows and columns to use. The default is [3, 3]. The function will take the needed number of slices to fill in the panel complete, evenly spaced along the specified axis.

fig, ax = ps.visualization.show_panels(im, rc=[2, 4])
../../../_images/eb869143e038b0da081578d914bae40c1aa9891a90d1c024184d5b0cdcdcde93.png

axis#

Indicates the direction which slices are taken. By default slices are taken from the x-direction (axis=0), meaning the panels are slices of the “yz-plane”.

fig, ax = ps.visualization.show_panels(im, axis=2)
../../../_images/aaefccafb6db4cd25a765bb716784bd2f5f0be911b08fc6869df08b8ba4889f3.png