Surface pipeline failed

Summary of what happened:

After running the dhcp-pipeline to segment a T2w MRI (my data, not from dhcp database), I obtained warnings and errors.

Command used (and if a helper script was used, a link to the helper script or the command generated):

The commands used in terminal was:

docker run --rm -t \
-u $(id -u):$(id -g) \
-v $PWD/data:/data \
biomedia/dhcp-structural-pipeline:latest subject1 session1 40 \
-T2 data/T2w.nii -t 8

Version:

Docker version 20.10.23

Environment (Docker, Singularity, custom installation):

I’m running the pipeline from dockerhub.

Data formatted according to a validatable standard? Please provide the output of the validator:

I used dcm2nii DICOM to NIfTI converter in MATLAB.

Relevant log outputs (up to 20 lines):

< /usr/src/structural-pipeline/dhcp-pipeline.sh subject1 session1 40 -T2 data/T2w.nii -t 8

running segmentation pipeline
/usr/src/structural-pipeline/scripts/segmentation/pipeline.sh /data/workdir/subject1-session1/T2/subject1-session1.nii.gz subject1-session1 40 -d /data/workdir/subject1-session1 -t 8

running additional pipeline
/usr/src/structural-pipeline/scripts/misc/pipeline.sh subject1-session1 40 -d /data/workdir/subject1-session1 -t 8
 
running surface pipeline
/usr/src/structural-pipeline/scripts/surface/pipeline.sh subject1-session1 -d /data/workdir/subject1-session1 -t 8
Pipeline failed: see log files /data/logs/subject1-session1.surface.log /data/logs/subject1-session1.surface.err for details >

Screenshots / relevant information:

The final log output from “subject1-session1.surface.log”:
< mirtk recon-neonatal-cortex -v --threads=8 --config=/usr/src/structural-pipeline/parameters/recon-neonatal-cortex.cfg --sessions=subject1-session1 --prefix=surfaces/subject1-session1/vtk/subject1-session1 --temp=surfaces/subject1-session1/vtk/temp-recon/subject1-session1 --white --pial : failed >

From the file “subject1-session1.surface.err”:
<Error: Surface outside bounds of input image: surfaces/subject1-session1/vtk/temp-recon/subject1-session1/corpus-callosum-mask.nii.gz>

From the files “subject1-session1.additional.err” and “subject1-session1.segmentation.err”, I obtained warnings:

<Warning: FFD spacing smaller than image resolution!
This may lead to artifacts in the transformation because not all control points are within the vicinity of a voxel center.>

Can you give me some suggestion of what could be going wrong?

Thank you so much in advance!
Tânia

Hello Tânia,
I got the same error as you. I was running the pipeline using docker with this command:

docker pull biomedia/dhcp-structural-pipeline:latest 

docker run --rm -t -u $(id -u):$(id -g) -v $PWD/data:/data biomedia/dhcp-structural-pipeline:latest sub01 01 42 -T1 data/T1w.nii.gz -T2 data/T2w.nii.gz

Did you ever figure out what the problem was?

Thanks!

Kelly

The error:

<Warning: FFD spacing smaller than image resolution!
This may lead to artifacts in the transformation because not all control points are within the vicinity of a voxel center.>

Suggests your image resolution is lower than the control point spacing used to regularise the registration. Maybe try upsampling the resolution of your image - its not going to change the image quality but it might fix the error

I only got the first part of the error:

<Error: Surface outside bounds of input image: surfaces/subject1-session1/vtk/temp-recon/subject1-session1/corpus-callosum-mask.nii.gz>

but not additional error about the FFD.

Debugging these sorts of issues are really hard. Its very difficult to say. You can look into what has been generated - e.g. the tissue segmentations and see what happens. You could also try installing and running a version of the pipeline that fits the surfaces specifically to the segmentation only:

This is going to require install from source.

Unfortunately the surface part of the dHCP pipeline can be difficult to adapt to data of different resolutions and contrasts, we have been working on a deep learning based replacement - which hopefully will be better.

No problem. Thanks for the information!