'Get bias field using sitk
I'm trying to use sitk library to clear biased Mr image (MRI).
I'm able to get the corrected image but can't get the bias image.
Set the following parameters:
shrink_factor=1,
mask_image=mask,
number_of_iterations=100,
number_of_fitting_levels=4
This is the code I tried
corrected_image = corrector.Execute(image, maskImage)
log_bias_field = corrector.GetLogBiasFieldAsImage(inputImage)
bias_exp = sitk.Cast(sitk.Exp(log_bias_field), sitk.sitkFloat64)
bias = inputImage / bias_exp
bias = sitk.GetArrayFromImage(bias)
bias = bias / bias.max()
But I get this image:
Do you know how to get the bias only?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

