Print

Print


Hi Moises,

I’ve taken a look at those file. They both seem fine to me. dyads1.nii.gz seems to be oriented correctly and mean_fsumsamples’s values are between 0 and 1 with a long right tail. Is this how its values are expected to be distributed? I can’t find documentation on this file in the FDT user guide.

I don’t think the issue has to do with the ROIs I’ve been using. For testing purposes, I made a script that selects a random subset of ROIs from the Freesurfer parcellation, creates masks for each of them, and runs probtrackx using them. I’ve run this many times with varying numbers of seeds and I consistently get either all 0s in the fdt_network_matrix or non-zero values in the last column and 0s everywhere else. I’ve looked at the seeds and they seem fine to me, although I may be missing something. Something to note about what I tried yesterday is that there is clearly a lot of overlap between every seed and fdt_paths. Shouldn’t this mean that the corresponding matrix entries should be nonzero?

I’ve checked the registration matrices as well by applying them to the corresponding images and the results seem fine. For instance:
flirt -in T1w.nii.gz -ref dti_FA.nii.gz -applyxfm -init str2diff.mat -out T1w_diff

What would you suggest I try? Thank you very much for your help.
Best regards,
Ruy
On Mar 8, 2018, at 7:00 PM, Moises Hernandez <[log in to unmask]> wrote:

Hi Ricardo,

Did you take a look at the bedpostx output?
I would check that the dyads1.nii.gz file (orientations) is correct, 
and that mean_fsumsamples (fraction of anisotropic compartments) makes sense.
You could also draw a mask by hand, with few seeds in the white matter, and check that the tool reconstructs the tracts as expected.

It seems that the only ROI that is reached by the streamlines is the 4th one.
So, there must be something in the data that prevent streamlines to reach the other ROIs.



On 8 March 2018 at 18:32, Ricardo Valle <[log in to unmask]> wrote:
Hi Moises,

Thank you very much for replying so quickly! Very nice picture on your website by the way!

The probtrackx version you linked to solved the —invxfm error. I have rerun probtrackx as follows:
probtrackx2_gpu -s ${HOME}/Documents/diffusion/data.bedpostX/merged -m ${HOME}/Documents/diffusion/data.bedpostX/nodif_brain_mask -x ${HOME}/Documents/diffusion/network/masks/seed_list.txt --dir=${HOME}/Documents/diffusion/network --forcedir --network --xfm=${HOME}/Documents/diffusion/reg/str2diff.mat --seedref=${HOME}/Documents/diffusion/anat/T1w.nii.gz --invxfm=${HOME}/Documents/diffusion/reg/diff2str.mat --opd -P 5 -S 1000

I am attaching the resulting fdt_network_matrix to my email. The matrix is still all 0s except for the last column. I tried to attach a screenshot of fdt_paths.nii.gz and the masks, but they are too large. Both seem fine to me. What do you think might be the issue?

Best regards,
Ruy

On Mar 8, 2018, at 6:29 PM, Ricardo Valle <[log in to unmask]> wrote:

Hi Moises,

Thank you very much for replying so quickly! Very nice picture on your website by the way!

The probtrackx version you linked to solved the —invxfm error. I have rerun probtrackx as follows:
probtrackx2_gpu -s ${HOME}/Documents/diffusion/data.bedpostX/merged -m ${HOME}/Documents/diffusion/data.bedpostX/nodif_brain_mask -x ${HOME}/Documents/diffusion/network/masks/seed_list.txt --dir=${HOME}/Documents/diffusion/network --forcedir --network --xfm=${HOME}/Documents/diffusion/reg/str2diff.mat --seedref=${HOME}/Documents/diffusion/anat/T1w.nii.gz --invxfm=${HOME}/Documents/diffusion/reg/diff2str.mat --opd -P 5 -S 1000

I am attaching the resulting fdt_network_matrix as well as a picture with the resulting fdt_paths.nii.gz and masks overlayed on the T1 image. The matrix is still all 0s except for the last column. What do you think might be the issue?

Best regards,
Ruy
<Screen Shot 2018-03-08 at 6.19.41 PM.png>
<fdt_network_matrix>

On Mar 8, 2018, at 5:29 PM, Moises Hernandez <[log in to unmask]> wrote:

Hi Ricardo,

would you mind to download the last version of the tool and try again?
I have just updated it:
This version should solve the —invxfm error related.

About the 0 values, please let me know if it continues happening.
Several things can be causing it, but most likely:
- ROIs not well defined
- Seeds space to Diffusion space transformations are not good

One thing you can try for checking this is to run the tool with just few samples per seed (-P 5), 
few steps per streamline (-S 5), and generates the path distribution map (--opd).
Then, you can open the nifti file (containing that map) and see from where the streamlines are propagated,
i.e. check if seed points are correct.

Moies.

On 8 March 2018 at 16:34, Ricardo Valle <[log in to unmask]> wrote:
Dear FSL community,

I have been trying to generate a connectivity matrix from a volumetric Freesurfer parcellation. The command I’ve been running is:
probtrackx2_gpu -s ${HOME}/Documents/diffusion/data.bedpostX/merged -m ${HOME}/Documents/diffusion/data.bedpostX/nodif_brain_mask -x ${HOME}/Documents/diffusion/network/masks/seed_list.txt --dir=${HOME}/Documents/diffusion/network/ --forcedir --network --seedref=${HOME}/Documents/anat/T1w.nii.gz --xfm=${HOME}/Documents/diffusion/reg/str2diff.mat

I have run this several times with different seeds listed in seed_list.txt and consistently get an fdt_network_matrix with either all 0s or values in the order of 10^5 or 10^6 in the last column, 0s in the last row, and 0s everywhere else.

I’ve also tried passing —invxfm=${HOME}/Documents/reg/diff2str.mat to probtrackx. This causes the script to crash with a CUDA error that says it’s getting an invalid resource handle.

Do you know why these two things may be happening?

Thank you,
All the best,
Ruy