Module that provides image snap tools.
-
pydcmio.plotting.slicer.
mosaic
(impath, outdir, strategy='average', indices=None, title=None, overlay=None, overlay_alpha=None, basename=None, ext='.pdf')[source]¶ Create a snap of an input 3D or 4D image.
If a 4D image is provided, select the ‘index’th element or create an average volume.
Parameters: impath: str
the path to the image to slice.
outdir: str
the destination folder.
strategy: str, default ‘average’
in the case of 4d image the slice strategy: ‘pick’ or ‘average’.
indices: list of int, default None
in the case of 4d image the indices of the volumes to average.
title: str, default None
the mosaic title.
overlay: str, default None
the path to an mask to be overlayed.
overlay_alpha: float, default None
fix the overlay alpha value (0-1).
basename: str, default None
filename without extension of output file. By default None, means the input file basename will be used.
ext: str, default ‘.png’
snapshot extension, used to specify the output format.
Returns: snap: str
a ‘pdf’ snap of the desired volume.