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

Shape-functions: fixed a few bugs in the generation functions

parent 8ae33233
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ function shape_funcs = gtDefShapeFunctionsFwdProjUVW(sampler, varargin)
conf = struct( ...
'recenter_sf', true, ...
'data_type', [], ...
'data_type', 'single', ...
'factor', 1, ...
'rspace_oversampling', 1, ...
'rspace_voxel_size', [1 1 1], ...
......@@ -90,7 +90,10 @@ function shape_funcs = gtDefShapeFunctionsFwdProjUVW(sampler, varargin)
or = sampler.lattice(1).gr{ii_g};
shape_funcs{ii_g} = gtDefFwdProjGvdm(or, sel_bls, gv, ...
or_gv = gv;
or_gv.d = gtMathsRodSum(or.R_vector', or_gv.d);
shape_funcs{ii_g} = gtDefFwdProjGvdm(or, sel_bls, or_gv, ...
fedpars, sampler.parameters, det_ind, false);
fprintf(repmat('\b', [1, num_chars]));
......
......@@ -194,6 +194,25 @@ function sfs_uvw = gtDefShapeFunctionsNW2UVW(sampler, sfs_nw, varargin)
sfs_out(ii_b).bbwim = lims_w(ii_b, :);
sfs_out(ii_b).bbsize = uvw_blob_size;
sfs_out(ii_b).bbuim = or_uv_shift(ii_b, [1 1]) + [-1 1] * (uv_shift(1) - 1);
sfs_out(ii_b).bbvim = or_uv_shift(ii_b, [2 2]) + [-1 1] * (uv_shift(2) - 1);
sfs_out(ii_b).bbwim = lims_w(ii_b, :);
sfs_out(ii_b).bbsize = uvw_blob_size;
uproj = sum(sum(abs(sfs_out(ii_b).intm), 2), 3);
vproj = sum(sum(abs(sfs_out(ii_b).intm), 1), 3);
wproj = sum(sum(abs(sfs_out(ii_b).intm), 1), 2);
sfs_out(ii_b).mbbu = [find(uproj, 1, 'first'), find(uproj, 1, 'last')] + sfs_out(ii_b).bbuim(1) - 1;
sfs_out(ii_b).mbbv = [find(vproj, 1, 'first'), find(vproj, 1, 'last')] + sfs_out(ii_b).bbvim(1) - 1;
sfs_out(ii_b).mbbw = [find(wproj, 1, 'first'), find(wproj, 1, 'last')] + sfs_out(ii_b).bbwim(1) - 1;
sfs_out(ii_b).mbbsize = [ ...
sfs_out(ii_b).mbbu(2) - sfs_out(ii_b).mbbu(1) + 1, ...
sfs_out(ii_b).mbbv(2) - sfs_out(ii_b).mbbv(1) + 1, ...
sfs_out(ii_b).mbbw(2) - sfs_out(ii_b).mbbw(1) + 1 ];
end
sfs_uvw{ii_o} = sfs_out;
......
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