ledigchr / MALPEM

MALPEM whole-brain segmentation framework
Other
20 stars 10 forks source link

Second N4 bias correction after brain extraction fails #9

Open ledigchr opened 3 years ago

ledigchr commented 3 years ago

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 commented 3 years ago

Fixed w/ workaround in malpem-v1.3