You’d need to run dwi2fod
again with the updated encoding, but you should be able to use the same response you estimated earlier.
The whole point of that command is to invert the Z component… Note the -$3
in there. That’s the most likely problem with your current encoding file, this command is trying to fix it. See e.g. here for a intro to using awk - there’s plenty of tutorials online if you just search for them.
But just to complete these instructions, what you’d need to do is take the output and paste it into a new grad_fixed.b
file. The simplest way to do this is to use I/O redirection, like so:
$ cat encoding.b | awk '{ print $1, $2, -$3, $4; }' > encoding_fixed.b
You can then try using that encoding_fixed.b
file instead of your old one in dwi2fod
, see whether that fixes things…
If it doesn’t work, you might need play around with that command by trying to invert other components (e.g. using -$1, $2, $3, $4
will invert the x component) or swapping then around (e.g. $2, $1, $3, $4
will swap x & y).