Hi Mahdi
can you run mri_info in a Linux shell on that file and send us the entire screen output?
cheers Bruce On Sun, 29 Dec 2019, mahdi mahdavi wrote:
External Email - Use Caution
Hi. I'm a medical student and I'm trying to use the QuickNATv2 MATLAB code for structural MRI segmentation for a paper. However, at the last step when I want to execute the Run command for this program, it returns an error related to MRIRead function from freesurfer. I'm, using windows so I Cloned freesurfer library from github and defined its path for MATLAB. The error is: SWITCH expression must be a scalar or a character vector; the MRI data is a .mgz file:
Error in load_mgh (line 166) switch type
Error in MRIread (line 94) [mri.vol, M, mr_parms, volsz] = load_mgh(fspec,[],[],headeronly);
Error in RunFile (line 15) DataVol = MRIread([DataPath,FileName]); I've also tried using linux shell for windows 10 and installed the freesurfer with it but i still get the same error. I didn't find any helpful guides on various forums so I'm mailing you hoping to find a solution cause I really need to run the QuickNAT for a paper. Regards Mahdi