resample_nii_4dfp#
- petpal.preproc.register.resample_nii_4dfp(input_image_path: str, resampled_image_path: str, mpr_image_path: str, out_image_path: str)#
Resample and rearrange a 3D PET image to mpr space. This function mimics the functionality of converting an image from Nifti to 4dfp and back into Nifti, without using 4dfp tools.
The typical use case would be for multi-modal studies where getting PET data aligned using exactly the same transformation procedures as BOLD data is critical. If, say, transformations have been computed from MPRAGE to atlas space using 4dfp tools, but the MPRAGE has been modified by converting from Nifti to 4dfp and back into Nifti, then the same conversion must be applied to the PET data aligned to anatomical space. This function accurately replicates that conversion.
- Parameters:
input_image_path (str) – Path to PET image on which transform is applied.
resampled_image (str) – Path to image with sampling needed for output. Often rawavg.mgz in FreeSurfer directory.
mpr_image_path (str) – Path to mpr (MPRAGE) image the PET will be transformed to.