-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation error (with docker image) #14
Comments
Thanks, could you also attach the |
subject1-session1.additional.err.txt I created a text file since it doesn't allow me to directly attach the .err file. But the content is the same. |
Very sorry for the late reply, this error usually suggests that there is no overlap between the images to be registered (or maybe that one image is completely empty). It may be worthwhile to check any previous registration output that was computed, e.g., an affine transformation supposed to align the images before deformable registration. |
TC_0432_T2_reg.nii.gz |
Thanks, @anisha1807. I was able to reproduce the issue. In short, see at the end regarding a bug in Looking at the input to the registration command, it appears that one of the transformations which should be the inverse of another is indeed actually almost identical to this other transformation. More concretely, I looked at the following:
When looking at these images, I have to check the box "Invert transformation" in both cases to achieve the expected alignment in the Viewer. This suggests that At least one of these transformation files is computed by the segmentation/pipeline.sh script, which in turn simply executes the Draw-EM command
I thus first suspected the issue is with Draw-EM. Above Indeed it seems another registration is executed in the additional pipeline: dhcp-structural-pipeline/scripts/misc/pipeline.sh Lines 140 to 142 in 84f9322
^^^ This command is the culprit. The order of target and source suggest that the output transformation maps points from input image to template space, but the naming of the output transformation suggests it should be the mapping from template to input space rather. @jcupitt Can you have a look at this? This bug seems to be present since @amakropoulos initial commit in 2017. Odd though that it wouldn't have caused issue before?!? Has maybe something else changed more recently? Also, instead of this extra registration step, it would make sense to just use
when the image to template mapping is available from the Draw-EM output. |
It looks as if a copy-paste error back in 2017 was causing the template to subject DOF to be reversed. Also revise formatting in this section to be clearer. See #14
@jcupitt found the solution! [EDIT: :-) seems John was faster actually fixing it than me posting this update...] The incorrect code block referenced above seems obsolete, and was supposed to be replaced by the lines below it: dhcp-structural-pipeline/scripts/misc/pipeline.sh Lines 148 to 152 in 84f9322
Removing below lines from dhcp-structural-pipeline/scripts/misc/pipeline.sh Lines 140 to 142 in 84f9322
Thanks, @anisha1807, for bringing this to our attention and sorry for the long wait. @jcupitt will submit a fix soon, which should then also update the Docker image. |
For reference, @amakropoulos also fixed this issue less than 1 month ago in the original repo DevelopingHCP@5f7942d |
And Andreas found the issue heh. |
Oh goodness, I didn't realize the original repo was still being updated. Are there any other fixes we should pick up? |
Not for now [I think]. I'll be talking to Antonis next week. There are some other MIRTK issues still outstanding. He had planned to then contribute those upstream once ready and working, I belief. |
subject1-session1.additional.log
I want to perform cortical segmentation of neonatal brain. I was able to successfully install the docker image and I tested two nifti files (preterm and term subjects) but this error persists.
The text was updated successfully, but these errors were encountered: