Skip to content
Snippets Groups Projects
Commit 7c474aaf authored by Nicola Vigano's avatar Nicola Vigano
Browse files

6D-Reconstruction: fixed a bug introduced in a previous commit

parent 95a1ab68
No related branches found
No related tags found
No related merge requests found
......@@ -298,10 +298,10 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
%%% Duals updating functions
methods (Access = public)
function [q, mdivq] = update_dual_TV(self, q, new_enh_sol, lambda)
num_blobs = numel(self.blobs);
sigma = 1 ./ (2 * numel(new_enh_sol));
c = tic();
sES = num_blobs * gtMathsSumCellVolumes(new_enh_sol) / (2 * numel(new_enh_sol));
sES = sigma * gtMathsSumCellVolumes(new_enh_sol);
self.statistics.add_timestamp(toc(c), 'cp_dual_update_tv', 'cp_dual_tv_reduction');
dsES = gtMathsGradient(sES);
......@@ -310,7 +310,7 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
q = gt6DUpdateDualTV_c(q, dsES, lambda, self.num_threads);
else
for n = 1:numel(q)
q{n} = q{n} + dsES{n};
q{n} = q{n} + sigma * dsES{n};
q{n} = lambda * q{n} ./ max(lambda, abs(q{n}));
end
end
......@@ -337,9 +337,7 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
function q = update_dual_l1(self, q, new_enh_sol, lambda)
num_vols = numel(q);
num_blobs = numel(self.blobs);
sigma = num_blobs / num_vols;
sigma = 1 / num_vols;
if (self.algo_ops_c_functions)
q = gt6DUpdateDualL1_c(q, new_enh_sol, lambda, sigma, self.num_threads);
......@@ -352,13 +350,11 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
end
function q_odf = update_dual_ODF(self, q_odf, new_enh_sol, sigma, sigma_1)
num_blobs = numel(self.blobs);
c = tic();
temp_odf = self.compute_solution_ODF(new_enh_sol);
self.statistics.add_timestamp(toc(c), 'cp_dual_update_ODF', 'cp_dual_ODF_compute');
q_odf = (q_odf + num_blobs * sigma .* (temp_odf - self.ODF)) .* sigma_1;
q_odf = (q_odf + sigma .* (temp_odf - self.ODF)) .* sigma_1;
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment