nireports.tools.ndimage module

Tooling to manipulate n-dimensional images.

nireports.tools.ndimage.load_api(path: str | PathLike[str], api: type[ImgT]) ImgT[source]
nireports.tools.ndimage.rotate_affine(img: SpatImgT, rot: ndarray[tuple[Any, ...], dtype[float64]] | None = None) SpatImgT[source]

Rewrite the affine of a spatial image.

nireports.tools.ndimage.rotation2canonical(img: SpatialImage) ndarray[tuple[Any, ...], dtype[float64]] | None[source]

Calculate the rotation w.r.t. cardinal axes of input image.