- prep_for_imshow(im, mask=None, axis=0, slice=None)#
Adjusts the range of greyscale values in an image to improve visualization by
im (ndimage) – The image to show. If
-infvalues, they are converted to 1 above or below the minimum and maximum finite values in
mask (ndimage, optional) – An image of the porous material with
Trueindicating voxels of interest. The
Falsevoxels are excluded from the
axis (int, optional) – If the image is 3D, a 2D image is returned with the specified
slicetaken along this axis (default = 0). If
Nonethen a 3D image is returned. If the image is 2D this is ignored.
slice (int, optional) – If
imis 3D, a 2D image is be returned showing this slice along the given
None, then a slice at the mid-point of the axis is returned. If
Noneor the image is 2D this is ignored.
kwargs – A python dicionary designed to be passed directly to
matplotlib.pyplot.imshowusing the “**kwargs” features (i.e.
plt.imshow(\*\*data)). It contains the following key-value pairs:
The adjusted image with
vmax + 1, and all solid voxels replacd by
np.nanto show as white in
The maximum of
+infor values in
The minimum of
-infor values in
Set to ‘none’ to avoid artifacts in
Set to ‘lower’ to put (0, 0) on the bottom-left corner
- Return type:
If any of the extra items are unwanted they can be removed with
Click here to view online example.