Change entire images slices of NIFTI in Python 3.7
问题 I'm actually work on MRI images using Python. The image format is the NIFTI format I get how to visualise slices on x, y or z axe, but now, I want tu use Sobel filtering on each of them and create a new NIFTI image with those slices. For that: I load the main .nii.gz image (img = nib.load(im_path)) I load again the main .nii.gz image with a new name "img_sobel" (img_sobel = nib.load(im_path)) Create a loop for each slice Sobel filtering the slice Replace this slice on the corresponding slice