I like to edit the headers of some Gzipped NIfTI files. Since nifti_tool can’t modify Gzipped NIfTI, I extracted them. But, I like to compress them after modifications. So, I tried to pass .nii.gz extension to prefix in nifti_tool. An example:
nifti_tool -mod_hdr -prefix dnew.nii.gz -infiles dset0.nii -mod_field dim ‘4 64 64 20 30 1 1 1 1’
nifti_tool reported an error, even though the dnew.nii.gz file was successfully created.
** ERROR (write_hdr_to_file): failed to re-open mod file ‘dnew.nii.gz’
Can I request nifti_tool to support modifying Gzipped NIfTI natively?
What is the “failed to re-open mod file” error?