Hey Frank,
Turns out I did not have cuda toolbox installed on my windows OS. When I tried to run fsl eddy directly from the executable I got a cuda error which pointed me to the issue. Eddy worked just fine in DSI studio after installing the toolbox. I wouldn't have thought to test it that way if you hadn't tested the src i uploaded and gotten it to work on your computer. Thank you!
Now I've run into a few potential issues and I also have a couple of general questions I would love to get your perspective on (let me know if I should re ask them in a separate thread). A basic outline of the current project with questions/issues in bold font below:
The goal of my current diffusion project is to use dsi studio from the command line to automatically identify major white matter bundles at the individual subject level to obtain specific tract bundles and save as 1) nifti files in the subjects native T1 space (to which all other image modalities are being aligned) and 2) as trk files in the subjects native diffusion space (for a separate project).
The pipeline that makes sense to me and the potential issues with dsi studio are listed below:
1-generate src
2-apply topup/eddy to src
3-resample t1 to 1mm isotropic voxel size (acquired voxel size is 0.5 x 0.5 x 1), skull strip, and get brain mask
4-resample dti to 1mm (acquired voxel size is 1.5 x 1.5 x 3) and apply brain mask
5-linear registration of dti to t1 (without shearing) **From the command line, I don't see an option to save transformation matrix for linear transformations (not a huge issue as this can be done with other programs, but I have struggled to apply the inverse of these transforms to trk files and was hoping dsi studio would make this easy for me like the apply_warp and inv-warp option for .tt.gz files for nonlinear transformations. Is this possible)**
6-perform automatic tracking with --action=atk and --trk_format=trk **in your experience, do you think automatic tracking with shape analysis performs better or worse that action=trk (assuming near optimal parameter settings) in subjects with large lesions?**
7-save tracts as nifti in slice space **I don't see the option for this from the command line when doing automatic tracking via --action=atk although this ability is listed as an option when doing --action=trk with the --ref command. Would it be possible to add the --ref command to the atk function to enable saving tracts as a nifit in the t1 space along with the --trk_format option to save also as trk in loaded diffusion space?
8-Apply the reverse linear transformation to the tract.trk files to undo step 4 in order to get the trk files back in their original, pre transformed space (which is needed for compatibility with another processing pipeline). **Does dsi studio have a way of applying linear transformations (or their inverse) to trk files?** I have tried several python scripts with no luck.
In my troubleshooting I've also noticed that --action=reg seems to let the user apply warps to tt.gz files but not to trk or trk.gz files (see examples below). Is this just a limitation of trk files?
Example error when trying to apply warp to .trk file:
Command: dsi_studio.exe --action=reg --apply_warp=CorticospinalTractL.trk --inv_warp=rB0_warp.map.gz > log.txt
Output: [1;34mDSI Studio version: Chen"陳" Mar 19 2024 [0m
├─CUDA Driver Version: 12040 CUDA Run Time Version: 12020
│ │ device count: 2
│ │ device number: 0
│ │ arch: 86
│ │ device name: NVIDIA RTX A4500
│ │ memory clock rate (KHz): 8001000
│ │ memory bus width (bits): 320
│ │ peak memory bandwidth (GB/s): 640.08
│ │ device number: 1
│ │ arch: 86
│ │ device name: NVIDIA RTX A4500
│ │ memory clock rate (KHz): 8001000
│ │ memory bus width (bits): 320
│ │ peak memory bandwidth (GB/s): 640.08
| [0;33mDSI Studio version [0m: Chen"陳" CPU/GPU computation enabled
| [0;32maction [0m=reg
| [0;32msource [0m=
| [0;32mloop [0m=
|- [1;34mrun reg [0m
| | loading warping field
| | [0;32minv_warp [0m=C:\NeuroimagingTools\Data\dti_temp\rB0_warp.map.gz
| | [0;32mapply_warp [0m=C:\NeuroimagingTools\Data\dti_temp\tracks\CorticospinalTractL.trk
| |_368 ms
|_531 ms
(notice no saving of the file)
No error when applying warp to tt.gz file
Command: dsi_studio.exe --action=reg --apply_warp=CorticospinalTractL.tt.gz --inv_warp=rB0_warp.map.gz > log.txt
Output: [1;34mDSI Studio version: Chen"陳" Mar 19 2024 [0m
├─CUDA Driver Version: 12040 CUDA Run Time Version: 12020
│ │ device count: 2
│ │ device number: 0
│ │ arch: 86
│ │ device name: NVIDIA RTX A4500
│ │ memory clock rate (KHz): 8001000
│ │ memory bus width (bits): 320
│ │ peak memory bandwidth (GB/s): 640.08
│ │ device number: 1
│ │ arch: 86
│ │ device name: NVIDIA RTX A4500
│ │ memory clock rate (KHz): 8001000
│ │ memory bus width (bits): 320
│ │ peak memory bandwidth (GB/s): 640.08
| [0;33mDSI Studio version [0m: Chen"陳" CPU/GPU computation enabled
| [0;32maction [0m=reg
| [0;32msource [0m=
| [0;32mloop [0m=
|- [1;34mrun reg [0m
| | loading warping field
| | [0;32minv_warp [0m=C:\NeuroimagingTools\Data\dti_temp\rB0_warp.map.gz
| | [0;32mapply_warp [0m=C:\NeuroimagingTools\Data\dti_temp\tracks\CorticospinalTractL.tt.gz
| | apply warping to C:\NeuroimagingTools\Data\dti_temp\tracks\CorticospinalTractL.tt.gz
| |- [1;34mloading [0m
| | |_49 ms
| | save as C:\NeuroimagingTools\Data\dti_temp\tracks\CorticospinalTractL.tt.gz.wp.tt.gz
| |- [1;34msave trajectories to CorticospinalTractL.tt.gz.wp.tt.gz [0m
| | |- [1;34mcompressing trajectories [0m
| | | |_28 ms
| | |- [1;34msaving file [0m| | | |_279 ms
| | |_313 ms
| |_760 ms
|_951 ms
Sorry for the long post. This is a bit more than I was planning on asking about, but I'm hoping to get these issues squared away soon. As always, that you for your help and incredible responsiveness!!
Travis