Intensity inhomogeneity correction

LEMS method to correct for intensity inhomogeneity of MR images
7.5K Downloads
Updated 20 Dec 2006

View License

Unzip all the files in a folder.
set the Matlab current dir to this folder or add it to the path.
At the matlab prompt, type LEMS1im_GUI
Follow the buttons order to perform the steps:
1) load image. Can be dicom or regular image format
2) crop. If not needed make a box emcompassing the whole image
3) Threshold. This step is necessary to identify the pixels subject to the bias field
4) Initialize bias field. The initial bias field is initialized using a 2D polynomial
5) Filter the image. Improve the performance of the correction method. Uses robust anisotropic diffusion filtering (Black et al. method). Noise scale is computed from the background identified from step 3.
6) call to the LEMS function to perform the actual correction.
7) Save results

This GUI is just a wrapper to call the LEMS function:
% BiasCorrLEMSS2D: Correct for Inhomo by local entropy minimization with splines support
%
% [B,x,B0] = BiasCorrLEMSS2D(I,Imask,V_mean,V_std,options,B0);
% B: Final bias filed
% x: corrected iamge (x=I/B)
% B0: Initial bias field in case it has been modified by the funciton
% I: input image (should be in [0 255])
% mask: identify the pixels subject to bias field
% V_mean: mean of the background
% V_std: std of the background
% options: structure with options. to initialize the stucture call the
% function without input argument
% option = BiasCorrLEMSS2D
% option =
% Nknots: [30 30] knot spacings in y and x direction
% NiterMax: 3 number of iteration max
% flag_display: 1 if 1, display intermediate results in a new figure
% overs: -1, if 1 pad the image to get an even number of knots
% normalize: 1, if 1 notrmalize the image
% flag_allknots: 1, if 1 optimze the knots at the image border
% GainSmooth: 0, gain to force the spline to be smooth by constraining the second derivatives
% Bgain: 0.5000, average of the bias field over the pixels with signal
% B0: Initial Bias field
%
% Olivier Salvado, 20-jan-04, Case Western Resrve University
% Salvado et al. IEEE TMI 25(5):539-552


For more information see the attached paper. Please cite this paper if you use this tool.
http://ieeexplore.ieee.org/xpls/abs_all.jsp?isnumber=34139&arnumber=1626318&count=16&index=2

Cite As

Olivier Salvado (2024). Intensity inhomogeneity correction (https://www.mathworks.com/matlabcentral/fileexchange/13411-intensity-inhomogeneity-correction), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

one function missing.