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

FwdSim: Changed name to a field to respect compatibility with PhantomGenerator

parent de8d247c
No related branches found
No related tags found
No related merge requests found
...@@ -237,7 +237,7 @@ for n = first : last ...@@ -237,7 +237,7 @@ for n = first : last
'bbvim', [], ... % Image BB on V 'bbvim', [], ... % Image BB on V
'bbwim', [], ... % Image BB on W <- Not strictly w 'bbwim', [], ... % Image BB on W <- Not strictly w
'bbsize', [], ... % Image BoundingBox (includes margins) 'bbsize', [], ... % Image BoundingBox (includes margins)
'bbsize_bl', [], ... % Real Blob Bounding Box 'mbbsize', [], ... % Real (Measured) Blob Bounding Box
'intensity', [] ); % Blob original intensity 'intensity', [] ); % Blob original intensity
checkSpots = struct('info', cell(numspots, 1)); checkSpots = struct('info', cell(numspots, 1));
...@@ -346,7 +346,7 @@ for n = first : last ...@@ -346,7 +346,7 @@ for n = first : last
spotsCands.BoundingBoxYsize(cand_inc_index) ]; spotsCands.BoundingBoxYsize(cand_inc_index) ];
% The following should be beter than the previous, but it seems to % The following should be beter than the previous, but it seems to
% geneterate problems % geneterate problems
% bb(ii, :) = bls(cand_inc_index).bbsize_bl([1 2 4 5]); % bb(ii, :) = bls(cand_inc_index).mbbsize([1 2 4 5]);
intensity(ii) = bls(cand_inc_index).intensity; intensity(ii) = bls(cand_inc_index).intensity;
avg_pixel_int(ii) = intensity(ii) / sum(bls(cand_inc_index).mask(:)); avg_pixel_int(ii) = intensity(ii) / sum(bls(cand_inc_index).mask(:));
likelihood(ii) = ls(cand_inc_index); likelihood(ii) = ls(cand_inc_index);
...@@ -659,7 +659,7 @@ function proj_bls = predict_spot_masks_from_indexed(gr, grain_INDX, ... ...@@ -659,7 +659,7 @@ function proj_bls = predict_spot_masks_from_indexed(gr, grain_INDX, ...
bls_INDXTR = gtFwdSimBuildDifstackBlobs(difspotID_INDXTR, [], ... bls_INDXTR = gtFwdSimBuildDifstackBlobs(difspotID_INDXTR, [], ...
parameters, spotsCommProps.stackHSize, spotsCommProps.stackVSize); parameters, spotsCommProps.stackHSize, spotsCommProps.stackVSize);
% INDEXTER Data % INDEXTER Data
BBs = cat(1, bls_INDXTR(:).bbsize_bl); BBs = cat(1, bls_INDXTR(:).mbbsize);
BBs = BBs(:, [1 2 4 5]); BBs = BBs(:, [1 2 4 5]);
Ws = segmentedSpots.CentroidImage(difspotID_INDXTR) .* gtGetOmegaStepDeg(parameters); Ws = segmentedSpots.CentroidImage(difspotID_INDXTR) .* gtGetOmegaStepDeg(parameters);
...@@ -677,7 +677,7 @@ function proj_bls = predict_spot_masks_from_indexed(gr, grain_INDX, ... ...@@ -677,7 +677,7 @@ function proj_bls = predict_spot_masks_from_indexed(gr, grain_INDX, ...
proj_bls_original = gtFwdSimPredictProjectedGrainBBox(gr, BBs, Ws, onDet, parameters); proj_bls_original = gtFwdSimPredictProjectedGrainBBox(gr, BBs, Ws, onDet, parameters);
for ii_b = 1:numel(proj_bls) for ii_b = 1:numel(proj_bls)
proj_bls(ii_b).bbsize_bl = proj_bls_original(ii_b).bbsize; proj_bls(ii_b).mbbsize = proj_bls_original(ii_b).bbsize;
end end
end end
...@@ -685,8 +685,8 @@ function spot_props = predict_spot_properties(spotsCommProps, proj_bl, gr_stats, ...@@ -685,8 +685,8 @@ function spot_props = predict_spot_properties(spotsCommProps, proj_bl, gr_stats,
bb_size_factor = parameters.fsim.bbsize_factor; bb_size_factor = parameters.fsim.bbsize_factor;
% Minimums could be wrong by up to 2 pixels (roundings) % Minimums could be wrong by up to 2 pixels (roundings)
spot_props.XsizeMin = max(5, proj_bl.bbsize_bl(1) - bb_size_factor * gr_stats.bbxsstd - 2); spot_props.XsizeMin = max(5, proj_bl.mbbsize(1) - bb_size_factor * gr_stats.bbxsstd - 2);
spot_props.YsizeMin = max(5, proj_bl.bbsize_bl(2) - bb_size_factor * gr_stats.bbysstd - 2); spot_props.YsizeMin = max(5, proj_bl.mbbsize(2) - bb_size_factor * gr_stats.bbysstd - 2);
% Allowing for matching spots, even if the convex shape of the grain % Allowing for matching spots, even if the convex shape of the grain
% computed from indexter's selection had a limited angle view on the % computed from indexter's selection had a limited angle view on the
...@@ -694,8 +694,8 @@ function spot_props = predict_spot_properties(spotsCommProps, proj_bl, gr_stats, ...@@ -694,8 +694,8 @@ function spot_props = predict_spot_properties(spotsCommProps, proj_bl, gr_stats,
spot_props.XsizeMin = min(spot_props.XsizeMin, spotsCommProps.XsizeMin); spot_props.XsizeMin = min(spot_props.XsizeMin, spotsCommProps.XsizeMin);
spot_props.YsizeMin = min(spot_props.YsizeMin, spotsCommProps.YsizeMin); spot_props.YsizeMin = min(spot_props.YsizeMin, spotsCommProps.YsizeMin);
spot_props.XsizeMax = proj_bl.bbsize_bl(1) + bb_size_factor * gr_stats.bbxsstd; spot_props.XsizeMax = proj_bl.mbbsize(1) + bb_size_factor * gr_stats.bbxsstd;
spot_props.YsizeMax = proj_bl.bbsize_bl(2) + bb_size_factor * gr_stats.bbysstd; spot_props.YsizeMax = proj_bl.mbbsize(2) + bb_size_factor * gr_stats.bbysstd;
spot_props.thr_max_offset = spotsCommProps.thr_max_offset; spot_props.thr_max_offset = spotsCommProps.thr_max_offset;
end end
......
...@@ -23,7 +23,7 @@ function bl = gtFwdSimBuildDifstackBlobs(blobids, indexes, parameters, stackHSiz ...@@ -23,7 +23,7 @@ function bl = gtFwdSimBuildDifstackBlobs(blobids, indexes, parameters, stackHSiz
'bbvim', [], ... % Image BB on V 'bbvim', [], ... % Image BB on V
'bbwim', [], ... % Image BB on W <- Not strictly w 'bbwim', [], ... % Image BB on W <- Not strictly w
'bbsize', [], ... % Image BoundingBox (includes margins) 'bbsize', [], ... % Image BoundingBox (includes margins)
'bbsize_bl', [], ... % Real Blob Bounding Box 'mbbsize', [], ... % Real (Measured) Blob Bounding Box
'intensity', [] ); % Blob original intensity 'intensity', [] ); % Blob original intensity
for ii = reshape(indexes, 1, []) for ii = reshape(indexes, 1, [])
...@@ -36,7 +36,7 @@ function bl = gtFwdSimBuildDifstackBlobs(blobids, indexes, parameters, stackHSiz ...@@ -36,7 +36,7 @@ function bl = gtFwdSimBuildDifstackBlobs(blobids, indexes, parameters, stackHSiz
blob_bb = blob_bb([2 1 3 5 4 6]); blob_bb = blob_bb([2 1 3 5 4 6]);
bl(ii).bbsize_bl = blob_bb; bl(ii).mbbsize = blob_bb;
% We are applying a padding of one slice (perside) on the w % We are applying a padding of one slice (perside) on the w
% diretion % diretion
......
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