better handling of undefined strides
better handling of undefined strides

When converting to volume-contiguous format, we want to be able to
preserve the order of the spatial strides as much as possible, so that
conversion back to e.g. NIfTI preserves the strides of the original. For
example:

    $ mrconvert 4D_image.nii -stride 0,0,0,1 4D_image.mif

would produce a volume-contiguous output image, but its strides were
previously set to [ 2 3 4 1 ] regardless of the input image. This might
cause downstream issues and/or confusion if these images are
subsequently used in other packages, if the strides of the original
4D_image.nii weren't [ 1 2 3 4 ] (which they often won't be).

This change means that the strides of the input image are preserved
relative to each other for the first 3 (spatial) axes, so that if
4D_image.nii had strides [ -1 -2 3 4 ], the output 4D_image.mif now has
strides [ -2 -3 4 1 ]. This means a subsequent conversion back to NIfTI:

    $ mrconvert 4D_image.mif -stride 0,0,0,1 new_4D_image.nii

would result in new_4D_image.nii having the same strides as the original
4D_image.nii.

MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3