Hi all, I have a question. In .trk files, I am able to access the co-ordinates of the streamlines with x,y,z co-ordinates. I have the dMRI dataset of dimension 90,108,90,33. I plotted the .trk file of fiber CA using matplotlib library.
The x co-ordinate varies from 14 to -42, y co-ordinate varies from -72 to -74 and the z co-ordinate varies from 35 to 65 and back to 35(the curved portion of the fiber). How does the negative X and Y co-ordinate gets accessed from the diffusion volume?
The TrackVis TRK format is specification documents this format. You have not told us the tool used to load the file, but I assume that the vox_to_ras affine transform has been applied. If this is the case, the values refer to the world space. Assuming this is in NIfTI coordinates the X, Y, Z values refer to -L…+R, -P…+A, -I…+S in millimeters. If the image was aligned to a standard template, the origin (0,0,0) is near the anterior commissure. However, we generally want to keep diffusion images in standard space, so while rigid body transforms might be applied, one would not apply nonlinear transforms, so the alignment to standard templates is constrained. It is also possible the image has not been aligned to standard space, in which case the origin (0,0,0) refers to the isocenter of the MRI scanner.
You might consider loading the surface of the scan to help you visualize the spatial positions. The image below shows the Scripting/Python/Track script included with Surfice which shows a try format tractography file.
Hi @Chris_Rorden I used dipy library functions to load the data using Python 3.