Skip to content

Commit a4fd458

Browse files
committed
Bug fix
-Fixed error in v1.3.0 with gel_inds, void_inds after new CALMetrics was introduced -Updated plotting to use CALMetrics.getInds
1 parent 094fbf2 commit a4fd458

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/CALOptimize.m

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
thresholds
1313
error
14-
gel_inds
15-
void_inds
1614
end
1715

1816
methods
@@ -43,7 +41,6 @@
4341

4442
obj.thresholds = zeros(1,opt_params.max_iter);
4543
obj.error = zeros(1,opt_params.max_iter);
46-
[obj.gel_inds,obj.void_inds] = obj.getInds();
4744
end
4845

4946
function [obj] = parseParams(obj,opt_params,proj_params)
@@ -130,7 +127,7 @@
130127
if ~isnan(obj.opt_params.threshold)
131128
curr_threshold = obj.opt_params.threshold;
132129
else
133-
curr_threshold = findThreshold(x,obj.target_obj.target,obj.gel_inds,obj.void_inds);
130+
curr_threshold = findThreshold(x,obj.target_obj.target);
134131
end
135132

136133
obj.thresholds(curr_iter) = curr_threshold; % store thresholds as a function of the iteration number
@@ -188,7 +185,7 @@
188185
runtime = toc;
189186
fprintf('Finished optimization of projections in %.2f seconds\n',runtime);
190187

191-
display.histogramProjRecon(opt_b,x,obj.gel_inds,obj.void_inds)
188+
display.histogramProjRecon(obj.target_obj.target,opt_b,x)
192189
display.showProjections(opt_b,'Optimized Projections');
193190
display.showDose(x,'Optimized Reconstruction');
194191
autoArrangeFigures(2,3) % automatically arrange figures on screen

src/Display.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@
6565
grid on
6666
end
6767

68-
function [] = histogramProjRecon(b,x,gel_inds,void_inds)
68+
function [] = histogramProjRecon(target,b,x)
69+
70+
71+
[gel_inds,void_inds] = CALMetrics.getInds(target);
72+
6973
figure(4)
7074

7175
subplot(2,1,1)

src/findThreshold.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
function [thresh] = findThreshold(x,target,gel_inds,void_inds)
2-
1+
function [thresh] = findThreshold(x,target)
2+
3+
[gel_inds,void_inds] = CALMetrics.getInds(target);
4+
35
thresh_low = min(x,[],'all');
46
thresh_high = max(x,[],'all');
57

0 commit comments

Comments
 (0)