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

Second N4 bias correction after brain extraction fails #9

Open
ledigchr opened this issue Apr 6, 2021 · 1 comment
Open

Second N4 bias correction after brain extraction fails #9

ledigchr opened this issue Apr 6, 2021 · 1 comment
Labels

Comments

@ledigchr
Copy link
Owner

ledigchr commented Apr 6, 2021

For some input images the second N4 bias correction that relies on the pincram brain mask fails. This fails silently because the second N4 run would overwrite the file of the first N4 bias correction. So the file exists, and the MALPEM pipeline proceeds on the image that was bias corrected only once.

The reason is that for some input images the binary brain mask (after pincram) has on a numerical level a different image origin than the original image, which fails an asserting in N4/ITK.

@ledigchr ledigchr added the bug label Apr 6, 2021
ledigchr added a commit that referenced this issue May 30, 2021
Updates for MALPEM v1.3 release.

Functional:
* Updated initial N4 bias correction from potentially using OTSU mask to always use complete image domain as foreground
* Perform consistently two N4 bias correction (1st: N4 on full image domain, 2nd: N4 w/ mask) regardless of whether user specified a mask
* Updated installer script to allow user to select among various version

Reproducibility:
* Fix issue #8 : Fixed itk threads to 8 to make N4 bias correction deterministic (depends on number of threads)

Robustness/Compatibility:
* Fix issue #9 : Ensure input image and mask have numerically same header information to avoid N4 failing, don't fail silently in case of another unexpected problem.
* Fix issue #2 : Added 'export PROOT_NO_SECCOMP=1' to avoid Error 'root info: pid XXX: terminated with signal 11' 
* ingore_errors = True when attempting to delete temporary files when 'cleanup' flag is used

Minor:
* removed unused imports, cosmetics
@ledigchr
Copy link
Owner Author

Fixed w/ workaround in malpem-v1.3

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

No branches or pull requests

1 participant