Skip to content
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

SurfaceRecon - removing_intersections - Exception: Failed to resolve self-intersections #6

Open
whinds opened this issue Mar 12, 2019 · 5 comments

Comments

@whinds
Copy link

whinds commented Mar 12, 2019

After looking in the workdir, it appears the file t2w-image.nii.gz is not the same as the original T2 which was used as input to the pipeline.
image

Original Image:
Image Dimensions (Y, Z, X): 160 x 160 x 120
Series Length: 1
Voxel Dimensions (Y, Z, X): 1 x 1 x 1 Millimeters
Size of Series Point: 3 Seconds
Byte Type: 4-Byte Float
Byte Order: Little Endian
Compression: GZIP
Data Orientation: Columns (Y-), Rows (Z-), Slices (X+)

Transformed t2w_image.nii.gz:
Image Dimensions (X, Y, Z): 96 x 114 x 99
Series Length: 1
Voxel Dimensions (X, Y, Z): 1 x 1 x 1 Millimeters
Size of Series Point: 1 Milliseconds
Byte Type: 4-Byte Float
Byte Order: Little Endian
Compression: GZIP
Data Orientation: Data order not specified.

I believe this is the step where this happens in recon-neonatal-cortex.py
neoctx.makedirs(t2w_image)
neoctx.run(
'transform-image',
args=[
input_t2w_image,
t2w_image
],
opts={
'interp': 'fast cubic bspline with padding',
'Sp': 0,
'dofin': 'Id',
'target': brain_mask,
'type': 'float'
}
)

@AdebayoBraimah
Copy link

Hi @whinds , any head way on this issue? I am running into this problem as well.

@whinds
Copy link
Author

whinds commented Apr 2, 2019

No complete solution yet I'm afraid. One trick that helped was to "use mri_convert -c" on the T2 prior to processing, which padded the volume with zeros making transformations and resizing safer.

mri_convert -c -odt float -rt cubic $T2 $T2

Also, in one instance, one of the surface reconstructions failed on a virtual machine was instead able to succeed using the docker method.

My data is 1.0 mm resolution and prone to movement artifacts, so it could also be an underlying issue.

@AdebayoBraimah
Copy link

Understood. Thanks for response @whinds. I will give that a try.

@AdebayoBraimah
Copy link

@whinds Thanks, that seems to have done the trick on some of the images that failed on the first try.

@schuhschuh
Copy link
Member

Hi, sorry for the late reply, but if the resample/cropped t2w-image.nii.gz seems to not cover the full brain region, I would expect this to be an issue with the brain extraction mask. All the above command does is to sample the original (bias corrected) T2w image at the voxels of the supplied brain extraction mask, which is expected to match this image in native space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants