Forum Replies Created
-
AuthorPosts
-
I was aware of the transformation flags which is how I ruled out that the tracks were in the DWI space.
My question was, how can I recover voxel coordinates of tracks? If the coordinates of the curves in the dft file are in T1 space, normally one inverts the 4×4 T1 affine and applies it to the curve coordinates, but this produced a translation that was not correct. Rather, I had to invert take the inverse of affine(1:3, 1:3) and apply it to curve coordinates.
I verified this by plotting a slice of the T1 space label image with imagesc (transposed & with upside down) and plotting the seeds of all the curves within that slice. The seed points line up nicely with the image, whereas this fails completely with the full 4×4 affine.
I repeat, it would be nice to have confirmation on this as I did not read enough of the source code to confirm 100%.
After some playing around, it seems tracks are saved in t1 space, not diffusion space. As a interesting twist, one has to apply the inverse of the affine w/o translation, i.e. just the 3×3 not 4×4 affine.
Knowing this, obtaining voxel coords & label values is easy.
It would be nice if this were documented somewhere in the file formats section.
I found the DFC file format page and finally understood that the dft file is also this format. I’ve written a Python class to read the curves and now I want to double check: are the coordinates of the tracks in the T1 coordinate system? Or, do I have to apply a diffusion to T1 transform?
In case it is useful for others, I post the short dfc reader I wrote here:
-
AuthorPosts