Commit afbcda26 authored by Leon Merten Lohse's avatar Leon Merten Lohse
Browse files

allow specifying a region for ringRemove

parent dfd2b168
Pipeline #110718 passed with stage
in 1 minute and 23 seconds
......@@ -30,6 +30,9 @@ function sinoCorrected = ringremove(sino,settings)
% additive_Strength : Default = 1
% Strength of the subtraction of the identified stripe artifacts from the
% original sinogram when using method 'additive'.
% additive_Region : Default = []
% Region (of the radius) of the sinogram to be corrected when using method
% 'additive'. [] corresponds to 1:size(sino,1).
% wavelet_Wname : Default = 'sym8'
% Wavelet base to be used for the decomposition of the sinogram when using method
% 'wavelet'.
......@@ -107,6 +110,7 @@ defaults.additive_SmoothMethod = 'mean';
defaults.additive_WindowSize = 10;
defaults.additive_GaussSigma = 3;
defaults.additive_Strength = 1;
defaults.additive_Region = [];
defaults.wavelet_Wname = 'sym8';
defaults.wavelet_DecNum = 3;
......@@ -136,8 +140,16 @@ switch settings.method
otherwise
error('Choose between "mean", "median" and "gauss" for setting "additive_SmoothMethod"');
end
if ~isempty(settings.additive_Region)
region = settings.additive_Region;
else
region = 1:size(sino,1);
end
% identification of horizontal stripes
correctionProfile = sinoMean - sinoMeanSmoothed;
correctionProfile = zeros(size(sinoMean));
correctionProfile(region) = sinoMean(region) - sinoMeanSmoothed(region);
% sinogram correction
sinoCorrected = sino - settings.additive_Strength * correctionProfile;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment