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

Synthetic grain fwd-proj: made mr easy to check fedpars' usage

parent 36d07665
No related branches found
No related tags found
No related merge requests found
...@@ -144,7 +144,8 @@ gv.cs = vox000sam(:, nv_ones) + (gv.ind - 0.5) .* phantom_voxsize(:, nv_ones); ...@@ -144,7 +144,8 @@ gv.cs = vox000sam(:, nv_ones) + (gv.ind - 0.5) .* phantom_voxsize(:, nv_ones);
% Producing centers and deformation components for projection % Producing centers and deformation components for projection
if (isfield(fedpars, 'volume_super_sampling') ... if (isfield(fedpars, 'volume_super_sampling') ...
&& (fedpars.volume_super_sampling > 1)) && (fedpars.volume_super_sampling > 1))
[gv.pcs, gv.d] = compute_oversampling_voxels(gv, dmvol, fedpars, phantom_voxsize); [gv.pcs, gv.d] = compute_oversampling_voxels(gv, dmvol, ...
phantom_voxsize, fedpars.volume_super_sampling, fedpars.gvtype);
else else
gv.pcs = gv.cs; gv.pcs = gv.cs;
gv.d = gv.dm; gv.d = gv.dm;
...@@ -264,15 +265,13 @@ end ...@@ -264,15 +265,13 @@ end
end end
function [gvpcs, gvd] = compute_oversampling_voxels(gv, dmvol, fedpars, voxsize) function [gvpcs, gvd] = compute_oversampling_voxels(gv, dmvol, voxsize, vssampling, gvtype)
nv = size(gv.ind, 2); nv = size(gv.ind, 2);
nv_ones = ones(nv, 1); nv_ones = ones(nv, 1);
vssampling = fedpars.volume_super_sampling;
num_subvoxels = vssampling ^ 3; num_subvoxels = vssampling ^ 3;
gvpcs = zeros(3, nv, num_subvoxels, fedpars.gvtype); gvpcs = zeros(3, nv, num_subvoxels, gvtype);
gvd = zeros(3, nv, num_subvoxels, fedpars.gvtype); gvd = zeros(3, nv, num_subvoxels, gvtype);
dmvol_size = [size(dmvol, 1), size(dmvol, 2), size(dmvol, 3)]'; dmvol_size = [size(dmvol, 1), size(dmvol, 2), size(dmvol, 3)]';
dmvol_size = dmvol_size(:, nv_ones); dmvol_size = dmvol_size(:, nv_ones);
......
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