diff --git a/MATLAB/Algorithms/PICCS.m b/MATLAB/Algorithms/PICCS.m index 792de229..459dfaf0 100644 --- a/MATLAB/Algorithms/PICCS.m +++ b/MATLAB/Algorithms/PICCS.m @@ -199,7 +199,7 @@ end if (iter==1 && verbose==1) expected_time=toc*maxiter; - disp('ADS-POCS'); + disp('PICCS'); disp(['Expected duration : ',secs2hms(expected_time)]); disp(['Exected finish time: ',datestr(datetime('now')+seconds(expected_time))]); disp(''); diff --git a/MATLAB/Utilities/computeV.m b/MATLAB/Utilities/computeV.m index 2150c703..21980d3d 100644 --- a/MATLAB/Utilities/computeV.m +++ b/MATLAB/Utilities/computeV.m @@ -8,7 +8,6 @@ end V=zeros(geo.nVoxel(1),geo.nVoxel(2) ,length(alphablocks),'single'); -%geo.offDetector(1) = geo.offDetector(1) + (geo.DSD(1) / geo.DSO(1)) * geo.COR(1); geo=checkGeo(geo,angles); if ~isfield(geo,'mode')||~strcmp(geo.mode,'parallel') @@ -16,10 +15,9 @@ auxang=alphablocks{ii}; auxindex=orig_index{ii}; auxgeo = geo; - % expand the detector to avoiding zeros in backprojection - maxsize=max(auxgeo.sVoxel+geo.offOrigin(:,auxindex),[],2); - auxgeo.sDetector=max(auxgeo.sDetector , [maxsize(1); maxsize(3)] *geo.DSD/geo.DSO); - auxgeo.dDetector = auxgeo.sDetector ./ auxgeo.nDetector; + % shrink the volume to avoiding zeros in backprojection + auxgeo.sVoxel = auxgeo.sVoxel * max(auxgeo.sVoxel(1:2)/norm(auxgeo.sVoxel(1:2),2)) * 0.9; + auxgeo.dVoxel = auxgeo.sVoxel ./ auxgeo.nVoxel; % subset of projection angles auxgeo.DSD = geo.DSD(auxindex); auxgeo.DSO = geo.DSO(auxindex); @@ -27,10 +25,10 @@ auxgeo.offDetector = geo.offDetector(:,auxindex); auxgeo.rotDetector = geo.rotDetector(:,auxindex); auxgeo.COR = geo.COR(auxindex); - %auxgeo=geo; - V(:,:,ii) = mean(Atb(ones(geo.nDetector(2),geo.nDetector(1),size(auxang,2),'single'),auxgeo,auxang,'gpuids',gpuids),3)+0.000001; + V(:,:,ii) = mean(Atb(ones(geo.nDetector(2),geo.nDetector(1),size(auxang,2),'single'),auxgeo,auxang, 'gpuids', gpuids),3); + + %V(:,:,ii) = mean(Atb(ones(geo.nDetector(2),geo.nDetector(1),length(auxang),'single'),auxgeo,auxang, 'gpuids', gpuids),3); end - V(V==0.0)=Inf; else for ii=1:length(alphablocks) V(:,:,ii)=ones(geo.nVoxel(1:2).','single')*length(alphablocks{ii});