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
- src
str,byteoros.PathLike The path to the input POS file.
- dst
str,byteoros.PathLike The path to the output NII file.
- affine
numpy.ndarray The affine matrix of the NII volume.
- shape
Iterable[float] The shape of the NII volume.
- mask
numpy.ndarray,optional If not set to
None, the mask is applied to the field.
- src
- Returns
nibabel.Nifti1ImageThe generated NII image.