os_asums.m

来自「实现PET/SPECT 幻影图像regression的matlab源代码 al」· M 代码 · 共 26 行

M
26
字号
 function Asums = os_asums(Gt, ci, nb, nsubset)%function Asums = os_asums(Gt, ci, nb, nsubset)%%	for ordered subsets (block iterative, incremental gradient) algorithms,%	we need to precompute the following backprojections:%		\sum_{i \in subset_m} a_ij = \sum_{i \in subset_m} c_i g_ijif nargin ~= 4, help(mfilename), error(mfilename), endna = ncol(Gt) / nb;if na * nb ~= ncol(Gt)	error('block size not a divisor of projection data size')end[starts, nsubset] = subset_start(nsubset);if ~isvar('ci') | isempty(ci)	ci = ones(nb,na);endfor iset=1:nsubset        ia = starts(iset):nsubset:na;        ii = outer_sum(1:nb,(ia-1)*nb);         % relevant row indices        Asums(:,iset) = Gt(:,ii) * col(ci(:,ia));end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?