nireports.reportlets.mosaic module¶
Base components to generate mosaic-like reportlets.
- nireports.reportlets.mosaic.plot_mosaic(img, out_file=None, ncols=8, title=None, overlay_mask=None, bbox_mask_file=None, only_plot_noise=False, annotate=True, vmin=None, vmax=None, cmap='Greys_r', plot_sagittal=False, fig=None, maxrows=16, views=('axial', 'sagittal', None)) str[source]¶
Plot a mosaic of 2D cuts.
- nireports.reportlets.mosaic.plot_registration(anat_nii: SpatialImage, div_id: str, plot_params: dict[str, Any] | None = None, order: tuple[Literal['x', 'y', 'z'], Literal['x', 'y', 'z'], Literal['x', 'y', 'z']] = ('z', 'x', 'y'), cuts: dict[str, list[float]] | None = None, estimate_brightness: bool = False, label: str | None = None, contour: SpatialImage | None = None, compress: bool | Literal['auto'] = 'auto', dismiss_affine: bool = False) list[SVGFigure][source]¶
Plots the foreground and background views Default order is: axial, coronal, sagittal
- nireports.reportlets.mosaic.plot_segmentation(anat_file: str, segmentation: str, out_file: str, **kwargs) str[source]¶
Plot a segmentation (from MRIQC).
- nireports.reportlets.mosaic.plot_segs(image_nii: str | SpatialImage, seg_niis: list[str | SpatialImage], bbox_nii: str | SpatialImage | None = None, masked: bool = False, compress: bool | Literal['auto'] = 'auto', **plot_params) list[SVGFigure][source]¶
Generate a static mosaic with ROIs represented by their delimiting contour.
Plot segmentation as contours over the image (e.g. anatomical). seg_niis should be a list of files. mask_nii helps determine the cut coordinates. plot_params will be passed on to nilearn plot_* functions. If seg_niis is a list of size one, it behaves as if it was plotting the mask.
- nireports.reportlets.mosaic.plot_slice(dslice: ndarray[tuple[int, ...], dtype[_ScalarType_co]], spacing: tuple[float, float] | None = None, cmap: str | Colormap = 'Greys_r', label: str | None = None, ax: Axes | None = None, vmax: float | None = None, vmin: float | None = None, annotate: tuple[str, str] | None = None) Axes[source]¶
- nireports.reportlets.mosaic.plot_slice_tern(dslice: ndarray[tuple[int, ...], dtype[_ScalarType_co]], prev: ndarray[tuple[int, ...], dtype[_ScalarType_co]] | None = None, post: ndarray[tuple[int, ...], dtype[_ScalarType_co]] | None = None, spacing: tuple[float, float] | None = None, cmap: str | Colormap = 'Greys_r', label: str | None = None, ax: Axes | None = None, vmax: float | None = None, vmin: float | None = None) None[source]¶