plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | ismrmrd/ismrmrd-paper-master | pwls_sqs_os.m | .m | ismrmrd-paper-master/code/extern/irt/wls/pwls_sqs_os.m | 4,191 | utf_8 | 6b197dad846005c3379cede039c1d1a3 | function [xs, info] = pwls_sqs_os(x, Ab, yi, R, varargin)
%|function [xs, info] = pwls_sqs_os(x, Ab, yi, R, [options])
%|
%| penalized weighted least squares estimation / image reconstruction
%| using separable quadratic surrogates algorithm with
%| (optionally relaxed) ordered subsets. (relaxation ensures convergen... |
github | ismrmrd/ismrmrd-paper-master | qpwls_bb1.m | .m | ismrmrd-paper-master/code/extern/irt/wls/qpwls_bb1.m | 5,870 | utf_8 | ec9a3eda5e8154f08cac635506779cfe | function [xs, info] = qpwls_bb1(x, A, W, yi, C, varargin)
%|function [xs, info] = qpwls_bb1(x, A, W, yi, C, [options])
%|
%| quadratic penalized weighted least squares (QPWLS) via
%| preconditioned (todo) Barzilai and Borwein gradient method.
%| cost(x) = (y-Ax)'W(y-Ax) / 2 + x'C'Cx / 2
%|
%| in
%| x [np 1] initial ... |
github | ismrmrd/ismrmrd-paper-master | pwls_pcg1.m | .m | ismrmrd-paper-master/code/extern/irt/wls/pwls_pcg1.m | 7,803 | utf_8 | d2f1dc22d5993d8c0b52ab978cabe107 | function [xs, info] = pwls_pcg1(x, A, W, yi, R, varargin)
%function [xs, info] = pwls_pcg1(x, A, W, yi, R, [options])
%|
%| penalized weighted least squares (PWLS)
%| with convex non-quadratic regularization,
%| minimized via preconditioned conjugate gradient algorithm.
%| cost(x) = (y-Ax)'W(y-Ax)/2 + R(x)
%|
%| in
%|... |
github | ismrmrd/ismrmrd-paper-master | qpwls_psd.m | .m | ismrmrd-paper-master/code/extern/irt/wls/qpwls_psd.m | 3,317 | utf_8 | d2983170e45b5a9604a3e1cb862e6b57 | function [xs, info] = qpwls_psd(x, A, W, yi, C, varargin)
%|function [xs, info] = qpwls_psd(x, A, W, yi, C, [options])
%|
%| quadratic penalized weighted least squares (QPWLS) via
%| preconditioned steepest descent (PSD) algorithm
%| cost(x) = (y-Ax)'W(y-Ax) / 2 + x'C'Cx / 2
%|
%| in
%| x [np 1] initial estimate
%| ... |
github | ismrmrd/ismrmrd-paper-master | pwls_admm2.m | .m | ismrmrd-paper-master/code/extern/irt/wls/pwls_admm2.m | 8,221 | utf_8 | 46f72dc0219f9ce7248999200558b1d3 | function [xs, info] = pwls_admm2(x, A, W, yi, C, varargin)
%function [xs, info] = pwls_admm2(x, A, W, yi, C, [options])
%|
%| penalized weighted least squares (PWLS) image reconstruction/restoration
%| with convex non-quadratic regularization,
%| cost(x) = (y-Ax)'W(y-Ax)/2 + reg * pot(C * x)
%| minimized via ADMM algo... |
github | ismrmrd/ismrmrd-paper-master | pwls_sor.m | .m | ismrmrd-paper-master/code/extern/irt/wls/pwls_sor.m | 3,859 | utf_8 | 47b1c0b5b0c9a79b9246d95605a388ea | From smalone@engin.umich.edu Wed Jul 15 13:37:52 1998
To: "Jeffrey A. Fessler" <fessler@eecs.umich.edu>
Subject: Re: pwls_sor
Prof. Fessler,
I'm sending along two of my pwls_sor routines. Both compute one iteration
of the routine. One uses precomputed diag[G'*W*G]. The other does not.
I could combine the two, if y... |
github | ismrmrd/ismrmrd-paper-master | qpwls_pcg1.m | .m | ismrmrd-paper-master/code/extern/irt/wls/arch/qpwls_pcg1.m | 3,314 | utf_8 | fd3f754f50a8b368040d6e09fdf1914c | function [xs, info] = qpwls_pcg1(x, G, W, yi, C, varargin)
%function [xs, info] = qpwls_pcg1(x, G, W, yi, C, [options])
%
% quadratic penalized weighted least squares via
% preconditioned conjugate gradients (PCG) algorithm
% cost(x) = (y-Gx)'W(y-Gx)/2 + x'C'Cx/2
% in
% x [np,1] initial estimate
% G [nd,np] system m... |
github | ismrmrd/ismrmrd-paper-master | pwls_sps.m | .m | ismrmrd-paper-master/code/extern/irt/wls/arch/pwls_sps.m | 2,077 | utf_8 | 5d799707ddebdbd6ef6a44aa3df5f359 | function xs = pwls_sps(x, Gt, wi, yi, P, niter, pixmax, ldenom, gi)
%function xs = pwls_sps(x, Gt, wi, yi, P, niter, pixmax, ldenom, gi)
%
% penalized weighted least squares image reconstruction
% using separable paraboloidal surrogates algorithm
% cost function: J(x) = (y-Gx) W (y-Gx) / 2 + x' C' C x / 2
% Inputs req... |
github | ismrmrd/ismrmrd-paper-master | strvcat.m | .m | ismrmrd-paper-master/code/extern/irt/freemat/strvcat.m | 272 | utf_8 | 90fa0731122679f089828dfb7fbde41a | %| function out = strvcat(varargin)
%|
%| (for freemat)
function out = strvcat(varargin)
% for compatability with matlab, remove empty arguments
tmp = {};
for ii=1:length(varargin)
if ~isempty(varargin{ii})
tmp = {tmp{:}, varargin{ii}};
end
end
out = char(tmp{:});
|
github | ismrmrd/ismrmrd-paper-master | isequal.m | .m | ismrmrd-paper-master/code/extern/irt/freemat/isequal.m | 915 | utf_8 | 1ba0cf9dd50bfe69854faa7414ad7595 | function out = isequal(a,b)
%function out = isequal(a,b)
% needed for freemat 4.0
if nargin < 2, help(mfilename), error(mfilename), end
out = false;
% check that class type matches
if ~isnumeric(a) || ~isnumeric(b)
if ~streq(class(a), class(b)), return, end
end
if ischar(a)
out = streq(a, b);
return
end
if isce... |
github | ismrmrd/ismrmrd-paper-master | strmatch.m | .m | ismrmrd-paper-master/code/extern/irt/freemat/pre-4.0/strmatch.m | 1,059 | utf_8 | 0347fe3860ac2aebcfb853e5e41ad8bd | function out = strmatch(str, strs, type)
%function out = strmatch(str, strs, type)
% return matching row indices
if nargin == 1 && streq(str, 'test'), strmatch_test, return, end
if nargin < 3, help(mfilename), error(mfilename), end
if ~streq(type, 'exact'), error('only "exact" done'), end
if iscell(strs)
nstr = len... |
github | ismrmrd/ismrmrd-paper-master | subsasgn.m | .m | ismrmrd-paper-master/code/extern/irt/freemat/pre-3.6/subsasgn.m | 787 | utf_8 | 5f5fd80e8d836587f9c46393402aaae1 | function out = subsasgn(a, s, b)
%function out = subsasgn(a, s, b)
if nargin == 1 && streq(a, 'test'), subsasgn_test, return, end
if nargin < 3, help(mfilename), error(mfilename), end
out = a;
% out = builtin('subsasgn', varargin{:}); % seems to recurse
% a.s = b;
if length(s) == 1 && streq(s(1).type, '.')
out.(s(... |
github | ismrmrd/ismrmrd-paper-master | penalty_mex.m | .m | ismrmrd-paper-master/code/extern/irt/freemat/pre-3.5/penalty_mex.m | 5,279 | utf_8 | 4c050f4d3802c7d66298ca64a07c6839 | function out = penalty_mex(arg, varargin)
%function out = penalty_mex(arg, varargin)
% m-file interface to penalty_mex.mex*
% Usage for penalty_mex:
% d = function('diff1,forw1', x, offsets, [lastdim]);
% d = C * x
% offsets is int32 array such as [1 nx nx-1 nx+1].
% Usually lastdim is absent, and x is treated as s... |
github | ismrmrd/ismrmrd-paper-master | myiswt2.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/myiswt2.m | 2,208 | utf_8 | f29f4f2652fb13bafdd45302978ef924 | function a = myiswt2(swc, lo_r, hi_r)
% ISWT2 Inverse discrete stationary wavelet transform 2-D.
% ISWT2 performs a multilevel 2-D stationary wavelet
% reconstruction using either a specific orthogonal wavelet
% ('wname', see WFILTERS for more information) or specific
% reconstruction filters (Lo_r and Hi_r).
%
... |
github | ismrmrd/ismrmrd-paper-master | Reg1.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Reg1.m | 23,040 | utf_8 | 60fef255a1477f6a3d17b365faecbd8c | function R = Reg1(kappa, varargin)
%function R = Reg1(kappa, [options])
%|
%| Build roughness penalty regularization "object" based on Cdiff1() objects,
%| for regularized solutions to inverse problems.
%| This version supercedes Robject() by providing its capabilities while
%| also providing options that use less mem... |
github | ismrmrd/ismrmrd-paper-master | penalty_displace.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/penalty_displace.m | 3,585 | utf_8 | daae8a09db6bcc8839e0e437f74deb52 | function displace = penalty_displace(offsets, sizes)
%|function displace = penalty_displace(offsets, sizes)
%|
%| Convert scalar offsets to vector displacements, i.e.,
%| find d1,d2,... such that d1*1 + d2*n1 + d3*n1*n2 + ... = offset.
%| Example: if offset = n1, then [d1 d2 d3] = [0 1 0]
%| Assumes that d <= floor(n... |
github | ismrmrd/ismrmrd-paper-master | Cdiff1_tune.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Cdiff1_tune.m | 3,013 | utf_8 | 3ecb396069b71348797f5bbf64a0bf07 | function type_diff = Cdiff1_tune(isize, varargin)
%function type_diff = Cdiff1_tune(isize, [options])
%|
%| "Auto-tune" function for Cdiff1() that selects the fastest overall method
%|
%| in
%| isize [] vector of object dimensions (N), e.g., [64 64]
%|
%| option:
%| 'offset' [int] offset (default: 1)
%| 'order' 1 or... |
github | ismrmrd/ismrmrd-paper-master | huber_pot.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/huber_pot.m | 383 | utf_8 | 7074ef88c04edbf2d8a674143a224881 | function h = huber_pot(t, d)
%| function h = huber_pot(t, d)
%| huber potential function
if nargin < 1, help(mfilename), error(mfilename), end
if nargin < 2, huber_pot_test, return, end
h = t.^2 / 2;
ii = abs(t) > d;
h(ii) = d * abs(t(ii)) - d.^2/2;
function huber_pot_test
t = linspace(-9,9,101);
delta = 4;
plot(t, ... |
github | ismrmrd/ismrmrd-paper-master | ir_hct_rgrad.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/ir_hct_rgrad.m | 4,672 | utf_8 | 328fac6e04b83f7ce893fd9b056ef097 | function [grad out com] = ir_hct_rgrad(x, varargin)
%|function [grad out com] = ir_hct_rgrad(x, varargin)
%|
%| compute 3D regularizer gradient using hct binary
%| for UM testing only
%|
%| in
%| x in xyz order
%| option
%| (many - see below)
%|
%| Notes: because hct2 uses 'zxy' order, it is essential to use Reg1
%| ... |
github | ismrmrd/ismrmrd-paper-master | qpwls_psf.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/qpwls_psf.m | 13,114 | utf_8 | e610d68a9b49f03e6281558a0c2d46f4 | function [psf, var, fwhm, mtf, con] = qpwls_psf(A, C, beta, mask, W, varargin)
%|function [psf, var, fwhm, mtf, con] = qpwls_psf(A, C, beta, mask, W, [option])
%|
%| Compute FFT-approximate PSF
%| for quadratically-penalized shift-invariant unweighted least-squares
%| uses psf = [A'WA + beta C'C]^{-1} A'W y, where us... |
github | ismrmrd/ismrmrd-paper-master | C2sparse.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/C2sparse.m | 4,020 | utf_8 | bccb4c431c640ab2b5479d543ee2188c | function [C, wjk] = C2sparse(type, kappa, nbrs, chat, dist_power)
%function [C, wjk] = C2sparse(type, kappa, nbrs, chat, dist_power)
%
% create 2D penalty matrix C with 2nd-order pixel neighborhood
% that performs 1st-order finite differences.
% R = beta * C'*D(wjk)*C is the penalty Hessian (in quadratic case)
% in:
%... |
github | ismrmrd/ismrmrd-paper-master | potential_shift.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/potential_shift.m | 1,363 | utf_8 | 99ba645443a4bfba020e125120157dd1 | function pot_new = potential_shift(pot_orig, vector)
%function pot_new = potential_shift(pot_orig, vector)
%
% Change pot_orig([Cx]_k) to shifted form: pot_new( [Cx]_k - vector_k )
%
% out
% inline functions:
% pot.potk(pot, C*x) potential function value
% pot.wpot(pot, C*x) potential 'weights' (aka half-quad. curvatu... |
github | ismrmrd/ismrmrd-paper-master | reg_offset_xyz_to_zxy.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/reg_offset_xyz_to_zxy.m | 1,657 | utf_8 | 9596eb6b6022420c7d50c90ab4e21aee | function offset_zxy = reg_offset_xyz_to_zxy(offset_xyz, dim_xyz)
%|function offset_zxy = reg_offset_xyz_to_zxy(offset_xyz, dim_xyz)
%|
%| convert usual offsets for xyz image ordering
%| to offsets appropriate for zxy image ordering
%|
%| in
%| offset_xyz [1 noffset]
%| dim_xyz [3]
%|
%| out
%| offset_zxy [1 noffset]... |
github | ismrmrd/ismrmrd-paper-master | Robject.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Robject.m | 8,400 | utf_8 | 6740434c3f5b9f3364ae62f968ebdb6e | function R = Robject(kappa, varargin)
%function R = Robject(kappa, [options])
%
% Build roughness penalty regularization "object" based on C = Cdiff() object,
% for regularized solutions to inverse problems.
%
% General form of nonquadratic penalty function:
% R(x) = \sumk w_k \pot([Cx]_k), where [Cx]_k = \sum_j c_{kj... |
github | ismrmrd/ismrmrd-paper-master | Cdiff1.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Cdiff1.m | 19,004 | utf_8 | e85e378261250a5e825e21d69604e79b | function ob = Cdiff1(isize, varargin)
%|function C1 = Cdiff1(isize, [options])
%|
%| Construct Cdiff1 object that can compute C1 * x and the adjoint C1' * d
%| for a "finite differencing" matrix C1 for roughness penalty regularization.
%| This object provides the finite difference in only a *single* direction,
%| so ... |
github | ismrmrd/ismrmrd-paper-master | Csparse.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Csparse.m | 5,746 | utf_8 | d6e181cab286d0f68dcd0c0bcc173df6 | function [C, ugibb] = Csparse(arg0, arg1, arg2, arg3)
%function C = Csparse('b2info', kappa, mask, chat)
%function C = Csparse('center', Cscale, mask, chat)
%function C = Csparse('maskleak', mask, chat)
%function C = Csparse('maskleak3', [beta_xy beta_z], mask, chat)
%function C = Csparse('maskbar', mask, chat)
%funct... |
github | ismrmrd/ismrmrd-paper-master | Cdiff.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Cdiff.m | 5,303 | utf_8 | 199166d71c81af27b920d06c547dc4dc | function ob = Cdiff(kappa, varargin)
%|function C = Cdiff(kappa, [options])
%|
%| This object has been made obsolete by Cdiff1.m and Reg1.m
%|
%| Construct Cdiff object that can compute C * x and the adjoint C' * d
%| for a "differencing" matrix C for roughness penalty regularization.
%| This object is used internall... |
github | ismrmrd/ismrmrd-paper-master | penalty2_design.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/penalty2_design.m | 7,202 | utf_8 | 8d3cfcdf12fcd3db5ed8ad7bd3946e55 | function [C, rj] = penalty2_design(type, varargin)
%|function [C, rj] = penalty2_design(type, ['leak'|'tight'], wang, ang, mask)
%|
%| Design the penalty matrix "C" (and penalty coefficients "rj")
%| for a quadratic penalty R(x) = 1/2 x' C * C * x with:
%| 1st-order differences and a 2nd-order neighborhood (8 neighbor... |
github | ismrmrd/ismrmrd-paper-master | adw_fan_new.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/adw_fan_new.m | 4,058 | utf_8 | 1c487be9ecb8ec3416473a460a9611e4 | function [w0, phi] = adw_fan_new(sg, ig, wi)
%function [w0, phi] = adw_fan_new(sg, ig, wi)
%
% Compute the angular-dependent weighting for fan-beam geometry.
% w0(\Phi) = w(x0, y0, \Phi)
% For fully corrected penalty:
% w(s',\beta') * J(s') | \phi'=\Phi + ...
% w(s',\beta') * J(s') | \phi'=\Phi-pi
% See fessler chapte... |
github | ismrmrd/ismrmrd-paper-master | RfromC.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/RfromC.m | 2,319 | utf_8 | 1624a52ba01ac641bb1caf5142d46a78 | function R = RfromC(varargin)
%|function R = RfromC(varargin)
%|
%| Create regularization object from "analysis" matrix (or fatrix2) C1.
%|
%| R(x) = sum_k wt_k pot([C1*x]_k)
%|
%| option
%| 'C1' from Godwt1 or such. default: 1
%| must be capable of providing abs(C1)
%| 'pot' from potential_fun. default: quadrat... |
github | ismrmrd/ismrmrd-paper-master | potential_fun.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/potential_fun.m | 21,627 | utf_8 | 8bb1e39d96448d7d710b1c5f77a061a5 | function pot = potential_fun(type, delta, param, varargin)
%function pot = potential_fun(type, delta, param, varargin)
%|
%| Define roughness penalty potential functions (as strum).
%|
%| The penalty will have the form
%| R(x) = sum_k w_k * potential_k([Cx]_k, delta_k)
%| where w_k is provided elsewhere, not here!
%|
... |
github | ismrmrd/ismrmrd-paper-master | Rweights.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Rweights.m | 12,650 | utf_8 | f4fd48c7cc45684a035e350caae757a3 | function wt = Rweights(kappa, offsets, varargin)
%|function wt = Rweights(kappa, offsets, [options])
%|
%| Build "weights" for roughness penalty for regularized methods.
%| Intended to be used internally by roughness penalty object Reg1.
%|
%| General form of roughness penalty:
%| R(x) = sum_{m=1}^M sum_n w[n;m] pote... |
github | ismrmrd/ismrmrd-paper-master | penalty_distance.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/penalty_distance.m | 1,242 | utf_8 | 93af70a7c35044202b24a61aeba16350 | function distance = penalty_distance(offsets, sizes)
%|function distance = penalty_distance(offsets, sizes)
%|
%| convert scalar offsets to Euclidean distances to neighbors,
%| with the exception that '0' is mapped to 1 for identity case
%|
%| in
%| offsets [MM]
%| sizes [1 ndim]
%| out
%| distance [MM 1]
%|
%| Cop... |
github | ismrmrd/ismrmrd-paper-master | Gwave2.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Gwave2.m | 4,637 | utf_8 | 5be0e2f081a8433934e5cb21697d18b4 | function ob = Gwave2(varargin)
%|function ob = Gwave2([args])
%|
%| Construct object that performs wavelet analysis of a 2D image,
%| for regularization based on sparsity such as in compressed sensing.
%|
%| option
%| 'mask' logical [nx ny] image-domain mask, often: true(nx,ny)
%| 'wname' wavelet name (default: 'haa... |
github | ismrmrd/ismrmrd-paper-master | ugibb_form.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/ugibb_form.m | 6,599 | utf_8 | 87416f8889cb3121a9168ecb4481420c | function ugibb = ugibb_form(pic, varargin)
%|function ugibb = ugibb_form(pic, [options])
%|
%| form a "ugibb" structure from a 2D or 3D picture,
%| of potential use for regularization with side information.
%| Specifically can be used with ASPIRE 'ugibb' regularization option.
%| See Fessler et al, IEEE Tr. Nuc. Scie... |
github | ismrmrd/ismrmrd-paper-master | Gwave1.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Gwave1.m | 15,577 | utf_8 | ca8e67aaea2058d29f95b3fe4b0acadf | function ob = Gwave1( varargin )
%|function ob = Gwave1([args])
%| Construct Gwave object that computes wavelet decomposition of a
%| signal with dimensions [(Nd)]. This is useful for compressed sensing
%| imaging. (1D or 2D wavelets only)
%|
%| options:
%| 'mask' logical [(Nd)] image-domain mask, usually: true(nx,... |
github | ismrmrd/ismrmrd-paper-master | Godwt1.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Godwt1.m | 2,863 | utf_8 | d0e710edb6f854dd53b670f038e39566 | function ob = Godwt1(mask, varargin)
%|function ob = Godwt1(mask, varargin)
%| Construct Godwt1 object that computes orthonormal discrete wavelet
%| decomposition of a signal with dimensions [(N)].
%| This is useful for sparsity regularization (aka compressed sensing).
%| (1D or 2D wavelets only)
%|
%| in
%| 'mask' l... |
github | ismrmrd/ismrmrd-paper-master | penalty2_nuyts.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/penalty2_nuyts.m | 7,320 | utf_8 | 1ca70bcf6790bfe433f38d8dcdc21df5 | function [C, rj] = penalty2_nuyts(type, wang, ang, mask)
%|function [C, rj] = penalty2_nuyts(type, wang, ang, mask)
%|
%| Design the penalty matrix "C" (and penalty coefficients "rj")
%| for a quadratic penalty R(x) = 1/2 x' C * C * x with:
%| 1st-order differences and a 2nd-order neighborhood (8 neighbors).
%| Desig... |
github | ismrmrd/ismrmrd-paper-master | Cdiffs.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/Cdiffs.m | 7,538 | utf_8 | 186f05f2a91714f0672adb5996128c84 | function ob = Cdiffs(isize, varargin)
%|function C1 = Cdiffs(isize, [options])
%|
%| Construct C1 object that can compute C1 * x and the adjoint C1' * d
%| for a "finite differences" matrix C for roughness penalty regularization.
%| This "stacks up" multiple Cdiff1() objects, e.g., akin to using vertcat(),
%| for pos... |
github | ismrmrd/ismrmrd-paper-master | potential_func.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/potential_func.m | 6,692 | utf_8 | eb0881cb1de31aadc91582eda10e0589 | function pot = potential_func(type, delta, param)
%|function pot = potential_func(type, delta, param)
%|
%| Define roughness penalty potential functions (using function handles).
%|
%| The penalty will have the form
%| R(x) = sum_k w_k * potential_k([Cx]_k, delta_k)
%| where w_k is provided elsewhere, not here!
%|
%|... |
github | ismrmrd/ismrmrd-paper-master | Reg1_setup_zxy.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/private/Reg1_setup_zxy.m | 3,411 | utf_8 | 21bce2af9c3fa36fdab66cd80b2290f6 | function R = Reg1_setup_zxy(arg, kappa)
%function R = Reg1_setup_zxy(arg, kappa)
%|
%| Reg1_setup_zxy()
%|
%| mex-based calculations of penalty gradient/denom for zxy ordering
%|
%| caution: when this is called, arg.offsets must be w.r.t. [nz nx ny]
%| so the caller must take care to convert (if necessary) using
%| re... |
github | ismrmrd/ismrmrd-paper-master | Cmask.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/arch/Cmask.m | 2,089 | utf_8 | 04bcda4c4c8de825200e0e8edb9c8df0 | function [out] = Cmask(type, mask)
%function [out] = Cmask(type, mask)
% select appropriate portions of penalty_mex output based on support mask.
% Cmask() .* penalty_mex() should be same as C * x.
% in
% type string
% mask [nx,ny[,nz]] support
% out
% out [nx,ny,4] binary
%
% Copyright 2004-5-16, Jeff Fessler, The U... |
github | ismrmrd/ismrmrd-paper-master | Rbuild_new.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/arch/Rbuild_new.m | 4,748 | utf_8 | cb68886cfe43ae3dd38230441d6c9975 | function R = Rbuild(ctype, kappa, nbrs, beta, potential, delta, ...
match_aspire, dist_power)
%function R = Rbuild(ctype, kappa, nbrs, beta, potential, delta, ...
% match_aspire, dist_power)
%
% build a regularization "object" for penalized-likelihood reconstruction.
%
% general form of nonquadratic penalty functio... |
github | ismrmrd/ismrmrd-paper-master | penalty_funcs.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/arch/penalty_funcs.m | 4,682 | utf_8 | 5af80b084c2fed76c6415f04284c2f5a | function [potk, wpot, dpot] = penalty_funcs(type, beta, delta)
%function [potk, wpot, dpot] = penalty_funcs(type, beta, delta)
%
% Define roughness penalty functions via inline functions.
%
% If beta is numeric, then the penalty will have the form
% R(x) = sum_k beta * potential([Cx]_k, delta)
% If beta is empty, then... |
github | ismrmrd/ismrmrd-paper-master | Rmem.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/arch/Rmem.m | 11,361 | utf_8 | 01601d4dc1fdb887b68772f82d541967 | function R = Rmem(kappa, varargin)
%function R = Rmem(kappa, [options])
%
% Build roughness penalty regularization "object" based on C = Cdiff() object,
% for regularized solutions to inverse problems.
% This version is somewhat less flexible than Robject() but uses less memory.
%
% General form of nonquadratic penalt... |
github | ismrmrd/ismrmrd-paper-master | Rbuild.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/arch/Rbuild.m | 4,732 | utf_8 | ae00bd76584d5f257d217edf74673b2d | function R = Rbuild(ctype, kappa, nbrs, beta, potential, delta, ...
match_aspire, dist_power)
%function R = Rbuild(ctype, kappa, nbrs, beta, potential, delta, ...
% match_aspire, dist_power)
%
% build a regularization "object" for penalized-likelihood reconstruction.
%
% general form of nonquadratic penalty functio... |
github | ismrmrd/ismrmrd-paper-master | Rmem_somesh.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/arch/Rmem_somesh.m | 17,475 | utf_8 | 667bc93584ca7b19a783f38df32f6517 | function R = Rmem(kappa, varargin)
%function R = Rmem(kappa, [options])
%
% Build roughness penalty regularization "object" based on C = Cdiff() object,
% for regularized solutions to inverse problems.
% This version is somewhat less flexible than Robject() but uses less memory.
%
% General form of nonquadratic penalty... |
github | ismrmrd/ismrmrd-paper-master | embed_fatrix.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/arch/embed_fatrix.m | 511 | utf_8 | b9a50333b616c9ea59460d3ec403e655 | function ob = embed_fatrix(mask)
%function ob = embed_fatrix(mask)
% Under Construction: perhaps not needed?
% in
% mask [dim] logical support mask
% out
% ob [*dim,np] np = sum(mask(:))
arg.nn = numel(mask);
arg.np = sum(mask(:));
dim = [arg.nn arg.np];
ob = fatrix(dim, 'forw', @embed_fatrix_forw, 'back', @embed_fatr... |
github | ismrmrd/ismrmrd-paper-master | Cdiffs.m | .m | ismrmrd-paper-master/code/extern/irt/penalty/arch/Cdiffs.m | 2,264 | utf_8 | ce5238a9c70cf8537395ecc4f29c0913 | function ob = Cdiffs(isize, varargin)
%function C1 = Cdiffs(isize, [options])
%
% Construct C1 object that can compute C1 * x and the adjoint C1' * d
% for a "differencing" matrix C for roughness penalty regularization.
% This object "stacks up" multiple Cdiff1() objects using block_fatrix()
% for possible internal us... |
github | ismrmrd/ismrmrd-paper-master | fftn_fast.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/fftn_fast.m | 2,536 | utf_8 | 45eea8a7988be9d007556ae10931481b | function Xs = fftn_fast(xs, ns)
%|function Xs = fftn_fast(xs, ns)
%|
%| For some reason, in matlab versions before about 7.4 (R2007a),
%| matlab's fftn routine was suboptimal for the case of 2D FFTs,
%| at least on some machines.
%| The improvement herein was found by Hugo Shi.
%| After 7.4, fftn worked fine so this ... |
github | ismrmrd/ismrmrd-paper-master | ir_sinc_nopi.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/ir_sinc_nopi.m | 786 | utf_8 | a988e7c3342459438bdcb60165e16a06 | function y = ir_sinc_nopi(x)
%function y = ir_sinc_nopi(x)
%|
%| no pi version of "sinc" function, because matlab's sinc() is in a toolbox
%|
%| Copyright 2001-12-8, Jeff Fessler, University of Michigan
%| Modified by M Allison to not have a pi.
if nargin < 1, help(mfilename), error(mfilename), end
if streq(x, 'test'... |
github | ismrmrd/ismrmrd-paper-master | nufft_init.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/nufft_init.m | 9,545 | utf_8 | 120d20c39100b77720d93d351e8a7a06 | function st = nufft_init(om, Nd, Jd, Kd, varargin)
%function st = nufft_init(om, Nd, Jd, Kd, [n_shift,] ...)
%|
%| Initialize structure for d-dimension NUFFT using KB interpolator,
%| particularly the interpolation matrix in sparse format.
%| caution: this routine can require a lot of memory!
%| in
%| om [M d] "digita... |
github | ismrmrd/ismrmrd-paper-master | dtft.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/dtft.m | 3,773 | utf_8 | 16434318e110e05a43a4688c27874e78 | function X = dtft(x, omega, varargin)
%|function X = dtft(x, omega [,options])
%|
%| Compute d-dimensional DTFT of signal x at frequency locations omega
%|
%| in
%| x [(Nd) L] signal values
%| omega [M dd] frequency locations (radians), dd = numel(Nd)
%|
%| option
%| 'n_shift' [dd 1] use [0:N-1]-n_shift (default [0 ... |
github | ismrmrd/ismrmrd-paper-master | newfft.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/newfft.m | 18,075 | utf_8 | adc488b6dfedc713130f4db30fcf2933 | function st = newfft(om_in, Nd_in, varargin)
%|function st = newfft(om, Nd, [options])
%|
%| New version of NUFFT (pun intended) that uses real interpolation kernels.
%| (The original NUFFT code used complex interpolation needlessly.)
%|
%| This returns a "strum" object with methods for both forward and adjoint
%| d-... |
github | ismrmrd/ismrmrd-paper-master | kaiser_bessel.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/kaiser_bessel.m | 4,446 | utf_8 | 20a33a464cf8f7ed3a74706e63959bb1 | function [kb, alpha, kb_m] = kaiser_bessel(x, J, alpha, kb_m, K_N)
%function [kb, alpha, kb_m] = kaiser_bessel(x, J, alpha, kb_m)
%function [kb, alpha, kb_m] = kaiser_bessel(x, J, 'best', 0, K_N)
%|
%| generalized Kaiser-Bessel function for x in support [-J/2,J/2]
%| shape parameter "alpha" (default 2.34 J)
%| order p... |
github | ismrmrd/ismrmrd-paper-master | kaiser_bessel_xray.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/kaiser_bessel_xray.m | 2,171 | utf_8 | 20c7fd23b0117fae5747e6138c3e10be | function [proj, J, alpha, kb_m, d] = kaiser_bessel_xray(r, J, alpha, kb_m, d)
%function [proj, J, alpha, kb_m, d] = kaiser_bessel_xray(r, J, alpha, kb_m, d)
%
% X-ray transform of generalized Kaiser-Bessel function,
% See (A7) in lewitt:90:mdi, JOSA-A, Oct. 1990.
%
% in
% r [?] radial locations in projection space (un... |
github | ismrmrd/ismrmrd-paper-master | kaiser_bessel_ft.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/kaiser_bessel_ft.m | 2,917 | utf_8 | 55a5441789ed3aeef16729508beaef41 | function y = kaiser_bessel_ft(u, J, alpha, kb_m, d)
%function y = kaiser_bessel_ft(u, J, alpha, kb_m, d)
%
% Fourier transform of generalized Kaiser-Bessel function,
% in dimension d (default 1).
% shape parameter "alpha" (default 2.34 J)
% order parameter "kb_m" (default 0)
% See (A3) in lewitt:90:mdi, JOSA-A, Oct. 1... |
github | ismrmrd/ismrmrd-paper-master | ifftn_fast.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/ifftn_fast.m | 2,149 | utf_8 | 3749fee0395f552bc7cf2430bba890df | function ys = ifftn_fast(xs)
%|function ys = ifftn_fast(xs)
%|
%| For some reason, matlab's ifftn routine is suboptimal
%| for the case of 2D FFTs, at least on some machines.
%| The improvement herein was found by Hugo Shi.
%|
%| Note: matlab's ifft() and ifftn() handle an optional second "N" argument in
%| different... |
github | ismrmrd/ismrmrd-paper-master | nufft1_build.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/nufft1_build.m | 6,831 | utf_8 | 47a9e904b7cd7d0d576d315e52313b71 | function st = nufft1_build(J, varargin)
%function st = nufft1_build(J, [option])
%| Build 1D LS-NUFFT interpolation coefficients by brute force.
%|
%| in
%| J neighborhood size: [-J/2,J/2]
%| option
%| om [M 1] frequency locations, if not provided build fine table
%| N # of signal values (default: 2^8)
%| K # of DF... |
github | ismrmrd/ismrmrd-paper-master | nufft_scale.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/nufft_scale.m | 1,782 | utf_8 | 3d9a700fb548713bc674a82ee26a673a | function sn = nufft_scale(Nd, Kd, alpha, beta, Nmid)
%function sn = nufft_scale(Nd, Kd, alpha, beta, Nmid)
% Compute scaling factors for NUFFT
% in
% Nd,Kd
% alpha {d}
% beta {d}
% option
% Nmid [d] midpoint: floor(Nd/2) or default (Nd-1)/2
% out
% sn [[Nd]] scaling factors
%
% Copyright 2004-7-8, Jeff Fessler, The ... |
github | ismrmrd/ismrmrd-paper-master | nufft_sinc.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/nufft_sinc.m | 695 | utf_8 | e6857ad90712d847152c31e539b33d09 | function y = nufft_sinc(x)
%|function y = nufft_sinc(x)
%|
%| my version of "sinc" function, because matlab's sinc() is in a toolbox
%|
%| Copyright 2001-12-8, Jeff Fessler, University of Michigan
if nargin < 1, help(mfilename), error(mfilename), end
if streq(x, 'test'), nufft_sinc_test, return, end
iz = find(x == ... |
github | ismrmrd/ismrmrd-paper-master | nufft_diric.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/nufft_diric.m | 1,999 | utf_8 | 271ee48427961a368e4e0f64f481e0c1 | function f = nufft_diric(k, N, K, use_true_diric)
%|function f = nufft_diric(k, N, K, use_true_diric)
%|
%| "regular fourier" Dirichlet-function WITHOUT phase
%| nufft_diric(t) = sin(pi N t / K) / ( N * sin(pi t / K) )
%| \approx sinc(t / (K/N))
%|
%| caution: matlab's version is different: sin(N * x / 2) / (N * sin... |
github | ismrmrd/ismrmrd-paper-master | dtft_adj.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/dtft_adj.m | 2,513 | utf_8 | 365e6142f781387360ff6380084bc214 | function x = dtft_adj(X, omega, Nd, n_shift, useloop)
%|function x = dtft_adj(X, omega, Nd, n_shift, useloop)
%| Compute adjoint of d-dim DTFT for spectrum X at frequency locations omega
%| in
%| X [M L] dD DTFT values
%| omega [M d] frequency locations (radians)
%| n_shift [d 1] use [0:N-1]-n_shift (default [0 ..... |
github | ismrmrd/ismrmrd-paper-master | interp1_table1_import.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/table/interp1_table1_import.m | 413 | utf_8 | 0e4818f872ba8ea210db56495b187e58 | function interp1_table1_import
libname = 'interp1_table1.a';
type11r = ['double[K1] r_ck, double[K1] i_ck, int32 K1, ' ...
'double[J1*L1+1] r_h1, int32 J1, int32 L1, ' ...
'double[M] p_tm, int32 M, double[M] &r_fm, double[M] &i_fm'];
myimport(libname, 'interp1_table1_real_per', 'void', type11r);
function myimport... |
github | ismrmrd/ismrmrd-paper-master | nufft_interp_zn.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/private/nufft_interp_zn.m | 2,194 | utf_8 | 19b50f0ee43faa6a8824265f0516a25a | function zn = nufft_interp_zn(alist, N, J, K, func, Nmid)
%|function zn = nufft_interp_zn(alist, N, J, K, func, Nmid)
%| compute the "zn" terms for a conventional "shift-invariant" interpolator
%| as described in T-SP paper. needed for error analysis and for user-
%| defined kernels since i don't provide a means to ... |
github | ismrmrd/ismrmrd-paper-master | newfft_approx_for.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/private/newfft_approx_for.m | 1,794 | utf_8 | 9f6f995e5bc3c9e4502d112ffc5c7b8c | function X = newfft_approx_for(st, x, om)
%|function X = newfft_approx_for(st, x, om)
%| (approximate) forward NUFFT
Nd = st.Nd;
Kd = st.Kd;
dims = size(x);
dd = length(Nd);
if ndims(x) < dd, error 'input signal has too few dimensions', end
if any(dims(1:dd) ~= Nd), error 'input signal has wrong size', end
%
% th... |
github | ismrmrd/ismrmrd-paper-master | newfft_table_init.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/private/newfft_table_init.m | 5,812 | utf_8 | b37f03919ecb85b344b9b27b847ac7e1 | function st = newfft_table_init(st, varargin)
%|function st = newfft_table_init(st, varargin)
%|
%| Initialize structure for d-dimension NUFFT using table-based interpolator,
%| This should be called only by newfft for its 'table0' or 'table1' mode!
%| Note: default oversample factor is 2^11 or 2^13
%|
%| in
%| st s... |
github | ismrmrd/ismrmrd-paper-master | nufft_offset.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/private/nufft_offset.m | 1,160 | utf_8 | 484e73add0ea3fc089c87836e367f318 | function k0 = nufft_offset(om, J, K)
%|function k0 = nufft_offset(om, J, K)
%| offset for NUFFT
%| in
%| om [M,1] omega (radians), typically in [-pi, pi) (not essential!)
%| J # of neighbors used for NUFFT interpolation
%| K FFT size
%|
%| out
%| k0 [M,1] prepared for mod(k0 + [1:J], K) (+ 1 for matlab)
%|
%| Copyri... |
github | ismrmrd/ismrmrd-paper-master | nufft2_bilinear.m | .m | ismrmrd-paper-master/code/extern/irt/nufft/archive/nufft2_bilinear.m | 3,189 | utf_8 | f8c76972dc1531204901130e78618094 | function X = nufft2_bilinear(omega, x, K1, K2, n_shift)
%function X = nufft2_bilinear(omega, x, K1, K2, n_shift)
% in:
% omega [M 2] frequencies in radians
% x [N1 N2] image dimensions
% J # of neighbors used
% K1,K2 FFT sizes (should be > N1,N2)
% n_shift [2] n = 0-n_shift to N-1-n_shift
% out:
% X [M 1]... |
github | ismrmrd/ismrmrd-paper-master | ir_diag_majorize_admm1.m | .m | ismrmrd-paper-master/code/extern/irt/example/ir_diag_majorize_admm1.m | 4,977 | utf_8 | 33b7a6276ac15567bc94c1acc556b522 | function [xs, info] = ir_diag_majorize_admm1(H, varargin)
%function [xs, info] = ir_diag_majorize_admm1(H, varargin)
%|
%| Use ADMM to find a diagonal matrix D = diag(x) of minimum Frobenious norm
%| that majorizes a given square matrix H, i.e., min_D || D || s.t. H <= D.
%|
%| Solved by min_{D, S >=0} || D || s.t. H ... |
github | ismrmrd/ismrmrd-paper-master | l1_regress_admm1.m | .m | ismrmrd-paper-master/code/extern/irt/example/l1_regress_admm1.m | 3,159 | utf_8 | e64ff2d4682f920097f0680d0b6ceeb4 | function [xs, info] = l1_regress_admm1(yi, A, varargin)
%|function [xs, info] = l1_regress_admm1(yi, A, varargin)
%|
%| l1 regression, minimizing cost function
%| cost(x) = pot( y - A x ) where pot(r) = |r|_1 by default.
%| minimized via ADMM algorithm with v = A x split.
%|
%| in
%| yi [M 1] noisy data
%| A [M N] ... |
github | ismrmrd/ismrmrd-paper-master | l1_tv_restore1_fun.m | .m | ismrmrd-paper-master/code/extern/irt/example/l1_tv_restore1_fun.m | 1,769 | utf_8 | 21206ae96aeb384f0af401a971bdd4cf | function xs = l1_tv_restore1_fun(yi, A, varargin)
%function xs = l1_tv_restore1_fun(yi, A, varargin)
%|
%| Robust image restoration using a l1 data fit term and a TV-like regularizer.
%|
%| see l1_tv_restore1.m
%| min_x |yi - A(ti) * x|_1 + beta (|Cx x|_1 + |Cy x|_1)
%| where |.|_1 is approximated by a hyperbola
%|
%|... |
github | ismrmrd/ismrmrd-paper-master | ir_inpaint_admm1.m | .m | ismrmrd-paper-master/code/extern/irt/example/ir_inpaint_admm1.m | 4,497 | utf_8 | bb257a0498aabf45f108c4492d6a7046 | function [xs, info] = ir_inpaint_admm1(yi, samp, varargin)
%function [xs, info] = ir_inpaint_admm1(yi, samp, varargin)
%|
%| Image in-painting by cost function
%| cost(x) 1/2 | y - x |_2^2 + beta * pot(C x)
%| minimized via ADMM algorithm (cf split Bregman) with v = C x split.
%|
%| in
%| yi [(N)] image to be in-pain... |
github | ismrmrd/ismrmrd-paper-master | ir_denoise_admm1.m | .m | ismrmrd-paper-master/code/extern/irt/example/ir_denoise_admm1.m | 3,762 | utf_8 | 9b6906c59f9eb8ff6bd4079dbb5da06e | function [xs, info] = ir_denoise_admm1(yi, varargin)
%|
%| Image denoising by cost function
%| cost(x) 1/2 | y - x |_2^2 + beta * pot(C x)
%| minimized via ADMM algorithm (cf split Bregman) with v = C x split.
%|
%| in
%| yi [(N)] noisy data
%|
%| options
%| x0 [(N)] initial estimate
%| C penalty matrix
%| (defa... |
github | ismrmrd/ismrmrd-paper-master | l1_regress_fun.m | .m | ismrmrd-paper-master/code/extern/irt/example/l1_regress_fun.m | 2,080 | utf_8 | dfd0e3d5d5bc13af6ddaef7c9b1606f3 | function [x1 x2] = l1_regress_fun(ti, yi, varargin)
%function [x1 x2] = l1_regress_fun(ti, yi, varargin)
% see l1_regress_example.m
% min_x |yi - A(ti) * x|_1
% where |.|_1 is approximated by a hyperbola
%
% Copyright 2005-4-24, Jeff Fessler, University of Michigan
if nargin == 1 && streq(ti, 'test')
l1_regress_exam... |
github | ismrmrd/ismrmrd-paper-master | xray_atten_interp.m | .m | ismrmrd-paper-master/code/extern/irt/ct/xray_atten_interp.m | 1,516 | utf_8 | de0ea63e1ea6508a2daf6718f1318907 | function mac = xray_atten_interp(kev, mac, kev_in, varargin)
%function mac = xray_atten_interp(kev, mac, kev_in, [options])
%|
%| Interpolate mass attenuation coefficients (mac) onto desired energies.
%|
%| in
%| kev [M,1]
%| mac [M,1]
%| kev_in [N,1] desired energies [in keV]
%|
%| option
%| 'interp' {} default {'... |
github | ismrmrd/ismrmrd-paper-master | de_ftab.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab.m | 9,344 | utf_8 | 3b8666a5535abbbe98f706e2d43e47fa | function ftab = de_ftab(xrs, mas, varargin)
%|function ftab = de_ftab(xrs, mas, [options])
%|
%| For multiple-kVp X-ray imaging, we must evaluate functions f_m(s_1, ..., s_L)
%| for m=1,..,M, where M is the number of kVp settings,
%| and L is the number of material components.
%| f_m(s1, s2) = -log( \int exp(- (m1(E)... |
github | ismrmrd/ismrmrd-paper-master | xray_read_dens.m | .m | ismrmrd-paper-master/code/extern/irt/ct/xray_read_dens.m | 2,205 | utf_8 | 205b32cd221f73df1f4e12926c19147c | function [density, mtype] = xray_read_dens(mtype, varargin)
%|function [density, mtype] = xray_read_dens(mtype, [options])
%|
%| Read densities for given material type(s).
%|
%| in
%| mtype 'aluminum', 'copper', ...
%| (optionally can be a cell array of several)
%| option
%| 'units' cm | mm default: cm
%| out... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_invert.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab_invert.m | 7,960 | utf_8 | 35fb8433d91aa7173f492938624435c1 | function shat = de_ftab_invert(ftab, fhat, varargin)
%|function shat = de_ftab_invert(ftab, fhat, [options])
%|
%| given fhat (log transmission data),
%| estimate shat (component density line integrals)
%|
%| in
%| ftab strum BH "table" built by de_ftab.m
%| fhat [(n?) M] log measurements
%| option
%| smin {LL}
%| s... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_inv2.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab_inv2.m | 4,168 | utf_8 | d9e3426ea8946c666817f52bd59502ef | function inv2 = de_ftab_inv2(fit, sl, varargin)
%|function inv2 = de_ftab_inv2(fit, sl, [options])
%|
%| Build object that does polynomial inverse of BH function.
%| (To map log data into corresponding to line-integrals of material density.)
%|
%| in
%| fit strum initialized by de_ftab_fit()
%| sl cell {s1, ..., sL} ... |
github | ismrmrd/ismrmrd-paper-master | de_wls_dercurv.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_wls_dercurv.m | 3,320 | utf_8 | 9e6910bf5128f535b9bd41683c8ae682 | function [grad, curv, fim, diml] = de_wls_dercurv(data, sil, curvtype, iblock, nblock)
%|function [grad, curv, fim, diml] = de_wls_dercurv(data, sil, curvtype, iblock, nblock)
%|
%| evaluate gradients and curvatures for DE WLS data-fit function:
%| U(x) = \sum_i U_i(s)
%| U_i(s) = \sum_m=1^M U_im(s)
%| U_im(s_i) = 1/... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_fit.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab_fit.m | 17,775 | utf_8 | d925d12e452b0a7bf8511b582d3f100b | function fit = de_ftab_fit(sl, fm, varargin)
%|function fit = de_ftab_fit(sl, fm, [options])
%|
%| Fit to DE table fm(), suitable for subsequent interpolation / extrapolation.
%| Uses either classic polynomial basis functions,
%| or an exponential model: -log(sum_k p_k exp(-m_k . s))
%|
%| in
%| sl {L} sample locati... |
github | ismrmrd/ismrmrd-paper-master | de_pl_obj.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_pl_obj.m | 1,984 | utf_8 | 431e8d6c9868d7c9b2b2c475d112237b | function [obj, like, penal] = de_pl_obj(xs, G, ymi, Im, rmi, ftab, R, mask)
%function [obj, like, penal] = de_pl_obj(xs, G, ymi, Im, rmi, ftab, R, mask)
%
% compute quadratically penalized Poisson likelihood for each column of x
% for dual-energy x-ray problem
% in
% xs [np,2,niter] iterates
% [nx,ny,2,niter] if ma... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_fm.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab_fm.m | 1,906 | utf_8 | f96b7fde602deaedce29eb3a4ddd4166 | function fm = de_ftab_fm(sll, mac, Ide)
%|function fm = de_ftab_fm(sll, mac, Ide)
%| calculate f_m(s1, s2, ...) (nonlinear BH function) using
%| in
%| sll cell{LL} or [(Nd),LL] material density integrals
%| {s1, s2, ..., sL} (ndgrid so same size [(Nd)])
%| mac [ne,LL] mass atten coefficients
%| Ide [ne,MM] spec... |
github | ismrmrd/ismrmrd-paper-master | de_poly_eval.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_poly_eval.m | 3,228 | utf_8 | e51cfb74d88a1f8ae3d0a1c6101f90b5 | function yy = de_poly_eval(xx, coef, expo, varargin)
%|function yy = de_poly_eval(xx, coef, expo, [option])
%|
%| Evaluate multi-dimensional polynomial:
%| y[n,l] = sum_k=1^K coef(k,l) x[n,1]^expo(k,1) * ... * x[n,M]^expo(k,M)
%|
%| in
%| xx [(nn) M] input values
%| coef [K L] coefficients
%| expo [K M] exponents a... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_inv1.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab_inv1.m | 5,271 | utf_8 | 29db2a83e9757f708dfae8df8928048b | function inv1 = de_ftab_inv1(fit, s1, varargin)
%|function inv1 = de_ftab_inv1(fit, s1, [options])
%|
%| Build object that does 1D inverse of BH function for 1st material component,
%| (usually water), for conventional "water only" beam-hardening correction.
%|
%| in
%| fit strum initialized by de_ftab_fit()
%| s1 [N... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_build.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab_build.m | 11,231 | utf_8 | 6f676fd5bcb82d6b202baa458240e29a | function ftab = de_ftab_build(s_arg, varargin)
%function ftab = de_ftab_build(s_arg, [options])
%
% For multiple-kVp X-ray imaging, we must evaluate functions f_m(s_1, ..., s_L)
% for m=1,..,M, where M is the number of kVp settings,
% and L is the number of material components.
% f_m(s1, s2) = -log( \int exp(- (m1(E) ... |
github | ismrmrd/ismrmrd-paper-master | xray_read_mac.m | .m | ismrmrd-paper-master/code/extern/irt/ct/xray_read_mac.m | 5,446 | utf_8 | 82b72726f99a935c90c301ef11a8ce32 | function mas = xray_read_mac(mtype, varargin)
%function mas = xray_read_mac(mtype, [options])
%|
%| Read mass attenuation coefficients for a given material type.
%| Returns a strum that can interpolate onto desired energies.
%|
%| in
%| mtype 'aluminum', 'copper', 2, '2', '02-helium', ...
%| See xray_material_file... |
github | ismrmrd/ismrmrd-paper-master | de_poly_expo.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_poly_expo.m | 1,207 | utf_8 | 90567cd293ec809e938c07f440cce758 | function expo = de_poly_expo(MM, varargin)
%|function expo = de_poly_expo(MM, [option])
%|
%| Generate exponents for multi-dimensional polynomials with terms:
%| x[n,1]^expo(k,1) * ... * x[n,M]^expo(k,M)
%|
%| in
%| MM dimension of polynomial
%|
%| option
%| 'emax' [1]|[M] maximum exponent of any given term. defau... |
github | ismrmrd/ismrmrd-paper-master | xray_read_spectra.m | .m | ismrmrd-paper-master/code/extern/irt/ct/xray_read_spectra.m | 7,747 | utf_8 | f68215b987e79335c14ddcf4fad23e64 | function xrs = xray_read_spectra(stype, varargin)
%|function xrs = xray_read_spectra(stype, [options])
%|
%| Read X-ray spectra data and initialize a structure that describes "M"
%| piecewise constant polyenergetic X-ray spectra, where M=2 for dual-kVp case.
%|
%| in
%| stype char which spectrum model:
%| 'mono,6... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_curv.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab_curv.m | 14,775 | utf_8 | 65d64bdb49401523577c932b883b8009 | function fit = de_ftab_curv(fit, varargin)
%|function fit = de_ftab_curv(fit, [options])
%|
%| Augment a fitted DE BH function strum object
%| to also have curvature methods for LS (or WLS) data-fit term
%|
%| in
%| fit strum from de_ftab_fit (type: 'exp')
%|
%| option
%| 'ctype' char curvature type: (default: 'pre... |
github | ismrmrd/ismrmrd-paper-master | xray_read_atomic_mass.m | .m | ismrmrd-paper-master/code/extern/irt/ct/xray_read_atomic_mass.m | 1,836 | utf_8 | f67f2bb6eed6bee8d2af7f901633fb98 | function mass = xray_read_atomic_mass(mtype, varargin)
%function mass = xray_read_atomic_mass(mtype)
%
% Read atomic mass for a given material type.
%
% in
% mtype 'aluminum', 'copper', 2, '2', '02-helium', ...
% See xray_material_file_name.m
% (Optionally mtype can be a cell array of several materials.
% If s... |
github | ismrmrd/ismrmrd-paper-master | wls_simplex.m | .m | ismrmrd-paper-master/code/extern/irt/ct/wls_simplex.m | 8,824 | utf_8 | 470af2f2358fa8a20fab88071204343e | function x = wls_simplex(A, y, Wh, x, varargin)
%function x = wls_simplex(A, y, Wh, x, [options])
%|
%| min_x || Wh * (A x - y) ||^2 + reg || x ||^2
%| subject to simplex constraint: 0 <= x <= 1 and sum(x) = 1
%|
%| one version is based on:
%| x = lsqlin(C,d,A,b,Aeq,beq) solves the least-squares
%| (with equality cons... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_s_iter.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab_s_iter.m | 6,013 | utf_8 | 0096179f86f99c84da4d78158b544be0 | function sh = de_ftab_s_iter(fit, fh, varargin)
%|function sh = de_ftab_s_iter(fit, fh, [options])
%| estimate s from fh by iterative LS
%| sh = argmin{s} | fh - fm(s) |^2
%| in
%| fit from de_ftab_fit() / de_ftab_curv()
%| fh [(Nd) M] estimates of f (nonlinear BH function)
%| option
%| 'niter' # of iterations (d... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_sls.m | .m | ismrmrd-paper-master/code/extern/irt/ct/de_ftab_sls.m | 2,241 | utf_8 | f028646d226bc744dd1b5d1ab61b5e09 | function sls = de_ftab_sls(varargin)
%function sls = de_ftab_sls(varargin)
%|
%| Determine structure that characterizes the "s" limits for polyenergetic CT,
%| where s_l is a line integral through the lth material type, l=1...L.
%| L is the number of material components.
%|
%| in
%| option
%| 'sl' cell{LL} sample thic... |
github | ismrmrd/ismrmrd-paper-master | xray_read_atten.m | .m | ismrmrd-paper-master/code/extern/irt/ct/xray_read_atten.m | 3,332 | utf_8 | fd6baf9c2961c175e33ad122655d0070 | function [mass_atten, kev, mtype, file] = ...
xray_read_atten(mtype, kev_in, varargin)
%|function [mass_atten, kev, mtype, file] = ...
%| xray_read_atten(mtype, kev_in, [options])
%|
%| Read mass attenuation coefficients for a given material type.
%| Optionally interpolate onto desired energies.
%|
%| in
%| mtype... |
github | ismrmrd/ismrmrd-paper-master | xray_filters.m | .m | ismrmrd-paper-master/code/extern/irt/ct/xray_filters.m | 1,427 | utf_8 | 1762142abdcbbb337e06c8c14a1cad18 | function atten = xray_filters(mtype, thickness, energy, varargin)
%|function atten = xray_filters(mtype, thickness, energy, [options])
%|
%| Compute X-ray photon survival probability as a function of energy
%| for various materials.
%| in
%| mtype 'aluminum', 'copper', ...
%| can be a cell array {L} for multiple... |
github | ismrmrd/ismrmrd-paper-master | xray_material_file_name.m | .m | ismrmrd-paper-master/code/extern/irt/ct/xray_material_file_name.m | 3,628 | utf_8 | 2f4c215a9a0a976fc46b6685999d0d95 | function file = xray_material_file_name(name, varargin)
%|function file = xray_material_file_name(name, [options])
%| given name of an element, such as '01' or '01-hydrogen' or 'hydrogen',
%| or of a material such as 'water', determine the full file name for the
%| mass attenuation coefficient data for that material.... |
github | ismrmrd/ismrmrd-paper-master | element_density.m | .m | ismrmrd-paper-master/code/extern/irt/ct/element_density.m | 3,739 | utf_8 | 79eed16aa31d6c83d447827a9848069d | function rho = element_density(elem)
%function rho = element_density(elem)
% density of an element (in g/cc)
if ~nargin, help(mfilename), error(mfilename), return, end
% http://environmentalchemistry.com/yogi/periodic/density.html
% awk '{print $5, $4, $3, $1, $2}' < tt | sort -n > element_density.m
all = load;
if... |
github | ismrmrd/ismrmrd-paper-master | de_ftab_fit.m | .m | ismrmrd-paper-master/code/extern/irt/ct/arch/de_ftab_fit.m | 18,704 | utf_8 | f2d651baee92913be079496c9769c695 | function fit = de_ftab_fit(sl, fm, varargin)
%|function fit = de_ftab_fit(sl, fm, [options])
%|
%| Fit to DE table fm(), suitable for subsequent interpolation / extrapolation.
%| Uses either classic polynomial basis functions,
%| or an experimental exponential model -log(sum_k p_k exp(-m_k . s))
%|
%| in
%| sl {L} s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.