Open hanhanminnan opened 2 years ago
Hi, I usually use NiBabel for loading and converting .nii
files
Here is their website: [https://nipy.org/nibabel/gettingstarted.html]
You can do something like this:
example_filename = os.path.join(data_path, 'example4d.nii.gz')
img = nib.load(example_filename)
Please let me know if you have other questions
To begin with, thank you for sharing your code! I mention that the file format needed for training is npy files. It is confusing for me how to convert my MRI data(a nii file) into a proper npy file.