# Neonatal Brain Structural Connectome

**URL:** https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236
**Category:** Uncategorized
**Tags:** connectomics, tractography
**Created:** [September 29, 2021, 7:54am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236 "2021-09-29T07:54:39Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [September 29, 2021, 7:54am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/1 "2021-09-29T07:54:39Z")

</div>

Hi all,  
I am creating Structural Connectome Matrix for a preterm neonatal brain (Gestational Age=32 weeks).  
I wanted to make sure the steps I am adopting are correct.  
My data consist in:

- **dki\_bfc.mif** → diffusion image after preprocessing with Mrtrix3 (denoising, unringing, distortion corrections and bias field corrections) (resolution: 1.55556 x 1.55556 x 2.2 x 1)
- **3dT1\_corr\_brain.nii.gz** → structural T1 image after bias field correction and skull stripping (resolution: 0.890003 x 0.885417 x 0.885417)
- **mean\_b0\_BRAIN\_corr.nii.gz** → mask image in diffusion space

First of all, I registered skull-stripped T1 image to mean b=0 diffusion image, though keeping its higher resolution through `trasformconvert` command

```auto
flirt -in mean_b0_BRAIN_corr.nii.gz -ref 3dT1_corr_brain.nii.gz -dof 6 -omat DKI_2_T1.mat
transformconvert DKI_2_T1.mat mean_b0_BRAIN_corr.nii.gz 3dT1_corr_brain.nii.gz flirt_import DKI_2_T1_mrtrix.txt 
mrtransform -linear DKI_2_T1_mrtrix.txt -inverse 3dT1_corr_brain.nii.gz ${SBJDIR}/T1_in_DKI.nii.gz

```

Then, I computed 5TT Nifti for ACT/SIFT using -premasked option since T1 is already skull stripped

```auto
mrconvert T1_in_DKI.nii.gz anat.nii 
5ttgen fsl anat.nii 5tt.mif -premasked

```

I computed GMWMI Nifti for ACT/seeding

`5tt2gmwmi 5tt.mif gmwmi.mif`

I estimated msmt response function

`dwi2response msmt_5tt dki_bfc.mif 5tt.mif resp_wm.txt resp_gm.txt`

I computed msmt FODs

`dwi2fod msmt_csd dki_bfc.mif -mask mean_b0_BRAIN_corr.nii.gz resp_wm.txt fod_WM.mif resp_gm.txt fod_GM.mif resp_csf.txt fod_CSF.mif`

I downsample FODs for faster tracking using mrgrid

`mrgrid fod_WM.mif regrid -scale 0.5 -interp sinc fod_WM_ds.mif`

I generated first tractogram (50million streamlines)

`tckgen fod_WM_ds.mif tracks_msmt_50M.tck -act 5tt.mif -backtrack -crop_at_gmwmi -seed_gmwmi gmwmi.mif -maxlength 250 -select 50M -cutoff 0.01 -step 1`

I applied SIFT to reduce to 5million streamlines

`tcksift tracks_msmt_50M.tck fod_WM_ds.mif tracks_msmt_5M_01.tck -act 5tt.mif -term_number 5000000`

As atlas, I wanted to use skull-stripped T1 of JHU neonate atlas ([https://cmrm.med.jhmi.edu/cmrm/Data\_neonate\_atlas/atlas\_neonate.htm](https://cmrm.med.jhmi.edu/cmrm/Data_neonate_atlas/atlas_neonate.htm)). It has 122 parcellations listed from 1 to 122 in the attached file ( **JHU\_neonate\_lut.pdf** ) , and interleaved from right and left hemisphere. I registered those ROIs ( **LABELS\_dki\_corr.nii.gz** ) to diffusion space using nearest neighbour interpolations.  
My question now concerns how to generate the connectome matrix from this starting point.  
Since, Look-Up table is already well-ordered I thought of skipping `labelconvert` command, and simply run:

`tck2connectome tracks_msmt_5M_01.tck LABELS_dki_corr.nii.gz connectome.csv`

Is this correct or should I organize and select parcels? Can I use all of them (122)?  
Doing so the resulting connectome visualization results as follows, after importing it in MATLAB

```auto
sc=importdata('connectome.csv')
sc=triu(dt,1)+triu(dt,1)'
imagesc(sc)

```

![image](https://community.mrtrix.org/uploads/default/original/2X/3/3bf4ced8f762f9859c1288ae3da389f937342a11.png)Processing: JHU\_neonate\_lut.txt…  
[JHU\_neonate\_lut.pdf](https://community.mrtrix.org/uploads/short-url/eNUQPRp1ckWb69U5uyCnu6pqug6.pdf) (34.9 KB)

---

<div class="post-metadata">

### Author: ![mblesac](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mblesac/32/2210_2.png) [@mblesac](https://community.mrtrix.org/u/mblesac)
#### Post date: [September 30, 2021, 11:01am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/2 "2021-09-30T11:01:47Z")

</div>

Hi @ros ,

For registration, I would use the main B0 masked, not the mask itself (maybe I understand it wrong and you are already doing that).

I never use 5ttgen for this cohort (I never made it work properly), instead I use specific neonatal segmentation algorithm, the [dHCP pipeline](https://github.com/BioMedIA/dhcp-structural-pipeline) for example. You can see the results I obtain [here](https://git.ecdf.ed.ac.uk/jbrl/neonatal-5TT).

For the response function calculation, I would use the `dhollander` algorithm. Note than you don’t need a tissue segmentation for that, and then for the response function calculation I only use two components: WM and CSF. If my understanding is correct, the separation between WM and GM in this populations is not good, so it is better to use just two comparments.

The tractography + SIFT: the `-cutoff` of 0.01 seems too low, probably it will include a lot of noisy tracts/ false positives. Is there any reason to use SIFT instead of SIFT2?

If the labels of the atlas are listed from 1 to 122 you can apply it straight away. However, the JHU atlas includes WM parcels that probably you should remove for your connectome creation. Then you have to reorder your labels using `labelconvert`.

One final thought: if you are interested to perform population studies, you should use the same response function for all of them and `mtnormalise`.

I hope this helps.

Best regards,

Manuel

---

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [October 1, 2021, 7:05am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/3 "2021-10-01T07:05:29Z")

</div>

Thank you very much!

I will try to implement all the steps you suggest ! Which `-cutoff` do you suggest if 0.01 is too low?  
Moreover, do I have to remove all WM parcels from JHU atlas? Do you suggest another atlas more suitable for that?  
Finally, I didn’t understand completely how to use `labelconvert` command: labelconvert JHU\_neonate\_lut.txt **…** ordered\_parcels.nii.gz , and I don’t know what to put instead of “ **…** ”  
thank you very much  
Rosella

---

<div class="post-metadata">

### Author: ![mblesac](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mblesac/32/2210_2.png) [@mblesac](https://community.mrtrix.org/u/mblesac)
#### Post date: [October 1, 2021, 8:27am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/4 "2021-10-01T08:27:27Z")

</div>

Hi,

Ideally, you have to experiment with this value, but I would leave it as default (0.05 or 0.1, depending of the version).

There are a lot of atlases you could use, nowadays I use the [M-CRIB](https://github.com/DevelopmentalImagingMCRI/M-CRIB_atlas) atlas, as the areas are the same as Freesurfer, but this is a personal choice. For this atlas, the lut table can be found [here](https://git.ecdf.ed.ac.uk/jbrl/neonatal-5TT). For the rest, you will have to create it.

You need an edited version of the lut table (you have to create it), including only the labels you want to keep with the new ID number. You can have a look to the ones provided by MRtrix and see what you need.

Best regards,

Manuel

---

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [October 1, 2021, 8:36am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/5 "2021-10-01T08:36:37Z")

</div>

Ok I will try to follow your pipeline as well as your atlas. Thank you very much for your precious help.  
Rosella

---

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [October 21, 2021, 1:14pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/6 "2021-10-21T13:14:06Z")

</div>

Hi,  
I am going to start using your alternative algorithm to 5ttgen for tissue segmentation of infant data. However, I have 3dT1 as structural data. Does it work all the same instead of using T2?  
Of note, you find attached:

1. the 5tt.mif image I have obtained trying to apply default 5ttgen algorithm to one of my 3dT1.  
 ![image](https://community.mrtrix.org/uploads/default/original/2X/8/8f7289b5ff160b0358fd42e06441ab6bd8cc5585.jpeg)
2. the WM fODFs resulting from multi shell multi tissue csd displayed together with the tissue signals contribution map  
 ![image](https://community.mrtrix.org/uploads/default/original/2X/9/9267fa36b33232ad87f58f327d911ae720e67de7.jpeg)  
Do you think these results are not good enough ?  
thanks  
Rosella

---

<div class="post-metadata">

### Author: ![mblesac](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mblesac/32/2210_2.png) [@mblesac](https://community.mrtrix.org/u/mblesac)
#### Post date: [October 21, 2021, 2:07pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/7 "2021-10-21T14:07:32Z")

</div>

Hi,

The dHCP pipeline won’t work with the T1. You can design your own framework using the T1 templates from the mcrib atlas.

I don’t think the segmentation is good, I can not see the separation between the CSF and the WM. In the FODs the same, WM and CSF are mixed and the GM is almost gone.

Best regards,

Manuel

---

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [October 21, 2021, 2:23pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/8 "2021-10-21T14:23:31Z")

</div>

thank you very much. I will look for the corresponding T2 images , or implement my own framework  
Thanks  
Rosella

---

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [October 22, 2021, 1:19pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/9 "2021-10-22T13:19:10Z")

</div>

Hi,  
would you suggest some starting point for designing my own framework for segmenting T1 images?  
thanks  
Rosella

---

<div class="post-metadata">

### Author: ![mblesac](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mblesac/32/2210_2.png) [@mblesac](https://community.mrtrix.org/u/mblesac)
#### Post date: [October 22, 2021, 3:12pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/10 "2021-10-22T15:12:52Z")

</div>

Hi,

You can do it with the manually segmented T1 images from the mcrib atlas and the script antsJointlabelfusion.sh (or something like this, I don’t remember exactly the name). Then with any software you can combine the labels you are interested in.

Finally, for the parcellation, you can use in the same output labelconvert to get the desired labels. I hope this helps.

Best regards,

Manuel

---

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [October 22, 2021, 3:55pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/11 "2021-10-22T15:55:41Z")

</div>

Ok, thank you. However, I do not understand how to get \* seg\_mrtrix.nii.gz files (you derived from dHCP pipeline) in order to run _antsJointLabelFusion_ script

```auto
antsJointLabelFusion.sh -d 3 -t ${BASENAME}_T2w_restore_brain.nii.gz -x ${BASENAME}_brainmask_drawem.nii.gz -o ${BASENAME}_MCRIB_Structural_ -q 0 -g ${BASENAME}_P01_hist.nii.gz -l P01_seg_mrtrix.nii.gz -g ${BASENAME}_P02_hist.nii.gz -l P02_seg_mrtrix.nii.gz -g ${BASENAME}_P03_hist.nii.gz -l P03_seg_mrtrix.nii.gz -g ${BASENAME}_P04_hist.nii.gz -l P04_seg_mrtrix.nii.gz -g ${BASENAME}_P05_hist.nii.gz -l P05_seg_mrtrix.nii.gz -g ${BASENAME}_P06_hist.nii.gz -l P06_seg_mrtrix.nii.gz -g ${BASENAME}_P07_hist.nii.gz -l P07_seg_mrtrix.nii.gz -g ${BASENAME}_P08_hist.nii.gz -l P08_seg_mrtrix.nii.gz -g ${BASENAME}_P09_hist.nii.gz -l P09_seg_mrtrix.nii.gz -g ${BASENAME}_P10_hist.nii.gz -l P10_seg_mrtrix.nii.gz

```

thank you

---

<div class="post-metadata">

### Author: ![mblesac](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mblesac/32/2210_2.png) [@mblesac](https://community.mrtrix.org/u/mblesac)
#### Post date: [October 22, 2021, 4:12pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/12 "2021-10-22T16:12:53Z")

</div>

Hi,

That’s because I used labelconvert before that command. You need to replace the T2w for the T1w and use the T1w atlases with the segmented images.

You could be interested also to save the tissue probability maps, check for the correct flag to do that.

Best regards,

Manuel

---

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [October 25, 2021, 9:08am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/13 "2021-10-25T09:08:09Z")

</div>

Hi,  
thank you. My precise question is how to obtain **ID\_seg.nii.gz** images if I can’t use dhHCP pipeline.  
`labelconvert **ID_seg.nii.gz** M-CRIB_labels_FreeSurfer_format.txt M-CRIB_labels_FreeSurfer_format_default.txt ID_seg_mrtrix.nii.gz`  
thank you  
Rosella

---

<div class="post-metadata">

### Author: ![mblesac](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mblesac/32/2210_2.png) [@mblesac](https://community.mrtrix.org/u/mblesac)
#### Post date: [October 25, 2021, 9:24am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/14 "2021-10-25T09:24:45Z")

</div>

Hi,

That files are provided with the mcrib atlas, are the manually segmented images.

Best regards,

Manuel

---

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [October 25, 2021, 10:16am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/15 "2021-10-25T10:16:05Z")

</div>

Ok. So you mean the **hard\_segmentations** files within MCRIB atlas?  
And the first step would be use `labelconvert` like this?  
`labelconvert ID_seg.nii.gz M-CRIB_labels_FreeSurfer_format.txt M-CRIB_labels_FreeSurfer_format_default.txt ID_seg_mrtrix.nii.gz`  
where ID\_seg.nii.gz is replaced by M-CRIB\_hardseg\_\*.nii.gz ?  
thank you as always  
Rosella

---

<div class="post-metadata">

### Author: ![mblesac](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mblesac/32/2210_2.png) [@mblesac](https://community.mrtrix.org/u/mblesac)
#### Post date: [October 25, 2021, 10:28am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/16 "2021-10-25T10:28:16Z")

</div>

Hi,

Yes, you can find it here [OSF | Original M-CRIB neonatal brain atlas manual parcellations](https://osf.io/2yx8u/)

Best regards,

Manuel

---

<div class="post-metadata">

### Author: ![mblesac](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mblesac/32/2210_2.png) [@mblesac](https://community.mrtrix.org/u/mblesac)
#### Post date: [October 25, 2021, 11:02am UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/17 "2021-10-25T11:02:01Z")

</div>

Hi,

I would run the label convert at the end. The antsJointfusion should be executed first, adding as an output the probability labels. Then you combine the probability labels you need to obtain the 5TT file and after that in the hard labels you run labelconvert.

Best regards,

Manuel

---

<div class="post-metadata">

### Author: ![ros](https://community.mrtrix.org/user_avatar/community.mrtrix.org/ros/32/2227_2.png) [@ros](https://community.mrtrix.org/u/ros)
#### Post date: [October 25, 2021, 12:46pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/18 "2021-10-25T12:46:58Z")

</div>

ok thank you . In the command below,

- ${BASENAME}\_T1w\_restore\_brain.nii.gz is my subject’s skull stripped T1

- ${BASENAME}\_brainmask\_drawem.nii.gz is its corresponding mask

- ${BASENAME}\_P01\_hist.nii.gz is obtained from `mrhistmatch` command

- P01\_seg\_mrtrix.nii.gz is the manually segmented labels from MCRIB atlas for each of the 10 subjects  
`antsJointLabelFusion.sh -d 3 -t ${BASENAME}_T1w_restore_brain.nii.gz -x ${BASENAME}_brainmask_drawem.nii.gz -o ${BASENAME}_MCRIB_Structural_ -q 0 -g ${BASENAME}_P01_hist.nii.gz -l P01_seg_mrtrix.nii.gz -g ${BASENAME}_P02_hist.nii.gz -l P02_seg_mrtrix.nii.gz -g ${BASENAME}_P03_hist.nii.gz -l P03_seg_mrtrix.nii.gz -g ${BASENAME}_P04_hist.nii.gz -l P04_seg_mrtrix.nii.gz -g ${BASENAME}_P05_hist.nii.gz -l P05_seg_mrtrix.nii.gz -g ${BASENAME}_P06_hist.nii.gz -l P06_seg_mrtrix.nii.gz -g ${BASENAME}_P07_hist.nii.gz -l P07_seg_mrtrix.nii.gz -g ${BASENAME}_P08_hist.nii.gz -l P08_seg_mrtrix.nii.gz -g ${BASENAME}_P09_hist.nii.gz -l P09_seg_mrtrix.nii.gz -g ${BASENAME}_P10_hist.nii.gz -l P10_seg_mrtrix.nii.gz`

Is this first command applied correctly?

---

<div class="post-metadata">

### Author: ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)
#### Post date: [October 25, 2021, 1:10pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/19 "2021-10-25T13:10:32Z")

</div>

> I never use 5ttgen for this cohort (I never made it work properly), instead I use specific neonatal segmentation algorithm, the dHCP pipeline for example. You can see the results I obtain here.

I’m sure you’d make a number of people happy by taking those instructions, implementing them in a Python script, and contributing it as a novel `5ttgen` algorithm 😛

> Finally, I didn’t understand completely how to use `labelconvert` command:

See documentation page [here](https://mrtrix.readthedocs.io/en/3.0.3/quantitative_structural_connectivity/labelconvert_tutorial.html). It’s a matter of manually defining a file that contains only those nodes of the parcellation that you wish to retain.

---

<div class="post-metadata">

### Author: ![mblesac](https://community.mrtrix.org/user_avatar/community.mrtrix.org/mblesac/32/2210_2.png) [@mblesac](https://community.mrtrix.org/u/mblesac)
#### Post date: [October 25, 2021, 4:55pm UTC](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236/20 "2021-10-25T16:55:23Z")

</div>

Hi @rsmith,

> [@rsmith](#):
>
> I’m sure you’d make a number of people happy by taking those instructions, implementing them in a Python script, and contributing it as a novel `5ttgen` algorithm 😛

I’ll be happy to try it, is there any place I can read how to create a 5tt algorithm?

Best regards,

Manuel

[Next page](https://community.mrtrix.org/t/neonatal-brain-structural-connectome/5236.md?page=2)
