Input images format to nyul-normalize #63
-
I am working with a t1 MRI dataset which came originally in .mat files. I have extracted the images and saved them as .pngs. Now I am trying to run nyul-normalize from the command line interface but am getting an assertion error "assert len(images) > 0". Which format should the images be in ? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @juliadietlmeier, the images should be in a common medical image format, e.g., NIfTI, DICOM, PAR/REC. For simplicity, I would choose NIfTI. To convert the images to NIfTI, you might want to use the .mat file to either extract the image volume and save the image as NIfTI with, e.g., nibabel. If the slices are saved in individual .mat files, then you'll want to extract all the images into memory, concatenate them into a volume, and then do the conversion as stated previously. The documentation on nibabel will be a useful resource for this; there are MATLAB packages that do similar things, but I'm not familiar with them. Just search "medical image nifti [insert your preferred programming language here]" and look for relevant libraries and their corresponding documentation for information. Good luck! |
Beta Was this translation helpful? Give feedback.
Hi @juliadietlmeier, the images should be in a common medical image format, e.g., NIfTI, DICOM, PAR/REC. For simplicity, I would choose NIfTI. To convert the images to NIfTI, you might want to use the .mat file to either extract the image volume and save the image as NIfTI with, e.g., nibabel. If the slices are saved in individual .mat files, then you'll want to extract all the images into memory, concatenate them into a volume, and then do the conversion as stated previously.
The documentation on nibabel will be a useful resource for this; there are MATLAB packages that do similar things, but I'm not familiar with them. Just search "medical image nifti [insert your preferred programming …