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
[19:56:36] ERROR    PARDISO solver not installed, run `pip install pypardiso`. Otherwise,          _workspace.py:56
                    simulations will be slow. Apple M chips not supported.                                         
No module named 'pyedt'
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/beb873eedecaa5a11f52237aa32fbb1654f6089e228cd338e67f0a9c4ab08d95.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/a3b9d700b0f070d0d1024e7af00b9fa32f395b46be5f7b2d260f31804caae892.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/c17a9306fd65dc73e05cec12ed40ad5cc503cb3428a23ed0f6eeaa44cbe46775.png