cortex.volume.mosaic¶
- cortex.volume.mosaic(data: NDArray[DType], dim: int = 0, show: bool = True, **kwargs) tuple[NDArray[DType] | NDArray[uint8], tuple[int, int]][source]¶
Turns volume data into a mosaic, useful for quickly viewing volumetric data with radiological convention (left side of figure is right side of subject).
- Parameters:
- dataarray_like
3D volumetric data to mosaic
- dimint
Dimension across which to mosaic. Default 0.
- showbool
Display mosaic with matplotlib? Default True.
- **kwargs
Additional keyword arguments are passed to matplotlib.pyplot.imshow (e.g. cmap, vmin, vmax, interpolation, alpha) when show is True.
- Returns:
- mosaicndarray
2D mosaic image formed by tiling slices of data along dim.
- grid_shapetuple of int
(nwide, ntall) grid dimensions used to tile the mosaic.