Error while running GradQC

Dear Slicer team,

I am trying to run the module GradQC to check the quality of my diffusion data and it’s supposed to be a simple process which should work by giving input as my dwi.nii.gz file and run it but it throws an error as follow. Your support will be highly appreciated.
Thank you.


diffusionQC standard error:

Traceback (most recent call last):
File “/Applications/”, line 57, in
File “/Applications/”, line 572, in run
retcode = inst.main(*tailargs)
File “/Applications/”, line 53, in main
process(self.dwi, self.mask, self.out, self.autoMode)
File “/Applications/”, line 197, in process
hdr, mri, grad_axis, slice_axis, b_value, gradients = dwi_attributes(dwiPath)
File “/Applications/”, line 8, in dwi_attributes
File “/Applications/”, line 503, in read
header = read_header(fh, custom_field_map)
File “/Applications/”, line 247, in read_header
header_size += _validate_magic_line(magic_line)
File “/Applications/”, line 183, in _validate_magic_line
raise NRRDError(‘Invalid NRRD magic line. Is this an NRRD file?’)
nrrd.errors.NRRDError: Invalid NRRD magic line. Is this an NRRD file?

Hi @nabin,

Our tool is NRRD only. As you might already know, Slicer can load only NRRD 4D image, not NIFTI 4D image.

For future reference, here is the Tutorial for GradQC:

However, you can use my NIFTI–>NRRD conversion tool, obtain an NHDR for the NIFTI image you are trying to GradQC and then load the NHDR header seamlessly to perform GradQC on it.

Let me know if you need more help.


Thanks a lot Tashrif. I will try with this converting it to nrrd format.