ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
629 stars 161 forks source link

ENH: avoid kelly_kapowski returning GMP #561

Closed cookpa closed 6 months ago

cookpa commented 6 months ago

If the library call to KellyKapowski goes wrong for any reason, the function kelly_kapowski returned a copy of the input gray matter image.

To avoid this, I initialized the output image to zeros, then added a check to raise an exception if the thickness image to be returned sums to zero.