Siemens vs Philips dwipreproc eddy ERROR


#1

hello
I processed my Siemens data with MRI trix with no error

when trying to process 32 dir Philips data on the same computer i get this error:

dwipreproc: [ERROR] Command failed: eddy --imain=dwi.nii --mask=mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --out=dwi_post_eddy (dwipreproc:518)
dwipreproc: Output of failed command:
I’m thrown
libc++abi.dylib: terminating with uncaught exception of type EDDY::KMatrixException: KMatrixException: msg=NewSphericalKMatrix::GetHyperParGuess: Unable to find valid hyperparameters

any insight?

thanks


Philips data
#2

I haven’t come across this error message before, but one of the things to watch out for with Phillips data is the overplus option, which leads to terrible DW direction sets, and a really unstable reconstruction. This could be what eddy is complaining about. You can check using dirstat to report on the uniformity of the DW directions (assuming your DWI input contains the DW directions already, i.e. it’s in mif or DICOM format):

mrinfo DWI -dwgrad > grad.b
dirstat grad.b

For comparison, you can compare the stats to the output of gendir:

dirgen 32 dir32.b
dirstat dir32.b

See whether there’s anything suspicious in there…


#3

hi

i get this info:(no success with gendir command)

thanks

mrinfo: [done] scanning DICOM folder "dwi"
mrinfo: [100%] reading DICOM series "DTIHR2.2"
AVNERs-iMac:mau avnermeoded$ dirstat grad.b
grad.b [ 34 volumes ]

b = 0 [ 2 directions ]

  Bipolar electrostatic repulsion model:
    nearest-neighbour angles: mean = 90, range [ 90 - 90 ]
    energy: total = inf, mean = inf, range [ 1.79769e+308 - inf ]

  Unipolar electrostatic repulsion model:
    nearest-neighbour angles: mean = 90, range [ 90 - 90 ]
    energy: total = inf, mean = inf, range [ 1.79769e+308 - inf ]

  Spherical Harmonic fit:
    condition numbers for lmax = 2 -> 0:


b = 1000.02 [ 32 directions ]

  Bipolar electrostatic repulsion model:
    nearest-neighbour angles: mean = 14.1356, range [ 3.95181 - 29.14 ]
    energy: total = 965.894, mean = 60.3684, range [ 53.461 - 81.3348 ]

  Unipolar electrostatic repulsion model:
    nearest-neighbour angles: mean = 16.9999, range [ 3.95181 - 65.0518 ]
    energy: total = 550.503, mean = 34.4064, range [ 19.341 - 48.1956 ]

  Spherical Harmonic fit:
    condition numbers for lmax = 2 -> 6: 1.41426 2.86628 43.1355

Dwipreproc - eddy ERROR
#4

Ok, sorry, that gendir command doesn’t exist any more. It’s called dirgen now. I’ll edit my previous post to correct that.

Otherwise, the thing to focus on in your output is the b=1000 results, specifically the nearest-neighbour angles: you have an average of 14°, with a min & max of 4° & 29°. That’s pretty bad, ideally the min & max would be fairly tight around the mean. This indicates badly distributed directions – as also shown by the condition numbers for the SH fit, these should ideally be close to 1.

Often, poorly distributed directions arise because the people designing the direction set use a unipolar electrostatic repulsion model, rather than the correct bipolar model (which assumes antipodal symmetry). Looking at the results from the unipolar model though, the results are just as bad, so it’s unlikely to have been optimised for a unipolar model either. Which makes it very likely to have been designed for overplus (where the DW gradients use at least two gradient axes concurrently to boost the effective gradient strength by ✓2).

Not a lot you can do about this after the fact, unfortunately… If eddy won’t take it, then you won’t be able to correct for motion and susceptibility distortions that way. Maybe using TORTOISE (as you’re already doing, judging from your other posts) is your best bet…


#5

ok

I know that was an old sequence.

I recently optimized 64 dir sequence:

I appreciate you input:

b = 0 [ 1 directions ]

  Bipolar electrostatic repulsion model:
    nearest-neighbour angles: mean = 180, range [ 180 - 180 ]
    energy: total = 0, mean = 0, range [ 0 - 0 ]

  Unipolar electrostatic repulsion model:
    nearest-neighbour angles: mean = 180, range [ 180 - 180 ]
    energy: total = 0, mean = 0, range [ 0 - 0 ]

  Spherical Harmonic fit:
    condition numbers for lmax = 2 -> 0:


b = 3000 [ 64 directions ]

  Bipolar electrostatic repulsion model:
    nearest-neighbour angles: mean = 17.9947, range [ 17.0526 - 19.4219 ]
    energy: total = 3680.77, mean = 115.024, range [ 114.864 - 115.281 ]

  Unipolar electrostatic repulsion model:
    nearest-neighbour angles: mean = 18.0366, range [ 17.0526 - 19.4219 ]
    energy: total = 2216.61, mean = 69.269, range [ 56.6893 - 78.0923 ]

  Spherical Harmonic fit:
    condition numbers for lmax = 2 -> 8: 1.00277 1.01008 1.02843 1.12454

#6

That looks a lot better, given the explanations in the previous post (which by the way were very clear, thx jdtournier, I’m learning a lot here :slight_smile: )

Does preprocessing work on this data ameoded1?


#7

This is my current optimized sequence,

I processed the data in MRTRIX after TORTOISE

However, scan time is aprox 16 min!!! not to mention the blip up- down. unfortunately no multi-band option for me here, (no D stream)

thank you tbilliet and jdtournier


#8

Just to add a couple of comments here.

Yes, your optimised acquisition does look a lot better. My only suggestion is to check whether the directions are evenly distributed over the whole sphere – this is important to ensure minimal bias due to eddy-current distortions (as recommend on the FSL EDDY wiki). Note that this still means that the directions should be optimised assuming a bipolar electrostatic repulsion model, but that the sign of these directions should subsequently be optimised to ensure near-uniform distribution over the whole sphere (this is what the dirflip command does). The version of dirstat currently on the dev branch now includes an asymmetry metric to check for this.

I say this because your metric currently suggest that your directions are all pointing in the same hemisphere (the nearest-neighbour angles are similar for both the uni and bipolar models). Something to look into…


#9

ok

so I can optimize in the post processing? correct?
no need to change sequence parameters.

Thank you

Avner


#10

Well, what I was saying is that you might want to change the sequence parameters – or at least the diffusion vectors used – to minimise any potential eddy-current induced bias. But that depends on whether your current DW directions are susceptible to bias in the first place. You can check this by checking out the dev branch, and running that version of dirstat, e.g.:

git checkout dev
./build bin/dirstat
dirstat grad.b

and check what the asymmetry index reports. You can then switch back to the master branch like this:

git checkout master
./build

If your acquisition is reported as highly asymmetric, what you do about this is up to you. I’m not sure how big an impact it makes, and there is an option you can pass to eddy that should deal with this (--slm=linear) – see this issue for further details. But you’d at least be aware of it…