Dwipreproc error invalid block type

Hi Everyone,

I am trying the dwipreproc script using rpe_header option as such

foreach TDI-study/* : dwipreproc IN/denoised.mif IN/preproc.mif -rpe_header

This has completed only for odd numbered subjects and failed for even numbered subjects ie. 2, 4, 6,8…

The error is as

dwipreproc: [ERROR] Command failed: mrconvert dwi_post_eddy.nii.gz result.mif -stride -2,-3,4,1 -fslgrad      
dwi_post_eddy.eddy_rotated_bvecs bvals (dwipreproc:561)
dwipreproc: Output of failed command:
mrconvert: uncompressing image "dwi_post_eddy.nii.gz"...  [===============]
 mrconvert: [ERROR] error reading from file "dwi_post_eddy.nii.gz": dwi_post_eddy.nii.gz: invalid stored block   

So I looked into the the temp directory and found the dwi_post_eddy.nii.gz file.

This file cannot be read by mrview but it can be read by fslview

Can some one throw light onto what may be causing this error.

Kind regards.

1 Like

The invalid stored block lengths error seems to originate from the zlib decompression routines. That would suggest the input file (dwi_post_eddy.nii.gz) is somehow corrupt - possibly truncated, maybe due to running out of disk space? What is surprising is that fslview would be able to read it when mrview can’t. Can you try decompressing the file with a regular utility like gunzip, see if that works…? If manual decompression works, maybe you can send me the file and I’ll see if I can reproduce the error.


Yes you are right. I was running out of disk space.

It is working now.

Many Thanks.

Kind regards.

1 Like

:sweat_smile: phew! That’s a relief…