Mrtransform does not output same data strides as -template volume

4 years later, I forget about that point and get the same bug (but with mrgrid). Using mrgrid with the -template option will not preserve the strides. For that reason, I still think that it is not a “strict” reslicing operation.

Reading this thread again I fully understand the internal mrview point of view (and the optimization issue) but my point is that it prevents the basic reslicing tool (mrgrid input.nii -template …) to be used outside mrtrix.

There are plenty alternative to perform the reslicing operation (and I pretty sure they all preserve the strides). But I like very much the piping options of mrtrix command (for instance with combination with mrcalc), it is very useful to spare a few “writting to files” steps

So why not keep the same default behavior and add an option to preserve the stride ?
as @jdtournier suggested :

mrtransform in.mif -template template.mif -strides template.mif output.mif

or just an option like
–preserve-stride

2 Likes