how to perform whole brain tractography (CSD) by command line

28 views
Skip to first unread message

Muen Hsu

unread,
Jul 11, 2015, 9:39:53 AM7/11/15
to E_...@googlegroups.com
Dear ExploreDTI export,
I would like to perform whole brain tractography (CSD) by command line. which parameters I need to set first ?
sincerely
Jung Lung Hsu

Alexander Leemans

unread,
Jul 14, 2015, 6:23:06 AM7/14/15
to E_...@googlegroups.com, peterh...@gmail.com
Hi Jung Lung Hsu,

I have updated the beta version of the next release so that it includes a function to do the requested (http://www.exploredti.com/ExploreDTI/Pcode/Beta/ExploreDTI_Pcode.zip).

First, construct a structure variable (e.g., "p") that contains the following parameter settings (for details, see http://www.ncbi.nlm.nih.gov/pubmed/23927905):

p.f_in = 'C:\Data\Sub_01_MD_C_native.mat'; % Change to your own input DTI file name.
p.f_out = 'C:\Data\Sub_01_MD_C_native_Tracts_CSD.mat'; % Change to your own output CSD tracts file name.
p.SeedPointRes = [2 2 2]; % Seed point resolution in mm.
p.StepSize = 1;
p.AngleThresh = 30;
p.lmax = 8; % for number of directions below 45 (and above 28), set to "6".
p.FiberLengthRange = [50 500];
p.blob_T = 0.1; % this is the FOD threshold (is somewhat equivalent to the FA threshold with DTI)
p.randp = 1;
p.t = 0.01; % Equal to "PR" variable in http://www.ncbi.nlm.nih.gov/pubmed/23927905.
p.it = 10;  % Number of iterations.
p.suf = 5; % Speed up factor (integer value > 0): 1 = slowest, 2 = faster, etc.(larger than 5, reliability may go down).
p.FA_t = 0.01; % The initial "fat" response function needs a slightly anisotropic shape (realistic range: [0.01 0.1])

Then type:
WholeBrainTrackingCSD_fast_exe_CL(p);

That should do it!

Cheers,
-A


PS: More command-line functionality will follow soonish ;-)!

omri zomet

unread,
Oct 22, 2015, 5:57:57 AM10/22/15
to ExploreDTI, peterh...@gmail.com
Hi,

Is the "p.blob_T" variable equivalent to "Settings->Tractography->Tracking Parameters->FOD threshold" ?
Or does it relate to some other parameter in Edti GUI? (e.g. FOD peak threshold).

Because when I try this parameter (in v484) and the script (in v485) - I get different results (about half the number of tracts and half the file size).

Thanks
Omri

Alexander Leemans

unread,
Oct 22, 2015, 6:15:23 AM10/22/15
to ExploreDTI, peterh...@gmail.com
Hi Omri,

This function was made for v4.8.5. - I have not checked "backwards-compatibility" for it, so I suggest you don't use 4.8.4 for this function.

Cheers,
-A

omri zomet

unread,
Oct 22, 2015, 6:19:15 AM10/22/15
to ExploreDTI, peterh...@gmail.com


Hi,

That I understood.
I meant that I used the "Settings->Tractography->Tracking Parameters->FOD threshold" in v484 (with gui) and "blob_T" in v485 (with script).
I assumed that i will get the same result.

so the question is whether these parameters equivalent?

Alexander Leemans

unread,
Oct 22, 2015, 6:24:22 AM10/22/15
to ExploreDTI, peterh...@gmail.com
I see... Yes, they are the same. I cannot, however, explain why the difference between v4.8.4 and v4.8.5 would be that big... Perhaps I fixed a bug in v4.8.5 ;-)!

Cheers,
-A

Paul Wright

unread,
Oct 22, 2015, 10:54:09 AM10/22/15
to ExploreDTI, peterh...@gmail.com
Hi Alexander

Is p.randp equivalent to the random permutations setting in the GUI? If so, should I set this to zero if I want the scripted version to be the same as the GUI?

omri zomet

unread,
Oct 22, 2015, 11:14:48 AM10/22/15
to ExploreDTI, peterh...@gmail.com
I tried to use FOD threshold of 0.275 in both cases - the difference I see in the output is as follows:
In v4.8.4 (GUI) - in the CSD output file, the Parameters variable has FOD threshold = 0.1
In v4.8.5 (script) - in the CSD output file, the Parameters variable has FOD threshold = 0.275

Seems like the parameter in the GUI doesn't affect the FOD threshold (or it affect another "hidden" variable).
Could it be that there are more parameters that needs to be set in the GUI? 

Alexander Leemans

unread,
Oct 22, 2015, 1:09:53 PM10/22/15
to ExploreDTI, peterh...@gmail.com
Hi Paul,

If "p.randp" is set to "1", seed points will be randomly placed, rather than on a uniform grid (in the GUI, the "random perturbations").

Cheers,
-A

Alexander Leemans

unread,
Oct 22, 2015, 1:16:20 PM10/22/15
to ExploreDTI, peterh...@gmail.com
Perhaps, in the GUI version, the "wrong" FOD threshold setting was used... You should change it in the "HARDI" setting --> "Peak threshold". Hopefully, that solves the mystery ;-)!

Cheers,
-A
Reply all
Reply to author
Forward
0 new messages