I’ve executed a fixel-based analysis and now I’m looking for the fiber density value per fixel (per subject) in order to test correlation with another metrics. AFAIK there is no mrtrix3 command that output this value. Nevertheless I’ve managed to track down where I believe this Fixel values are stored in memory (fod2fixel.cpp line 185) and output this values (to stdout) by adding the following code line:
std::cout << in[i].get_integral() << std::endl;
While this outputs what I guess is the apparent fibre density values. I would like to also get the position in the Image of these values. I’ve tried to console output the entire afd matrix but for some reason it fails on the
<< operator. Is there any proper way to read or output these values? or any suggestions on how to modify the code to do so?
I think it sounds like the data you’re after are actually already stored in the files that would be in the
template/fd folder (if you used the same naming conventions as in the FBA instructions) – i.e. the outputs of the
fixelcorrespondence command. You can extract the values from that using the Matlab commands supplied with your MRtrix3 installation (
read_mrtrix.m), or using the mrdump command.
To also extract the positions of these fixels is a bit trickier, there is currently no command to extract the voxel positions within a mask – and even if there were, you’d need to take into account the fact that fixel data can have more than one fixel per voxel… I think your best bet at this stage would be load the template index image into matlab, and refer to the fixel storage documentation for an explanation of what the values mean. It’s not all that complicated, and I reckon this would be a lot simpler than modifying the code, when the information is already there if you know how to interpret it…
Hi, thanks for the response.
Actually I didn’t know about the
mrdump command and, as you said, running it is simpler than modifying the code.
That’s 'cos I’m The Donald!
Sorry, missed that one. Was looking for it with the
mr prefix – forgot to look under the