Fixel_mask error


I am running a fixed-based analysis for single-shell data (processed with the SS3T-CSD). When I try to open the index.mif file with mrview, there is an error " [ERROR] Expecting 4th-dimension size of vector image index.mif to be a multiple of 3. Instead 2 entries found."

The wmfod template has a dimension of 143 x 173 x 143 x 45.

I am wondering what could have gone wrong here…?
Also, as with SS3T-CSD, I am following the multi-shell CSD procedure for the analysis, hope this is the right way to proceed.

Thanks a lot!

1 Like

Hey @xiaobird,

Hope you’re doing well! About the error you’re getting:

So technically what it’s telling you here is that it’s trying to open index.mif not as a fixel file, but as an image with vectors. This is because the fixel plot tool can also show vectors; which might be a bit confusing given they’re loaded via the same button, unlike e.g. the different things to load in the ODF tool. I’ve seen other users be confused about the interface here; the confusion makes sense. The error message in this case has nothing to do with fixels then, because it’s at that point checking the criteria for vector files, which is to require the 4th dimension to have 3, or 6, or 9, or … entries; each time 3 components of a vector. But all of that has nothing to do with your context of course.

Onward to your context then! So it’s basically not recognising it as a fixel index. The fixel format is not a file format strictly: it’s a format defined by a folder that needs to have a few files in it to be valid. The minimum for the fixel tool in mrview to correctly recognise it, is index.mif and a matching directions.mif. I just tried messing a bit on my end by removing directions.mif, or bringing in a non-matching directions.mif; both of these scenarios break it, revert to vector kind of handling, and provide you with the cryptic error you’re getting. So my guess would be that your index.mif and/or directions.mif are “broken” somehow, or directions.mif is missing in the same folder… or mrview can’t see them both.

Now, I remember some of the issues you had a while ago, which eventually seem to have been files that weren’t written completely (i.e. those zeros back then). Did you run fod2fixel on the same cluster system this time? Maybe because of that, either index.mif or directions.mif didn’t get written completely. Or alternatively, they did, but you’re facing a similar problem when mrview is trying to access that file system, and it might not be seeing directions.mif entirely or correctly… Does that make sense?

What I would try and to at least, is to

  1. move your WM FOD template to an offline system (e.g. your local computer or laptop)
  2. inspect it visually with the mrview ODF tool, to check that the template FODs look generally ok, and not overtly erroneous
  3. run fod2fixel on that offline system
  4. try to open it in mrview on that offline system

In any case, you want to indeed inspect the fixel template at that point a few times, potentially using a few thresholds for fod2fixel. But at the same time, it’s a good check to see that the files are indeed in correct working order.

Hope that helps,

Cheers & take care!

Thanks a lot for the thorough explanation, Thijs!
I only downloaded the index.mif and wmfod.mif from the cluster to my laptop for viewing (ssh -Y not working for Mac when using mrview). I think that is why.

1 Like

Ah yes, that will fully explain the issue! My examples above were a bit more intricate, but it comes down to the same point though: all files in a fixel folder belong together generally speaking. So for most purposes, they should be kept together in their folder. The essentials are index.mif and directions.mif. But later in the pipeline, you’ll have fixel folders with more files in them (files that have e.g. each subject’s fixel-wise FD values, etc…).

All good, I think you’ll see that it works if you also download directions.mif and store it in a common folder with index.mif. :relaxed: :+1:

Cheers & have a nice weekend!

1 Like