Creating connectivity matrix using freesurfer parcellation (by command line)

313 views
Skip to first unread message

minch...@gmail.com

unread,
Aug 17, 2018, 1:41:23 AM8/17/18
to DSI Studio
Hello, 
Thank you for providing this great software

I am trying to create connectivity matrix, using Freesurfer parcellation other than Desikan-Killiany.

The parcellation is in subject's T1 space.

  • Approach 3: GQI reconstruction to T1W space + T1W-space tracking + T1W-based brain parcellation:

First I did 'FIB' file reconstruction using subject's T1 image

  dsi_studio --action=rec --source=subject.src.gz --method=7 --record_odf=1 --param0=1.25 --reg_method=4 --t1w=subject_T1_brain.nii.gz

Secondly I did fiber tracking using subject's freesurfer parcellation in T1 space

   dsi_studio --action=trk --source=subject.src.gz.odf8.f5rec.012fy.cdmt1w.qsdr.1.25.2mm.R78.fib.gz --fiber_count=1000000 --thread_count=20 --output=no_file --connectivity=subject_parcellation image.nii.gz --t1t2=subjectT1_brain.nii.gz --fa_threshold=0.10 --turning_angle=45  --max_length=200 --min_length=10 --connectivity_value=count,ncount

I though providing --t1t2 option will do registration.

What I am curious is that  in processing log, 

DSI Studio Oct 26 2017, Fang-Cheng Yeh
loading IGD01_001.src.gz.odf8.f5rec.012fy.cdmt1w.qsdr.1.25.2mm.R78.fib.gz...
fiber_count=1000000
no seeding area assigned. use whole brain seeding
turning_angle=45
fa_threshold=0.1
step_size=0
smoothing=1
min_length=10
max_length=200
tracking_method=0
initial direction=0
interpolation=0
voxelwise=0
thread_count=20
start tracking.
 A DTI diffusion scheme was used, and a total of 32 diffusion sampling directions were acquired. The b-value was 600 s/mm2. The in-plane resolution was 0.976562 mm. The slice thickness was 2 mm. The diffusion data were reconstructed in the MNI space using q-space diffeomorphic reconstruction (Yeh et al., Neuroimage, 58(1):91-9, 2011) to obtain the spin distribution function (Yeh et al., IEEE TMI, ;29(9):1626-35, 2010).  A diffusion sampling length ratio of 1.25 was used, and the output resolution was 2 mm. The restricted diffusion was quantified using restricted diffusion imaging (Yeh et al., MRM, 77:603–612 (2017)). A deterministic fiber tracking algorithm (Yeh et al., PLoS ONE 8(11): e80713) was used. A seeding region was placed at whole brain. The angular threshold was 45 degrees. The step size was randomly selected from 0.1 voxel to 3 voxels. The anisotropy threshold was 0.1. The fiber trajectories were smoothed by averaging the propagation direction with a percentage of the previous direction. The percentage was randomly selected from 0% to 95%. Tracks with length shorter than 10 or longer than 200 mm were discarded. A total of 1000000 tracts were calculated.
finished tracking.
a total of 1000000 tracts are generated
loading /u1/home/project/ChungAngUniv/New_Data/IGD01_001/t1w/IGD01_001/mri/aparc_LS250-in-rawavg_dil.nii.gz
/u1/home/project/ChungAngUniv/New_Data/IGD01_001/t1w/IGD01_001/mri/aparc_LS250-in-rawavg_dil.nii.gz is used as an MNI space ROI.
loading aparc_LS250-in-rawavg_dil...
count tracks by ending
calculate matrix using count
export connectivity matrix to IGD01_001.src.gz.odf8.f5rec.012fy.cdmt1w.qsdr.1.25.2mm.R78.fib.gz.aparc_LS250-in-rawavg_dil.count.end.connectivity.mat
export connectogram to IGD01_001.src.gz.odf8.f5rec.012fy.cdmt1w.qsdr.1.25.2mm.R78.fib.gz.aparc_LS250-in-rawavg_dil.count.end.connectogram.txt
export network measures to IGD01_001.src.gz.odf8.f5rec.012fy.cdmt1w.qsdr.1.25.2mm.R78.fib.gz.aparc_LS250-in-rawavg_dil.count.end.network_measures.txt
count tracks by ending
calculate matrix using ncount
export connectivity matrix to IGD01_001.src.gz.odf8.f5rec.012fy.cdmt1w.qsdr.1.25.2mm.R78.fib.gz.aparc_LS250-in-rawavg_dil.ncount.end.connectivity.mat
export connectogram to IGD01_001.src.gz.odf8.f5rec.012fy.cdmt1w.qsdr.1.25.2mm.R78.fib.gz.aparc_LS250-in-rawavg_dil.ncount.end.connectogram.txt
export network measures to IGD01_001.src.gz.odf8.f5rec.012fy.cdmt1w.qsdr.1.25.2mm.R78.fib.gz.aparc_LS250-in-rawavg_dil.ncount.end.network_measures.txt

the bold part says that the parcellation is used as an MNI space ROI, but it is in T1 space.
I want the 'aparc~' atlas be used as an T1 space ROI.
Can I ask you how to fix this problem in command line?

Best wishes,

Minchul

minch...@gmail.com

unread,
Aug 22, 2018, 3:00:46 AM8/22/18
to DSI Studio

I kind of solved this problem by http://dsi-studio.labsolver.org/discussion-group?place=topic%2Fdsi-studio%2FGgysfGUweLI%2Fdiscussion

I registered the T1-space parcellation into native DTI space

Fang-Cheng Yeh

unread,
Aug 22, 2018, 11:04:17 AM8/22/18
to dsi-s...@googlegroups.com
Sorry for my late reply. Another solution could be

dsi_studio --action=rec --source=subject.src.gz --method=7
--record_odf=1 --param0=1.25 --reg_method=4
--rotate_to=subject_T1_brain.nii.gz
On Wed, Aug 22, 2018 at 3:00 AM <minch...@gmail.com> wrote:
>
>
> I kind of solved this problem by http://dsi-studio.labsolver.org/discussion-group?place=topic%2Fdsi-studio%2FGgysfGUweLI%2Fdiscussion
>
> I registered the T1-space parcellation into native DTI space
>
> --
> 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 post to this group, send email to dsi-s...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Fang-Cheng Yeh

unread,
Aug 22, 2018, 11:07:14 AM8/22/18
to dsi-s...@googlegroups.com
dsi_studio --action=rec --source=subject.src.gz --method=4
--record_odf=1 --param0=1.25 --rotate_to=subject_T1_brain.nii.gz

minch...@gmail.com

unread,
Aug 22, 2018, 9:28:29 PM8/22/18
to DSI Studio
Thanks for reply
I followed your instruction, but DSI studio still tries to register to MNI space
and the output connectivity matrix is composed of zero.

Can I send you the src, roi and T1 images to test?

Minchul

Fang-Cheng Yeh

unread,
Aug 22, 2018, 10:01:01 PM8/22/18
to dsi-s...@googlegroups.com
Yes, please use the link provided in the Discussion forum to upload the files.

Fang-Cheng Yeh

unread,
Aug 23, 2018, 1:31:00 PM8/23/18
to dsi-s...@googlegroups.com
This is the command line I tested. It should work using the latest version of DSI Studio.

dsi_studio --action=rec --source=SRC.src.gz --rotate_to=T1.nii.gz --method=1 --param0=1.25
dsi_studio --action=trk --source=SRC.src.gz.012fy.dti.fib.gz --fiber_count=1000000 --output=no_file --connectivity=parcellation.nii.gz --connectivity_value=count,ncount

Your data have a very low b-value and DTI reconstruction would be a better fit here.

minch...@gmail.com

unread,
Aug 23, 2018, 7:37:25 PM8/23/18
to DSI Studio
Thank you for kind help,

Minchul

2018년 8월 24일 금요일 오전 2시 31분 0초 UTC+9, Frank Yeh 님의 말:
Reply all
Reply to author
Forward
0 new messages