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/ec74152df55b0074af8c79f4e41ef2ff22e5c353d53eb39363058707ba62cc1c.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/93ebd1578ba7fd966a4fd7c08c3a0033f32b83d965474c9ae5ec3087eebe9005.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/bdad4605b42a6611a6d3b4ae4bcda1126e70ee22fbd644162c991f318042fc4f.png