MRtrix3 / mrtrix3

MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
http://www.mrtrix.org
Mozilla Public License 2.0
292 stars 180 forks source link

dwipreproc: Rework odd axis dimension solution #1084

Closed Lestropie closed 6 years ago

Lestropie commented 7 years ago

Currently, if the SE-EPI image series provided to topup has one or more spatial axis with odd dimension, these images are cropped by dwipreproc; if this is not performed, topup crashes when it tries to downsample the images. However the resulting field is currently passed to eddy as-is (and this worked for my testing in the past). This situation now however results in eddy crashing with: "Image Exception : #3 :: Attempted to add images/ROIs of different sizes"

So, a few things then:

What I thought may have been the best approach is:

This however would only work if eddy were to honour the header transformation in the topup output field image (the one containing the spline coefficients). If it doesn't (as I suspect is the case, given that it appears to be concatenating this field with the DWIs), then this approach doesn't work.

So, thinking aloud, here's an alternative:

:face_with_thermometer:

Lestropie commented 7 years ago

OK, this won't work either: It requires the ability to define an arbitrary orientation of the phase encoding direction in DWI image space, but topup doesn't allow the k-component of this direction to be non-zero.

So to make an approach like this work requires loading the field spline coefficients file, applying the estimated rigid-body transform, re-parameteristing the spline, and then saving new coefficients. Which would mean duplicating & augmenting FSL's spline field code... I have to draw a line in the sand at some point. I can fix the issue with odd axis dimensions, but I'm still stumped on #874.

Lestropie commented 6 years ago

Closed by #1159.