Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Visualization problem with tensors ? #1396
I did an experiment with 2 gradient tables. The second gradient table is the same than the first but with x and y flipped (-x and -y).
I computed the tensors and tried to plot 3 slices (coronal, axial and sagittal) using vtk as shown in the examples.
I can see that I get different eigen vectors for the 2 gradient tables when I print them.
I am not sure to understand how I can get the same tensors oriented the same way when my evecs are not in the same direction ? If I would have a flip in the 3 axes, it would obviously be the same direction, but not if only 2 out of 3 are flipped ? I did the same processing with MRtrix and there is a clear flip in sagittal when I plot the tensors with mrview.
I assume it's the way I am plotting my tensors, but I can't figure out what's wrong.
For the other planes, I am making sure to give it as a NxMx1x3 or NXMx1x3x3 like so:
Doing that, the tensors look exactly the same in the 3 planes, even though the gradients are suppose to be flipped in x and y and that the evecs are not the same (some signs are different). Any idea what I am doing wrong ?
Also, is there a way to put the corresponding FA slice under the tensors so it's easier to look at ? I tried adding an actor using vtk.add(ren, fvtk.slicer(fa[:, :, 28])) before the tensors, but the FA is not at the right place under the tensors.
Thank you very much for your help :)