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
,byte
oros.PathLike
The path to the input POS file.
- dst
str
,byte
oros.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.Nifti1Image
The generated NII image.