I’ve been playing around with *.mif.gz files for a little while now. I’m not sure if its a supported file format, but it seems to work and saves me a lot of disk space.
However, there is one area where I run into some trouble, and that is when I am calling the revpe_distcorr script. I get an error from this command within the script:
mrconvert series_after.nii.gz result.gz -stride -1,-2,3,4 -fslgrad bvecs bvals
The error probably has to do with how “result.gz” isn’t an imaging file format. If I chance “result.gz” to “result.mif.gz” or “result.nii.gz”, the command completes successfully. Is there something wrong with my setup? The command is being run on the latest version (as of yesterday) master branch of mrtrix3.
Thanks for the report. That’s a bug rather than anything wrong with your system / setup. The script writes the final output file (within the temporary directory) with the same image format as the user-specified output file path; that way it can just move the file from the temporary directory to the final destination. But Python’s separation of the file name and file type extension is extracting ‘.gz’ rather than ‘.mif.gz’.
The big MRtrix update that’s not far from being pushed out to all users doesn’t use this technique, and won’t suffer from this problem. So for now, I’d suggest just using a non-compressed format as the script output; it can then subsequently be compressed using a call to
mrconvert if you wish. The problem will sort itself out naturally with the coming update that we keep promising…