Spacing error when running "sct_dmri_moco"

Hello @jcohenadad!

When I run sct_dmri_moco -i dmri.nii.gz -bvec bvecs.bvec -m mask_dmri_mean.nii.gz, I get the following error:

RunError: Warning: bad time point - too little intensity variation0 0
libc++abi.dylib: terminating with uncaught exception of type itk::ExceptionObject: /Users/runner/work/ANTs/ANTs/antsbin/staging/include/ITK-5.1/itkImageBase.hxx:177:
itk::ERROR: Image(0x7fe7de5bee60):
A spacing of 0 is not allowed: Spacing is [0, 0]

Thank you, as always, for your input!

Hi Adriana,

this issue is likely caused by a very small mask and/or large inter-volume motion, so the algorithm cannot converge. The use of mutual information is particularly sensitive to this problem. You have a few options:

  • use flag -param metric=CC
  • increase the size of your mask


Thank you! The flag -param metric=CC worked to resolve the issue!

1 Like