New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Silently) produces .nii (not .nii.gz) despite -z i switch #124
Comments
@yarikoptic - I note you are running an older version of dcm2niix: recent versions do provide a warning: Prior to today, this was limited to 2Gb for the internal compressor. I have just updated this to support files up to 3758096384 bytes for 64-byte compiles. However, I have not tested this, so please try it out. By the way, if you use the external compressor, the maximum uncompressed input size is limited to |
@yarikoptic and @satra - you may want to consider adding pigz as a dependency for heudiconv. While my software includes a serial compressor that works if pigz is missing, unless you are working with network storage you will find pigz is dramatically faster. My software looks for "pigz" in the user path, but will fall back to "pigz_afni" or "pigz_mricro" in the same folder as dcm2niix. Since compression takes longer than all the other stages combined, including pigz dramatically accelerates processing. |
Thank you! I will try recent version. |
And yeah, I love pigz as well... Usually I just symlink it to be gzip in my PATH ;-) I guess we indeed should switch to use/recommend it |
I think having large gz files fail on tools could have many catastrophic effects for users. Pipelines that use many different tools would be at the mercy of the weakest link, and tools may fail in non-obvious ways (e.g. only processing initial volumes). As a personal preference, I would advise most users to stick with nii instead of nii.gz for the initial DICOM to NIfTI data conversion. Due to poor SNR, gz does not compress raw data well. I do think that nii.gz makes a lot more sense after scalp stripping (e.g. bet), where there is a lot more redundancy in the images. This results in more efficient compression and faster decompression. One thing to consider is if you want to use drive-level disk compression (e.g. NTFS compression) rather than file level compression (e.g. .gz). This is transparent to the software. |
yeap -- but how do you expect to encourage/facilitate/push developers of those tools to fix them up to be ready to deal with growing data sizes if they otherwise would not even be aware? so IMHO it would be counterproductive and, again, could always be worked around by uncompressing them IF a particular software cannot handle them
[bids@rolando heudicon-eshin-run1] > zcat func.nii.gz > func.nii
[bids@rolando heudicon-eshin-run1] > du -scm func.nii*
1986 func.nii
802 func.nii.gz
2788 total so 60% reduction in size is imho worthwhile ;)
I love those too BUT they need to balance between compression ratio and IO performance so often their compression ratio is not as good as achieved by a dedicated compressor run, e.g. here is those files on ZFS [bids@rolando BIDS] > du -scm func.nii*
1328 func.nii
803 func.nii.gz so only 35% reduction in size for func.nii as compared to 60% for .nii.gz |
FWIW, |
Compiler switch "-dmyDisableGzSizeLimits" will generate GZ files regardless of size, otherwise GZ limited to ~4Gb
I have added a new compiler directive |
* commit 'v1.0.20170818-8-gdd1d994': Fix for rordenlab#124
@yarikoptic Does that ZFS dataset have gzip-9 set as the compression method? ---Alex |
Unlikely (I am not administrator on that one), isn't it cpu heavy and rarely recommended (unless for backup)? That is what I meant by talking about tradeoffs |
although works correctly for another run (didn't compare if of the same kind, but sizes differ, not my data)
what could be a culprit?
The text was updated successfully, but these errors were encountered: