shamo.utils.onelab.pos_to_nii

shamo.utils.onelab.pos_to_nii(src, dst, affine, shape, mask=None)[source]

Convert a POS file into a NII file.

Parameters
srcstr, byte or os.PathLike

The path to the input POS file.

dststr, byte or os.PathLike

The path to the output NII file.

affinenumpy.ndarray

The affine matrix of the NII volume.

shapeIterable [float]

The shape of the NII volume.

masknumpy.ndarray, optional

If not set to None, the mask is applied to the field.

Returns
nibabel.Nifti1Image

The generated NII image.