usage: __main__.py [-h] [--volume_cmap_name VOLUME_CMAP_NAME]
[--volume_opacity VOLUME_OPACITY]
[--axis {sagittal,coronal,axial}] [--size WIDTH HEIGHT]
[--labelmap LABELMAP]
[--labelmap_cmap_name LABELMAP_CMAP_NAME]
[--labelmap_opacity LABELMAP_OPACITY]
[--overlays OVERLAYS [OVERLAYS ...]]
[--overlays_as_contours]
[--overlays_colors R G B [R G B ...]]
[--overlays_opacity OVERLAYS_OPACITY]
[--overlap rWIDTH rHEIGHT] [-v [{DEBUG,INFO,WARNING}]] [-f]
rows cols volume transparency out_fname SID [SID ...]
Compose a mosaic of screenshots of the given image volume slices along the
requested axis. The provided transparency mask (e.g. a brain mask volume) is
used to set the screenshot values outside the mask non-zero values to full
transparency. Additionally, if a labelmap image is provided (e.g. a tissue
segmentation map), it is overlaid on the volume slices. Also, a series of
masks can be provided and will be used to generate contours overlaid on each
volume slice.
A labelmap image can be provided as the image volume, without requiring it as
the optional argument if only the former needs to be plot.
The screenshots are overlapped according to the given factors.
The mosaic supports either horizontal, vertical or matrix arrangements.
Example:
>>> scil_viz_volume_screenshot_mosaic.py 1 8 t1.nii.gz brain_mask.nii.gz
mosaic_overlap_t1_axial.png 30 40 50 60 70 80 90 100
>>> scil_viz_volume_screenshot_mosaic.py 2 4 t1.nii.gz brain_mask.nii.gz
mosaic_overlap_t1_axial_plasma_cmap.png 30 40 50 60 70 80 90 100
--overlap_factor 0.6 0.5 --volume_cmap_name plasma
>>> scil_viz_volume_screenshot_mosaic.py 2 4 tissues.nii.gz brain_mask.nii.gz
mosaic_overlap_tissues_axial_plasma_cmap.png 30 40 50 60 70 80 90 100
--volume_cmap_name plasma
>>> scil_viz_volume_screenshot_mosaic.py 2 4 t1.nii.gz brain_mask.nii.gz
mosaic_overlap_t1_sagittal_tissue_viridis_cmap.png
30 40 50 60 70 80 90 100 --axis sagittal
--labelmap tissue_map.nii.gz --labelmap_cmap_name viridis
>>> scil_viz_volume_screenshot_mosaic.py 2 4 t1.nii.gz brain_mask.nii.gz
mosaic_overlap_t1_sagittal_tissue_contours.png
30 40 50 60 70 80 90 100 --axis sagittal
--overlays wm_mask.nii.gz gm_mask.nii.gz csf_mask.nii.gz
positional arguments:
rows The mosaic row count.
cols The mosaic column count.
volume Input 3D Nifti file (.nii/.nii.gz).
transparency Transparency Nifti image (.nii/.nii.gz). Can either be a binary mask or a scalar image in the range [0, 1].
out_fname Name of the output image (e.g. img.jpg, img.png).
SID Slice indices to screenshot.
options:
-h, --help show this help message and exit
--axis {sagittal,coronal,axial}
Name of the axis to visualize. [axial]
--size WIDTH HEIGHT Size of the output image. [(768, 768)]
--overlap rWIDTH rHEIGHT
The overlap factor as a ratio of each image dimension. [(0.6, 0.0)]
-v [{DEBUG,INFO,WARNING}]
Produces verbose output depending on the provided level.
Default level is warning, default when using -v is info.
-f Force overwriting of the output files.
Input overlays:
--labelmap LABELMAP Input labelmap file (.nii/.nii.gz).
--overlays OVERLAYS [OVERLAYS ...]
3D Nifti image(s) to overlay (.nii/.nii.gz).
Volume rendering:
--volume_cmap_name VOLUME_CMAP_NAME
Colormap name for the 3D Nifti image data. [None]
--volume_opacity VOLUME_OPACITY
Opacity value for the 3D Nifti image data. [1.0]
--labelmap_cmap_name LABELMAP_CMAP_NAME
Colormap name for the labelmap image data. [viridis]
--labelmap_opacity LABELMAP_OPACITY
Opacity value for the labelmap image data. [0.5]
Overlay rendering:
--overlays_as_contours
Display overlays contours and reduce the opacity of their inner region (see the `--overlays_opacity` argument).
--overlays_colors R G B [R G B ...]
Colors for the overlays or contours. You may provide a single color, for all overlays/contours, or one color for each. Each color is given as three values: R G B
--overlays_opacity OVERLAYS_OPACITY
Opacity value for the masks overlays. When combined with `--overlays_as_contours`, this will be the opacity of the region inside the computed contours. [0.5]