resample_nii_4dfp ========================================= .. py:function:: 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. :param input_image_path: Path to PET image on which transform is applied. :type input_image_path: str :param resampled_image: Path to image with sampling needed for output. Often `rawavg.mgz` in FreeSurfer directory. :type resampled_image: str :param mpr_image_path: Path to mpr (MPRAGE) image the PET will be transformed to. :type mpr_image_path: str