Using an alternative contrast for autotrack registration

63 views
Skip to first unread message

Matthew Cieslak

unread,
Jul 9, 2024, 12:57:47 PMJul 9
to DSI Studio
Hi Frank!

We've been trying out autotrack on FODs created in mrtrix. It seems to work quite well, but we were wondering if it might be possible to instruct autotrack to use a contrast other than fa0 to perform the registration to the template?

Here's some example data:
Screenshot 2024-07-09 at 12.55.41 PM.png
In our conversion from MRtrix to DSI Studio the fa0 from the FODs (left) is much noisier than the fa0 from the GQI fit (right). Do you think this is bad enough to affect registration?

I was thinking it could be nice to put the GQI fa0 into the mrtrix fib file and use that for registration and the FOD amplitudes as the faN for tractography. What do you think?

Thanks as ever!

Frank Yeh

unread,
Jul 9, 2024, 1:09:40 PMJul 9
to mattc...@gmail.com, DSI Studio
(This is an exciting hybrid approach!)

Hi Frank!

We've been trying out autotrack on FODs created in mrtrix. It seems to work quite well, but we were wondering if it might be possible to instruct autotrack to use a contrast other than fa0 to perform the registration to the template?

Yes, just replace the fa0 in the FIB file with the FODs.
 

Here's some example data:

In our conversion from MRtrix to DSI Studio the fa0 from the FODs (left) is much noisier than the fa0 from the GQI fit (right). Do you think this is bad enough to affect registration?

It is good enough, but isotropic is also critical because FOD and QA (i.e. fa0) does not have gray matter contrast. The registration will be off at the cortex without iso.
 

I was thinking it could be nice to put the GQI fa0 into the mrtrix fib file and use that for registration and the FOD amplitudes as the faN for tractography. What do you think?

Good point. You may save fod0, fod1, fod2...in the FIB file and the anisotropy threshold at the Step T3c Option should be able to select fod as the tracking threshold.

BTW, there is going to be a major update on DSI Studio soon (i.e. the Hou version), and the registration methods is modified to improve accuracy. there are also many other changes. The Release on github has the new version as the pre-release, but the DSI Studio website is still offering the Chen version.

Best,
Frank



Matthew Cieslak

unread,
Jul 9, 2024, 2:31:48 PMJul 9
to DSI Studio
Oh awesome! Just to be sure I can implement this, I would

1. Store the FOD amplitudes in variables in the fib file called `fod0`, `fod1`...`fodN`, which will correspond to the directions in `dir0`, `dir1`...`dirN`
2. Copy the `fa0` and `iso` data into the fib file from the GQI fib
3. Specify on the commandline(?) to use "fod" as the tracking method.

Is there a command line way to specify that we should use "fod"?

Frank Yeh

unread,
Jul 9, 2024, 3:25:55 PMJul 9
to mattc...@gmail.com, DSI Studio


1. Store the FOD amplitudes in variables in the fib file called `fod0`, `fod1`...`fodN`, which will correspond to the directions in `dir0`, `dir1`...`dirN`

Yes.
 
2. Copy the `fa0` and `iso` data into the fib file from the GQI fib

and also fa1, fa2, fa3.. faN
 
3. Specify on the commandline(?) to use "fod" as the tracking method.

--threshold_index=fod
(if not work, I will fix it) 

Is there a command line way to specify that we should use "fod"?

On Tuesday, July 9, 2024 at 1:09:40 PM UTC-4 Frank Yeh wrote:
(This is an exciting hybrid approach!)

Hi Frank!

We've been trying out autotrack on FODs created in mrtrix. It seems to work quite well, but we were wondering if it might be possible to instruct autotrack to use a contrast other than fa0 to perform the registration to the template?

Yes, just replace the fa0 in the FIB file with the FODs.
 

Here's some example data:

In our conversion from MRtrix to DSI Studio the fa0 from the FODs (left) is much noisier than the fa0 from the GQI fit (right). Do you think this is bad enough to affect registration?

It is good enough, but isotropic is also critical because FOD and QA (i.e. fa0) does not have gray matter contrast. The registration will be off at the cortex without iso.
 

I was thinking it could be nice to put the GQI fa0 into the mrtrix fib file and use that for registration and the FOD amplitudes as the faN for tractography. What do you think?

Good point. You may save fod0, fod1, fod2...in the FIB file and the anisotropy threshold at the Step T3c Option should be able to select fod as the tracking threshold.

BTW, there is going to be a major update on DSI Studio soon (i.e. the Hou version), and the registration methods is modified to improve accuracy. there are also many other changes. The Release on github has the new version as the pre-release, but the DSI Studio website is still offering the Chen version.

Best,
Frank



--
You received this message because you are subscribed to the Google Groups "DSI Studio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/2e2cb856-7c59-409f-8d84-291d5581f734n%40googlegroups.com.
Message has been deleted
Message has been deleted

Matthew Cieslak

unread,
Jul 12, 2024, 1:55:46 AMJul 12
to DSI Studio
It looks like --threshold_index works for --action=trk, not --action=atk. Would it be relatively easy to add it to atk?

Also for the record I was using `dir0`, `dir1` above but should have been `index0`, `index1`, etc.

Matthew Cieslak

unread,
Jul 12, 2024, 1:55:51 AMJul 12
to DSI Studio
Hi Frank,

It looks like the flag is only supported for general tractography and not autotrack. Could you please add the flag for autotrack too?

Thanks again,

Amelie R

unread,
Jul 12, 2024, 1:55:54 AMJul 12
to DSI Studio
Hi Frank,

I am currently working with Matt and will briefly tune in.

I have adjusted a FIB file as Matt and you discussed above and it can be read and displayed in the DSI Studio GUI. But when I try to run autotrack in the command line using the --threshold_index=fod option I get the following warning: 'WARNING: --threshold_index is not used/recognized. Did you mean --thread_count ?'.
This is the full command I was running to see if I can get it to work: dsi_studio --action=atk --source=*.fib --track_id=Commissure_CorpusCallosum_Body --yield_rate=0.000001 --threshold_index=fod

The command will still run despite the warning but from looking at the outputs I'm pretty sure it uses the faN for tracking instead of the fodN.

Thank you for your help!
Best,
Amelie

Frank Yeh

unread,
Jul 12, 2024, 8:00:47 AMJul 12
to amelie....@gmail.com, DSI Studio
Sorry for the delayed reply.
I added code to support threshold_index at --action=atk and the update is with the new Hou release, a major revision at pre-release stage. Currently it may have some bugs (still testing).

You may get it from github's latest version. 
DSI Studio website's download page still directs to the Chen release.

Best,
Frank

Matthew Cieslak

unread,
Jul 12, 2024, 9:37:35 AMJul 12
to fran...@gmail.com, amelie....@gmail.com, DSI Studio
Hi Frank,

My sincere apologies for double posting earlier, the google group page was saying that my message was deleted so I reposted. I hope you didn't feel bombarded with feature requests.

We will try this out right away! A couple questions about the Hou release - QSIPrep currently bundles the DSI Studio from the commit immediately after you changed the NDC calculation. 
  • Is the current QSIPrep version mostly the Hou release? Or more similar to Chen?
  • Do you think it would make sense to bundle the current commit in QSIPrep or would you prefer to wait for more Hou testing?
  • It looks like most of the changes happen in the GUI. Do you think there will be many commandline changes in Hou too?

Thanks as ever, and sorry again for the reposts.

You received this message because you are subscribed to a topic in the Google Groups "DSI Studio" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dsi-studio/emMz-K8ewlo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dsi-studio+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/CAG_QrtKmVbTgOaQTee5yHEmc%2Bz5_8Fv84mTvpLpohdDuZCuXQw%40mail.gmail.com.


--
Matt

Frank Yeh

unread,
Jul 12, 2024, 10:16:17 AMJul 12
to Matthew Cieslak, amelie....@gmail.com, DSI Studio
No problem at all!

I had to turn on the post moderation function because of increasing spam.
Unfortunately, non-member's posts will wait for my moderation to show up in the forum.
I am sorry for the delay and hassle.


My sincere apologies for double posting earlier, the google group page was saying that my message was deleted so I reposted. I hope you didn't feel bombarded with feature requests.

We will try this out right away! A couple questions about the Hou release - QSIPrep currently bundles the DSI Studio from the commit immediately after you changed the NDC calculation. 
  • Is the current QSIPrep version mostly the Hou release? Or more similar to Chen?
The major revision of Hou started at 2024/06/02. If you bundle anything after then, then it is going to be Hou. 
 
  • Do you think it would make sense to bundle the current commit in QSIPrep or would you prefer to wait for more Hou testing?
If the majority function used is atk, then it should be fine to use Hou.
 
  • It looks like most of the changes happen in the GUI. Do you think there will be many commandline changes in Hou too?
The CLI are mostly consistent unless there is a need to fix something. The registration method, especially the nonlinear registration, is different. GUI at the main window is entirely different.  There are also numerous minor fixes, and I am still checking the consistency with the Chen.

Best,
Frank

Matthew Cieslak

unread,
Jul 12, 2024, 11:14:47 AMJul 12
to Frank Yeh, amelie....@gmail.com, DSI Studio
The version in QSIPrep is from 4/2024, so it will be closer to Chen than Hou.

What do you think about an alternative approach where 

  1. The registration is done with a gqi fib file
  2. The FODs are stored in a different fib file under the faN variables
  3. the mapping file is renamed to match the FOD-containing fib file name
  4. Autotrack is run on the FOD-containing fib file
Would this work?
--
Matt

Frank Yeh

unread,
Jul 12, 2024, 12:39:35 PMJul 12
to Matthew Cieslak, amelie....@gmail.com, DSI Studio

The procedure should also work on Chen, but would need two FIB files. It will be a temporary solution.

Hou should also work and would do 
 better on large lesions like tumor or stroke. The FODs can store in the same FIB for atk.

I would say upgrading to current Hou version should be a good option as it has passed most testing. 

It just needs a test on your pipeline sample to make sure it doesn't break anything.

If I spot a potential major bug, I will also reply this thread so that you can update it.

Best
Frank

Matthew Cieslak

unread,
Jul 12, 2024, 4:02:57 PMJul 12
to Frank Yeh, amelie....@gmail.com, DSI Studio
I went ahead and added the current commit to the qsiprep build and it looks like some of the commandline arguments have changed (eg https://app.circleci.com/pipelines/github/PennLINC/qsiprep/1954/workflows/f32a4a02-bdb3-4636-9135-536cbaf84d24/jobs/23645?invite=true#step-104-51069_16)

Is the online documentation for the CLI updated for the Hou version?
--
Matt

Frank Yeh

unread,
Jul 12, 2024, 9:22:16 PMJul 12
to Matthew Cieslak, amelie....@gmail.com, DSI Studio
Yes, the qa part now needs to specify whether it is to qc SRC (default) or FIB (--is_fib=1).
I am going to update the document.
Thanks for catching that.
Frank

Matthew Cieslak

unread,
Jul 20, 2024, 11:20:49 AM (7 days ago) Jul 20
to Frank Yeh, amelie....@gmail.com, DSI Studio
Hi Frank,

I haven't had any luck with adding the --is_fib=0 argument:

dsi_studio --action=qc --is_fib=0 --source=${PWD}/sub-PNC_acq-realistic_dwi_LAS_merged.src.gz
DSI Studio version: Hou "侯" Jul 12 2024
┌──command line
├──source=/scratch/qsiprep_0_21_wf/sub_PNC_wf/dwi_preproc_acq_realistic_wf/pre_hmc_wf/dwi_qc_wf/raw_src
/sub-PNC_acq-realistic_dwi_LAS_merged.src.gz
├──action=qc
├──loop=/scratch/qsiprep_0_21_wf/sub_PNC_wf/dwi_preproc_acq_realistic_wf/pre_hmc_wf/dwi_qc_wf/raw_src/s
ub-PNC_acq-realistic_dwi_LAS_merged.src.gz
├──┬──run qc
│  ├──is_fib=0
│  ├──/scratch/qsiprep_0_21_wf/sub_PNC_wf/dwi_preproc_acq_realistic_wf/pre_hmc_wf/dwi_qc_wf/raw_src/sub
-PNC_acq-realistic_dwi_LAS_merged.src.gz=                                                               
│  ├──❌no SRC file found  
│  └──⏱0ms
└──⏱3ms
 

is there a different way to specify it?

--
Matt

Frank Yeh

unread,
Jul 20, 2024, 12:13:08 PM (7 days ago) Jul 20
to Matthew Cieslak, amelie....@gmail.com, DSI Studio
This was a bug (fixed).
You may update DSI Studio and see if it works.
Sorry about the hassle.
Reply all
Reply to author
Forward
0 new messages