Mrresize Invalid argument Error

Hi there,

I am following tutorial on fixel-based analysis; thus I am upsampling by a factor of 2 all preprocessed dwi images. However, for one subject I get an error: after typing

mrresize Prepro_dwi.nii -scale 2.0 Upsampled_dwi.mif

I get the following:

mrresize: [ERROR] cannot resize file "Upsampled_dwi.mif": Invalid argument
mrresize: [ERROR] error creating image "Upsampled_dwi.mif"

mrinfo seems to be ok:

$ /home/User/mrtrix3/release/bin/mrinfo Prepro_dwi.nii
************************************************
Image:               "Prepro_dwi.nii"
************************************************
  Dimensions:        160 x 160 x 80 x 71
  Voxel size:        2.00532 x 2.01128 x 2.00018 x 1
  Data strides:      [ -1 2 3 4 ]
  Format:            NIfTI-1.1
  Data type:         32 bit float (little endian)
  Intensity scaling: offset = 0, multiplier = 1
  Transform:               0.9992      0.0071    -0.03981      -157.3
                        -0.006844      0.9999   -0.006512      -158.5
                           0.0393    0.007708      0.9992      -93.72
  comments:          FSL5.0

Dataset looks fine, and for other subjects everything works fine.
Any clue why this error shows up?

Best Regards,
Alessandro

Hi @Alessandro,

That’s quite strange: the error being given there is not actually being reported by a functionality native to MRtrix3, but a very low-level function ‘ftruncate()’ that’s responsible for changing the size of a file on disk.

This could be caused by running out of hard drive space; but I wouldn’t expect this to be reproducible for one particular subject (unless it happens to be the last subject in your cohort and you’re really unlucky), and I’d expect it to give a more informative error in that instance.

Is there anything else particularly unusual about that subject? An exotic character in the directory path, perhaps? Can you create new images in that directory just using e.g. mrconvert?

Hi @rsmith,
thanks for answering and sorry for delayed reply.
My hard drive space was almost full when I run the commands; i will try to repeat analysis with another workstation and let you know if the same error appear.
Path was not very different from those of other subjects.
Thanks for your suggestion,

Best,
Alessandro