Fixelfilter error opening image and loading path as fixel-fixel connectivity data

Hello all,

I tried to run fixelfilter commands from step 22 for smoothing fixel data: https://mrtrix.readthedocs.io/en/latest/fixel_based_analysis/mt_fibre_density_cross-section.html, after running all the previous steps.

I am in the template directory, and when I try to run the commands, I get the following error: [ERROR] error converting string “2952187965” to type “i”
fixelfilter: [ERROR] can’t parse integer sequence specifier “2952187965,1,1”
fixelfilter: [ERROR] error opening image “matrix/fixels.mif”
fixelfilter: [ERROR] Unable to load path “matrix/” as fixel-fixel connectivity data

I checked my matrix directory, and it contains a fixels.mif file, in addition to a index.mif and values.mif, so I’m not sure what the issue is.

Please let me know if you have a solution!
Best,

Ana

Ok, it looks like you’ve exceeded the maximum value that can be stored with a 32 bit (signed) integer. We’ll need to update the code to handle this. I’ve listed the issue on our issue tracker, hopefully we can fix this relatively quickly…

By the way, you have more than 2 billion fixels in that file… That’s about 4 orders of magnitude larger than most studies I’ve seen. Are you sure you need that many? There’s no way you’d be able to run fixelcfestats with that, for instance, you’d need terabytes of RAM for that…

Hi @jdtournier,

I’m confused as well. The fixel files in the fixel_mask directory and in the fd, fc, fdc folders all have around 4.6 million fixels. This is less than 2 billion, but considerably more than the ‘500,000 fixels…and a typical tractogram’ note that I just noted under fixelconnectivity. I’m running on a remote server, so I don’t know how much RAM there is, but fixelconnectivity did run quite fast…

Is it possible that the number of fixels in the fixel data file inside the matrix directory is affected by the number of streamlines for the tractogram? In the midst of running tcksift (which took hours), I recieved this warning:

tcksift: Iteration Removed Remaining Cost fn
tcksift: [ . ] 9627 1 2444990 3.81%

tcksift: [WARNING] filtering has reached quantisation error but desired termination criterion has not been met;
tcksift: [WARNING] disabling cost function quantisation check

is it possible that this left me with that large number of fixels? Or was my original data simply too large/did I probably make a mistake with a previous step? Is there a way to make this smaller?

Thank you so much!

By the way, you have more than 2 billion fixels in that file…

The number of entries in that image is not the number of fixels, but the number of fixel-fixel connections. Following the typical pipeline usually results in ~500K fixels, and around ~500M - 1B fixel-fixel connections. So it’s not hard to see that by having 4.6M fixels - an order of magnitude larger than normal - the number of fixel-fixel connections could easily exceed 2B. This doesn’t cause an issue at the fixelconnectivity stage because the export of that particular image is done using custom code that doesn’t utilise the standard image backend library.

There’s no way you’d be able to run fixelcfestats with that, for instance, you’d need terabytes of RAM for that…

Apart from being orders of magnitude off, fixelcfestats also now requires very little RAM, as long as it can memory-map the previously stored fixel-fixel connectivity matrix. It’s fixelconnectivity that’s the heavy consumer, and the fact that the issue is encountered at the fixelfilter stage suggests that it was in fact successful despite these numbers.

tcksift: [WARNING] filtering has reached quantisation error but desired termination criterion has not been met;
tcksift: [WARNING] disabling cost function quantisation check

This is unrelated. All this says is that the quanitsation check, as described in the SIFT manuscript, which in the absence of the use of a -term_* command-line option results in termination of the algorithm, was disabled, because you explicitly requested that filtering be performed to a greater extent, and it’s therefore doing everything it can to try to reach that desired termination criterion. This error messages regularly causes questions, but I honestly don’t know how to re-phrase the error message without turning it into a paragraph.

Of course, that explains it. No problem. Ignore my ramblings…