twix2nifti_affine#

mrinufft.io.twix2nifti_affine(twixObj: TwixObj) → NDArray[source]#

Calculate the affine transformation matrix from Siemens Twix measurement.

Parameters:

twixObj (TwixObj) – The turbotwix measurement.

Returns:

The affine transformation matrix which is a 4x4 matrix. This can be passed as input to affine parameter in nibabel.

Return type:

np.ndarray

See also

siemens_quat_to_rot_mat

Calculate the rotation matrix from Siemens Twix quaternion.

read_siemens_rawdat

Read raw data from a Siemens MRI file, use return_twix=True to get the twix measurement.

read_arbgrad_rawdat

Read raw data from a Siemens MRI file from neurospin, use return_twix=True to get the twix measurement.