Tckgen Segmentation fault

Dear all, I am experiencing segmentation fault error while running tckgen with act:

tckgen FOD.mif 100M.tck -act 5TT.mif -backtrack -crop_at_gmwmi -seed_dynamic FOD.mif -maxlength 250 -number 100000000

tckgen: [100%] resampling ACT 5TT image to fixel image space…
tckgen: [100%] Segmenting FODs…
tckgen: [100%] Segmenting FODs…
Segmentation fault: 11

tckgen runs without problem when I remove ACT-specific options:

tckgen FOD.mif 100M.tck -seed_dynamic FOD.mif -maxlength 250 -number 100000000
tckgen: [100%] Creating homogeneous processing mask…
tckgen: [100%] Segmenting FODs…
tckgen: [100%] Segmenting FODs…
tckgen: [ 0%] 87411 generated, 77605 selected

My first guess was that something is wrong with tissue maps but 5TT.mif looks fine.

Hmmm, that’s an unusual one; it looks like the ACT-specific initialisations are actually completing, but it’s failing when it tries to generate the first streamline. I’ll have a go at reproducing the problem, but if I can’t, I may need you to provide me with the FOD.mif and 5TT.mif images. Also, can you confirm that you’re using the master code branch, with the most up-to-date code?

Unfortunately I haven’t been able to reproduce this fault on data I have at hand, so I will need to get a copy of those images. I’m guessing from the -maxlength 250 option that it’s HCP data? Anyway, if you can host those files somewhere and share it to the email in my profile, I can have a closer look.

Hi Rob,

Thank you for a quick reply. I sent you files over email.

As for the code branch, I used “git clone” and installation was performed on Jan 29th. Is it safe to assume it was the proper branch?​

The data is not from HCP but I am trying to reproduce the pipeline from ISMRM workshop.


Hi Anna, thanks for the files.

The standard way of getting access to the code will access what is referred to as the ‘master’ branch; so yes, that’s what you’re using. When we do code developments, this occurs in separate code branches, so that our tinkering hopefully doesn’t introduce major bugs into what users are downloading. The reason I asked is that we have a major update on the way, and some users have been testing that branch, and it may have influenced what kind of bug I was looking for if that were the case for you.

The problem is in the header of the FOD image:

Transform: 1 0 0 1.211e+004
-0 1 0 -1.233e+00
-0 0 1 -1.233e+00
0 0 0 1

Your FOD image is to the right of your anatomical image by about 10 metres :-/ Not sure what could have introduced this, you’ll have to go back to your input data to trace it.

Basically if you do tracking using the diffusion image alone, everything just proceeds happily in this offset space; but if you combine it with the 5TT image, there’s no spatial overlap between the two, so things go awry. Actually, if you define just a WM seeding mask based on the 5TT image, it gives a more useful warning (‘filed to find suitable seed point after 100000 attempts’); it’s the dynamic seeding that’s failing catastrophically, I’ll have to look into stopping that.

Have fun!