Issues with dHCP-structural-pipeline

Hi everyone,
We are working on fetal brain MRI acquisition and data analysis recently. And we tried to use the dHCP-structural-pipeline to analyze the fetal brain MRI data.
However, we found that the results of sulcal depth and curvature are quite strange. With our data, the average sulcal depth is 19~31 (unsure what the unit is), which is almost 10 times larger then the actual depth. The average curvature ranges from 1.9 to 2.6, which is 10 times larger than the values reported in some papers. We’ve carefully checked the segmentation accuracy and it looks reasonable.
In addition, to make sure that there is nothing wrong with our data, we tried 38w dhcp data(rel-2), and got a sulcal depth of 26.83629 and the curvature of 2.453721.
Dose anyone meet the same situation? Is there any further calculation requested? Any advice may help, thanks in advance!

Xinyi Xu

I used the workbench viewer to check my results, however the results seem pretty reasonable. So I think the problem maybe in dHCP-structural-pipeline-measures.

Hi Xinyi Xu

I have carefully checked a few subjects from the second dhcp release (screenshots attached). Both @lzjwilliams and I think that the values of the curvature and sulcal depth measures looked reasonable and consistent. I also found that the range values of the sulcal depth are similar to this paper:

Spatial distribution and longitudinal development of deep cortical sulcal landmarks in infants
Y Meng, G Li, W Lin, JH Gilmore, D Shen- Neuroimage, 2014 - Elsevier

It is worth checking the histogram for each metric and see the whole distribution and not only the range of values in case there are any outliers. It is also important to check the inflated surfaces, as some of the metrics are calculated from the inflated (deformed) surfaces.

For example, here are how the curvature and sulcal depth measurements are calculated in the dhcp pipeline:

One last thing, make sure that you are using the current updated version of the dhc pipeline here, which depends on MIRTK for processing the surface.

Best, Amir

Hi Amir

Thank you for your detailed reply!
I have read those two dhcp papers again, and here are some questions need discussing:

  1. The results of my fetal data showed in Example 1 and 2 are reasonable, just like the examples you showed. However, in the …/reports/pipeline_all_measures.csv , the results of sulcal depth and curvature are as follows:

    So are those results in pipeline_all_measures.csv correct?

  2. In the paper Construction of a neonatal cortical surface atlas using Multimodal Surface Matching in the Developing Human Connectome Project, there are some results of average sulcal depth and curvature of the whole brain. Are they the same metrics as the ones I marked with red rectangle above?

  3. Will refining the cGM label in tissue_labels.nii.gz be helpful for getting more accurate results? Or is there another better way to refine my results?

Thanks again for your help.

Best regards,

Dear Xinyi,

I presume you generate …/reports/pipeline_all_measures.csv by running the pipeline yourself? If so which version of the pipeline are you using?

Thanks, Daniel

Hi Daniel,

Yes, I run the biomedia/dhcp-structural-pipeline-measures:latest in docker by myself. And I used the results calculated by biomedia/dhcp-structural-pipeline:latest in docker to run the measurement pipeline.


Dear all,

As for the third question I asked earlier:

  1. Will refining the cGM label in tissue_labels.nii.gz be helpful for getting more accurate results? Or is there another better way to refine my results?

I tried three different version of tissue_labels.nii.gz, 1st version without manual refinement after segmentation, 2nd version with manual refinement, 3rd changed the specific slice. But the results of dhcp-structural-pipeline seem unaffected.

So I wondered if Histogram Matching will help. I matched the T2 data above with CRL atlas. However this doesn’t help :confused:.


Hi Xinyi,

I suppose you are succeed to run pipeline from docker hub. So, I have a question, when I run pipeline, I have an issue:
Pipeline failed: see log files/data/logs/subject1-session1.segmentation.log /data/logs/subject1-session1.segmentation.err for details
Would you be able to fix it please?


Dear Xinyi

Currently there is no easy way to run the pipeline with manually corrected labels although we have been talking about it as a way to fix some problems we are having with clinical datasets. I’m afraid I cannot give you a timeline for that however.


Hi Inès,

Could you please attach the /data/logs/subject1-session1.segmentation.err and /data/logs/subject1-session1.segmentation.log? So I can see which step went wrong.


Hi Emma,

Thank you for your reply.
I did segmentation with my data by using DrawEM independently, and put the manually corrected segmentation results in the right folder path required by dhcp-structural-pipeline. And then I run the dhcp-structural-pipeline in docker. I suppose the pipeline will skip the segmentation step and do the rest of the pipeline, like reconstruction of surfaces with the right labels.


Hi Daniel,

It’s been a while since your last reply. Is there any new update about the measurement pipeline? Are those sulc and curvature results reliable?
Look forward to your reply. Thank you in advance!


Yes, off course.
This is /data/logs/subject1-session1.segmentation.err.

Capture d’écran 2021-05-31 à 09.11.58


And /data/logs/subject1-session1.segmentation.log



Hi Inès,

Sorry for the late reply.
I take a look of my successful data, it seems that the last step in /usr/src/structural-pipeline/build/MIRTK/Packages/DrawEM/scripts/ failed. It should be like this: mirtk calculate segmentations-data/tissue-posteriors/gm/subject1-session1.nii.gz -mul 100 -out segmentations-data/gm-posteriors/subject1-session1.nii.gz.
I have never met this problem with my data, so I am not sure what cause this.
But maybe you can try some other data to see if it was the data’s problem.


Dear Xinyi,

apologies for the delay. Please use the measures that some with the surface files. These should have the correct measurements in them.

Best wishes, Daniel

Dear Daniel,

Do you mean those gifti files or the spec file in ..\derivatives\sub-subject1\ses-session1\anat\Native ?
And are there any recommended toolboxes I can use to get those measurements in the files, like the ones in pipeline_all_measures.csv?
Thanks a lot!

Best regards,

Hi everyone
I have the dhCP infant data fMRI and i want to display it on matlab i don’t know how, Please anyone can help me?
Thank you

Hi dHCP community,

I am working to analyze the midthickness surface curvature of the dHCP data release 2. However, I am not able to find the cortical surface files (surf.gii) in the file tree of the data provided via GIN. Is there any way to obtain the surface files for data release 2?

Best regards and thank you for your help,

Hi @cbasinski,

The GIN repo is specific to the SLCN challenge that @EmmaR and I are running. If you want the midthickness files, and other cortical data, you will need to download it from the dHCP website.