SteenMoeller / NORDIC_Raw

Matlab code for performing image reconstruction in MRI and performing the NORDIC denoising
Other
52 stars 24 forks source link

Error with saving relative g factor map #20

Closed MervSingh closed 2 months ago

MervSingh commented 3 months ago

Hi,

Thank you for this great toolbox! I have an issue with saving the relative g_factor map. After specifying the ARG flag: "ARG.save_gfactor_map=1;", I get the following error messages:

Error using images.internal.nifti.niftiImage/writeHeader (line 404)
Cannot open file for writing header.

Error in niftiwrite (line 109)
    [fid, headerBytes] = NV.writeHeader(fid, machineFmt);

Error in NIFTI_NORDIC (line 451)
    niftiwrite((g_IMG),[ARG.DIROUT 'gfactor_' fn_out(1:end) '.nii'])

Any help here would be greatly appreciated!

SteenMoeller commented 3 months ago

There error to me indicates that a folder is specified that you can not save to. In my experience, you are missing a backslash at the end in the name for ARG.DIROUT or maybe you don't have permission so save something in the folder where this is run. The errors means that [ARG.DIROUT 'gfactor_' fn_out(1:end) '.nii'] can not be opened as a file. Check what that creates and if that is sufficient to solve the issue

MervSingh commented 2 months ago

Thank you for the response! It turned out that I had to create a separate "gfactor" subfolder in order for it to successfully estimate and save the g factor map.