cmind.utils.montager(xi, col=None, row=None, aspect=1.4, transpose=False, isRGB=False, flipx=False, flipy=False, flipz=False)[source]

tile a 3D or 4D image into a single 2D montage


xi : ndarray

image data to montage

col : int, optional

number of columns in the montage

row : int, optional

number of rows in the montage

aspect : float, optional

desired aspect ratio of the montage

transpose : bool, optional

transpose each image slice in the montage? (transposes first two dimensions of the input)

isRGB : bool, optional

set True if the input is RGB

flipx : bool, optional

reverse x-axis indices?

flipy : bool, optional

reverse y-axis indices?

flipz : bool, optional

reverse z-axis indices?


xo : ndarray

2D ndarray containing the montage


Any axis flips are applied prior to transposition adapted from: montager.m from the image reconstruction toolbox by Jeff Fessler added RGB support, aspect ratio, transpose flag and axis flip flags