here is my code ,the output image slices are all just a part of one slice ,
import nibabel as nib
import matplotlib.pyplot as plt
from nibabel.processing import resample_to_output
from_img = nib.load(“AX_T2_TSE_2024520_20_i006.nii.gz”)
from_img_resampled = resample_to_output(from_img,(1,1,1))
nib.save(from_img_resampled,”from_img_resampled2.nii.gz”)
fig, ax = plt.subplots(1, 2)
ax[0].matshow(from_data[:, :, from_data.shape[-1] // 2])
ax[1].matshow(from_img_resampled.get_fdata()[:, :, from_img_resampled.shape[-1] // 2])
plt.show()
enter image description here
enter image description here
i tried mani voxel size but the same result
Tayssir Boushila is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.