Commit 8be458e4 authored by mtoeppe's avatar mtoeppe
Browse files

Merge branch 'master' of gitlab.gwdg.de:irp/holotomotoolbox

parents 80035f27 8a767ef9
Pipeline #100643 passed with stage
in 1 minute and 50 seconds
......@@ -337,16 +337,14 @@ sliceOriginal = astraFDK(padarray(sino(:,sinoCrop+1:end-sinoCrop,:), [0,sinoPad,
% View results to see whether parameters have to be adjusted
showImage(-sliceOriginal); colormap gray;
%% Reconstruct all slices with determined parameters
% optional ring removal for all slices
if doRingRemoval
parfor sliceIdx = 1:size(projs,1)
disp(sliceIdx);
projs(sliceIdx,:,:) = ringremove(squeeze(projs(sliceIdx,:,:)), settingsRingremove);
end
%% Optional ring removal for all slices with determined parameters
parfor sliceIdx = 1:size(projs,1)
disp(sliceIdx);
projs(sliceIdx,:,:) = ringremove(squeeze(projs(sliceIdx,:,:)), settingsRingremove);
end
%% Tomographic reconstruction with the determined parameters
settingsTomoRec.offset = 0;
settingsTomoRec.numSlices = size(projs,1); % all slices
slices = astraFDK(padarray(projs(:,sinoCrop+1:end-sinoCrop,:), [0,sinoPad,0], 'replicate'), thetas, z01, z02, dx*1000 , settingsTomoRec);
......
......@@ -73,8 +73,8 @@ originalImage(isnan(originalImage)) = inf;
% filtered image
neighbourhood = [settings.neighborhood settings.neighborhood];
% filteredImage = medfilt2(originalImage, neighbourhood, 'symmetric');
filteredImage = medfilt2(originalImage);
filteredImage = medfilt2(originalImage, neighbourhood, 'symmetric');
% difference between original and filtered image
differenceImage = originalImage - filteredImage;
......
......@@ -3,9 +3,10 @@ function result = phaserec_bac(im1, settings)
%
% ``result = phaserec_bac(im1, settings)``
%
% Reconstructed the intensity distribution in the object plane using the Bronnikov
% Aided Correction (BAC) algorithm proposed by de Witte et al. :cite:`Witte_JOSAA_2009`. It is valid for
% short propagation distances and weakly absorbing objects.
% Reconstructs the negative logarithm of the intensity distribution in the object
% plane using the Bronnikov Aided Correction (BAC) algorithm proposed by de Witte et
% al. :cite:`Witte_JOSAA_2009`. It is valid for short propagation distances and
% weakly absorbing objects.
%
%
% Parameters
......@@ -114,7 +115,7 @@ else
C = im1;
end
result = im1 ./ (1 - settings.reg_gamma * C);
result = -log(im1 ./ (1 - settings.reg_gamma * C));
end
......
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