Open steevelaquitaine opened 9 years ago
Until this is fixed you can re-download the .nii.gz files from NIMS, those files un-archive correctly into .nii files.
Yes don't worry I did
You should be able to load compressed nifti files (*.nii.gz) by doing:
[d h] = mlrImageLoad(‘filename.nii.gz’);
Then save it back uncompressed:
mlrImageSave(‘filename.nii’,d,h);
Also, I just fixed mrLoadRet so that it recognizes that you can load compressed nifti files, so you should be able to load from File/Base Anatomy/Load.
When you say you “clicked” on the files and got “.cpgz” files - I assume that means you clicked with the mouse from the finder? I wouldn’t do that ;)…
-j.
On Aug 6, 2015, at 1:33 PM, Steeve Laquitaine notifications@github.com wrote:
dofmricni loads Inplane anatomies that are not unarchived (format .nii.gz). Clicking the files then produces .nii.gz.cpgz files. We cannot load the files as base anatomy.
— Reply to this email directly or view it on GitHub https://github.com/justingardner/gru/issues/5.
Yes I clicked with the mouse. Ok. Thanks !
This fix doesn't work for me, I think that the files may be getting corrupted somewhere along the pipeline:
gunzip: anat01_10259_2_1_T1w_12mm_ax.nii.gz: not in gzip format
(cbiReadNiftiHeader) Incorrect header size (should be 348 bytes) for file anat01_10259_2_1_T1w_12mm_ax.nii
(mlrImageHeaderLoad) Could not load header for anat01_10259_2_1_T1w_12mm_ax.nii
Re-downloading the file and clicking in the finder works fine by the way, so something is definitely going wrong somewhere in dofmricni
Hmm, to add to the strangeness of this error it only occurs in some scans, some of my scans are unaffected... (i.e. the anat.nii file is already there unpacked)
What scan is an example of the problem?
s0300, scan 20150729, exam # 10255
I ran dofmricni on exam 10255 and the anat file came out ok. wtf?
Yeah that confirms my suspicion that the bug is fairly random. I get it in like 1 of 3 runs in all my data. Doesn't seem to be any consistency to what causes it.
dofmricni loads Inplane anatomies that are not unarchived (format .nii.gz). Clicking the files then produces .nii.gz.cpgz files. We cannot load the files as base anatomy.