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
sunhongfu/scripts-master
Gsparse.m
.m
scripts-master/MRF/recon/_src/_NUFFT/Gsparse.m
7,162
utf_8
313f033569655fb4925e3490b7ae7f5a
function ob = Gsparse(arg1, varargin) %function ob = Gsparse(file.wtf | sparse | cell, options) % % Construct Gsparse object, either from a sparse matrix itself, % or from the arguments that would be passed to matlab's sparse() command, % or from an Aspire binary .wtf file. % % The purpose of this object is to overcom...
github
sunhongfu/scripts-master
ifft_sym.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/ifft_sym.m
1,181
utf_8
01ebf2f01e0379ebb2d3ae4792f996f7
function y = ifft_sym(varargin) %function y = ifft_sym(varargin) % matlab 7.0 introduced a 'symmetric' option to ifft to handle % spectra that are (circularly) hermitian symmetric (real signal). % this glue routine is to provide backward compatibility for matlab 6.5. % Caution: v7 ifft with 'symmetric' just uses the f...
github
sunhongfu/scripts-master
jf_protected_names.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/jf_protected_names.m
2,298
utf_8
9430f87fc9730771e794a957c0e20697
function pn = jf_protected_names %|function pn = jf_protected_names %| %| A serious drawback of the matlab language is that it lacks %| a protected or local namespace. Every m-file that is in the path %| is available to all functions (except those in "private" subdirectories). %| Users who have their own m-files tha...
github
sunhongfu/scripts-master
os_run.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/os_run.m
496
utf_8
b86b9948f9e383a3f5f8d047d0ec9ae0
function out = os_run(str) %|function out = os_run(str) %| call OS (unix only of course), check for error, optionally return output if nargin < 1, help(mfilename), error(mfilename), end if streq(str, 'test'), os_run_test, return, end [s out1] = unix(str); if s fail('unix call failed:\n%s', str) end if nargout ou...
github
sunhongfu/scripts-master
interp1_jump.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/interp1_jump.m
2,280
utf_8
b183193c9190a72ea28565ea8def6dba
function yi = interp1_jump(xj, yj, xi, varargin) %function yi = interp1_jump(xj, yj, xi, {arguments for interp1}) % Generalization of matlab's "interp1" to allow xj with repeated values, % for interpolation of a function that has "jumps" (discontinuities), % such as is caused by k-edges for mass attenuation coefficien...
github
sunhongfu/scripts-master
jf_histn.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/jf_histn.m
2,106
utf_8
8a5e6756705f9e4c239f592b17967eed
function [hist center] = jf_histn(data, varargin) %|function [hist center] = jf_histn(data, varargin) %| %| Fast histogram of multidimensional data for equally-spaced bins. %| todo: use accumarray? %| %| in %| data [N M] data values to be binned (M-dimensional) %| %| option %| 'min' [M] minimum bin values for each di...
github
sunhongfu/scripts-master
jf_assert.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/jf_assert.m
871
utf_8
444b53c5605424b42508cd26fa0da635
function jf_assert(varargin) %function jf_assert(command) % verify that the command (evaluated within caller) returns true. % if not, print error message. if nargin < 1, help(mfilename), error(mfilename), end if nargin == 1 && streq(varargin{1}, 'test'), jf_assert_test, return, end arg = [varargin{:}]; % handle case...
github
sunhongfu/scripts-master
gaussian_kernel.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/gaussian_kernel.m
760
utf_8
119655fccf91567673b1e3739af2b637
function kern = gaussian_kernel(fwhm, nk_half) %function kern = gaussian_kernel(fwhm, nk_half) % samples of a gaussian kernel at [-nk_half:nk_half] % with given FWHM in pixels % uses integral over each sample bin so that sum is very close to unity % % Copyright 2001-9-18, Jeff Fessler, The University of Michigan if n...
github
sunhongfu/scripts-master
fwhm_match.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/fwhm_match.m
1,878
utf_8
8ae6568a77739be15c5ac4afea48b4d8
function [fwhm_best, costs, im_best] = ... fwhm_match(true_image, blurred_image, fwhms) %|function [fwhm_best, costs, im_best] = ... %| fwhm_match(true_image, blurred_image, fwhms) %| %| given a blurred_image of a true_image, find the FHWM of a Gaussian kernel %| that, when convolved to the true_image, yields the sm...
github
sunhongfu/scripts-master
fractional_delay.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/fractional_delay.m
2,438
utf_8
09fad587ef6cfbb84e8a06617919b92f
function y = fractional_delay(x, delay) %function y = fractional_delay(x, delay) % % given N samples x[n] of a real, periodic, band-limited signal x(t), % compute sinc interpolated samples of delayed signal y(t) = x(t - delay) % each column of x can be shifted by a different amount if delay is a vector. % in % x [N,L]...
github
sunhongfu/scripts-master
pad_into_center.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/pad_into_center.m
1,210
utf_8
ab74a76cd16f351c6d2e6238fc95017e
function xpad = pad_into_center(x, npad) %function xpad = pad_into_center(x, npad) % Zero pad an input signal x symmetrically around "0" (image center). % Useful for DFT/FFT of PSF. % todo: replace with matlab's padarray.m % Originally by A. Yendiki, modified by Jeff Fessler, 2005-7-26. if nargin < 1, help(mfilename)...
github
sunhongfu/scripts-master
downsample2.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/downsample2.m
796
utf_8
45fe4dcbfeb45d32d39d0bc20299a641
function y = downsample2(x, m, varargin) %|function y = downsample2(x, m, varargin) %| downsample by averaging by integer factors %| m can be a scalar (same factor for both dimensions) %| or a 2-vector %| in %| x [nx ny] %| option %| 'warn' 0|1 warn if non-integer factor. default: 1 %| out %| y [nx/m ny/m] if nargin...
github
sunhongfu/scripts-master
reshaper.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/reshaper.m
890
utf_8
b1851d49886b11b9ca0b1a4651a16a51
function y = reshaper(x, dim) %|function y = reshaper(x, dim) %| %| reshape function that is more flexible, allowing for "multiples". %| example: reshape(rand(2*3*5,7), [2 3 5]) will become [2 3 5 7] %| %| in %| x [*dim (Ld)] %| dim short row or column %| if dim is '2d' then y is 2d with first n-1 dims collapsed %| ...
github
sunhongfu/scripts-master
fld_write.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/fld_write.m
5,854
utf_8
a537cbf0ff76de352fe949e0e946577d
function fld_write(file, data, varargin) %|function fld_write(file, data, [options]) %| write data into AVS format .fld file %| see ASPIRE user's guide (or AVS online documentation) for file format. %| %| todo: generalize to include 'extent' options and default %| %| options %| 'check' 0|1 1: report error if file ex...
github
sunhongfu/scripts-master
unpadn.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/unpadn.m
818
utf_8
efcd912abfb2bb3205ef2bc3c72ff01c
function out = unpadn(mat, newdim) %|function out = unpadn(mat, newdim) %| pad old to newdim, preserving 'center point' if nargin == 1 && streq(mat, 'test'), unpadn_test, return, end if nargin < 2, error(mfilename), help(mfilename), end olddim = size(mat); if any(newdim > olddim), error('must be smaller'), end idx ...
github
sunhongfu/scripts-master
isvar.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/isvar.m
1,105
utf_8
e6f2c6aa9ef51279a672904d75970008
%|function tf = isvar(name) %| %| determine if "name" is a variable in the caller's workspace. %| %| if argument is of the form 'name.field' or 'name.field1.field2' etc. %| then this uses isfield(st, 'field') recursively as needed %| %| Copyright 2000-01-01, Jeff Fessler, University of Michigan %| modified 2010-04-21 t...
github
sunhongfu/scripts-master
dft_sym_check.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/dft_sym_check.m
1,124
utf_8
2232513db8d14465e04adc59ed9f646e
function dft_sym_check(xk, varargin) %function dft_sym_check(xk) % see if array xk (usually containing DFT coefficients) % obeys the conjugate symmetry conditions expected % for its (inverse) DFT to be real. if nargin == 1 && streq(xk, 'test'), dft_sym_check_test, return, end if nargin < 1, help(mfilename), error(mfi...
github
sunhongfu/scripts-master
dsingle.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/dsingle.m
320
utf_8
131f14ecc3813385227fdb653e79b58b
function [varargout] = dsingle(varargin) %function y = dsingle(x) % truncate a (possibly) double precision value to single precision, % then convert back to "double" using double6: % y = double6(single(x)); for ii=1:nargin varargout{ii} = dsingle1(varargin{ii}); end function y = dsingle1(x) y = double6(single(x));
github
sunhongfu/scripts-master
jf_equal.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/jf_equal.m
1,871
utf_8
53cbc8605bbf1ab3fb4ec2641bc8bf9b
function jf_equal(a, b, varargin) %|function jf_equal(a, b, varargin) %| %| verify that the two arguments are equal. %| if not, print error message. %| See also: equivs %| note: to compare two (e.g. Fatrix) objects, use jf_equal(struct(a), struct(b)) %| option %| 'warn' 0|1 if 0 (default) then fail; if 1 just warn in...
github
sunhongfu/scripts-master
hist_equal.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/hist_equal.m
2,496
utf_8
0d27bae082772372de17cf66a6f14d6b
function [nk, center] = hist_equal(data, ncent, varargin) %|function [nk, center] = hist_equal(data, ncent, varargin) %| %| fast histogram of multidimensional data into equally-spaced bins %| todo: accumarray? %| %| in %| data [N M] data values to be binned (M-dimensional) %| ncent [1 M] # of centroids for each dim...
github
sunhongfu/scripts-master
fwhm1.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/fwhm1.m
1,785
utf_8
521eddf7df2e4bf7dd77c7f89f15d48e
function [fw, hr, hl] = fwhm1(psfs, varargin) %|function [fw, hr, hl] = fwhm1(psfs, options) %| compute fwhm of point-spread function centered at pixel imid %| and half-right width and half-left width (fw = hr + hl) %| in %| psfs [np nc] column psf(s) %| option %| imid [1] which pixel is the middle (default: peak) %|...
github
sunhongfu/scripts-master
ndgrid_jf.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/ndgrid_jf.m
1,825
utf_8
81141c55ae5b933826ba00a65b23fcc3
function out = ndgrid_jf(otype, varargin) %function out = ndgrid_jf('cell', varargin) %function out = ndgrid_jf('mat', varargin) %| version of ndgrid where output is cell array (default) or large matrix %| think: %| [out{1} ... out{M}] = ndgrid_cell(in{1}, ..., in{M}); %| also supported is ndgrid_jf('mat'|'cell', {in1...
github
sunhongfu/scripts-master
kde_pmf_width.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/kde_pmf_width.m
1,573
utf_8
6c684711031188408ae21134004afd70
function dx = kde_pmf_width(x, varargin) %|function dx = kde_pmf_width(x, varargin) %| %| Determine bin width for kde_pmf1,2 %| %| in %| x [N 1] iid realizations of random variable pairs (x,y) %| %| option %| 'type' 'silverman' to choose dx based on rule-of-thumb %| using inter-quartile range (p48 of 1986 book) %|...
github
sunhongfu/scripts-master
arg_get.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/arg_get.m
953
utf_8
0e42582c06b61201a8a9468a8afcce32
function [arg, ii] = arg_get(list, what, default) %function [arg, ii] = arg_get(list, what, default) % extract an argument (e.g., nx or pixel_size, etc.) % from a list (vertically concatenated strings) % e.g., as generated by arg_pair() or strvcat() % the *first* match is used. % Copyright 2005, Jeff Fessler, The Univ...
github
sunhongfu/scripts-master
filtmat.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/filtmat.m
3,758
utf_8
4f6ac3e0ab4e6785b3698d7b1b702542
function [mat, nexp] = filtmat(arg0, arg1, arg2, arg3, arg4) %function mat = filtmat('1d', kernx, nx) % 1d nonperiodic %function mat = filtmat({'1d' 'per'}, kernx, nx) % 1d periodic %function mat = filtmat('2d,mul,sep', kernx, kerny, [nx ny]) % 2d multiplicatively separable nonperiodic %function mat = filtmat('3...
github
sunhongfu/scripts-master
remove_spaces.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/remove_spaces.m
793
utf_8
44dcf5c3a35ebc4ce3ddd6e590aab8a4
function arg = remove_spaces(arg) %|function arg = remove_spaces(arg) %| replace extra spaces at ends of matrix string array with zeros. %| also add extra '0' at end to be sure to null terminate string %| Copyright May 2000, Jeff Fessler, University of Michigan if nargin < 1, help(mfilename), error(mfilename), end ...
github
sunhongfu/scripts-master
interp1_lagrange.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/interp1_lagrange.m
1,111
utf_8
2245c39a0a1bf94677de8caef3c0efe7
function y = interp1_lagrange(xi, yi, x) %function y = interp1_lagrange(xi, yi, x) % Lagrange (1D) interpolation: polynomial of order length(xi) % in: xi [n,1], yi [n,1], x [m,1] % if yi is empty, then "y" is the m,n interpolation matrix % Copyright 2003-5-13 Jeff Fessler The University of Michigan if nargin < 3, int...
github
sunhongfu/scripts-master
arg_pair.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/arg_pair.m
1,517
utf_8
5efeebd0651d931efc4ac151090edec1
function arg = arg_pair(varargin) %|function arg = arg_pair(varargin) %| %| construct AsciiArg pairs from input arguments %| for building arguments akin to .dsc file %| example: arg = arg_pair('system', 2, 'nx', 128, ...) %| %| Copyright May 2000, Jeff Fessler, University of Michigan if nargin == 1 & streq(varargin...
github
sunhongfu/scripts-master
upsample_rep.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/upsample_rep.m
629
utf_8
3db6e5ee1beac6a80b0a8880a17d5c3d
function y = upsample_rep(x, m) %function y = upsample_rep(x, m) % upsample a 2D image a factor of m by simple replication if nargin == 1 && streq(x, 'test'), upsample_rep_test, return, end if nargin < 1, help(mfilename), error(mfilename), end if nargin < 2, m = [2 2]; end y = upsample1_rep(x, m(1)); y = upsample1_r...
github
sunhongfu/scripts-master
max_percent_diff.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/max_percent_diff.m
1,971
utf_8
0b4ab863976402c87de0914aa0e5a0a0
function d = max_percent_diff(s1, s2, varargin) %|function d = max_percent_diff(s1, s2, [options]) %| %| compute the "maximum percent difference" between two signals: s1, s2 %| options %| 1 use both arguments as the normalizer %| string print this %| %| Copyright 2000-9-16, Jeff Fessler, University of Michigan if ...
github
sunhongfu/scripts-master
bspline_1d_coef.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/bspline_1d_coef.m
5,143
utf_8
68fc2ba254910a9aed75f78d9a852b84
function coef = bspline_1d_coef(fn, varargin) %|function coef = bspline_1d_coef(fn, varargin) %| %| Given f[n], uniformly spaced samples of a 1D signal f(t), %| compute the bspline coefficients so that the following model interpolates: %| f(t) = \sum_{k=0}^{N-1} coef[k] b(t - k) %| %| in %| fn [N,(L)] 1d signal(s) of...
github
sunhongfu/scripts-master
downsample1.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/downsample1.m
1,242
utf_8
cde1ae93622ba9447977d20910d44b6d
function y = downsample1(x, down, varargin) %|function y = downsample1(x, down, varargin) %| downsample by factor m along first dimension by averaging %| %| in %| x [n1 (Nd)] %| down integer downsampling factor %| option %| 'warn' 0|1 warn if noninteger multiple (default: 1) %| out %| y [n1/down (Nd)] %| %| Copyri...
github
sunhongfu/scripts-master
fwhm2.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/fwhm2.m
3,918
utf_8
de4664218f9f1cae8bb7f5cd25d64465
function [fw, angle, rad] = fwhm2(psf, varargin) %|function [fw, angle, rad] = fwhm2(psf, [options]) %| %| compute 2d fwhm of point-spread function using contourc() %| %| in %| psf [nx ny] 2D psf image %| %| option %| 'dx' pixel size (default 1) %| 'dy' pixel size (default dx) %| 'level' default 0.5 (for "half" ma...
github
sunhongfu/scripts-master
poisson.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/poisson.m
1,180
utf_8
0265d6eb478b5a47dc8d273d2c07d330
function data = poisson(xm, seed, varargin) %|function data = poisson(xm, seed, [options]) %| %| option %| 'factor' see poisson2.m %| %| Generate Poisson random vector with mean xm. %| For small, use poisson1.m %| For large, use poisson2.m %| see num. rec. C, P. 222 %| %| Copyright 1997-4-29, Jeff Fessler, University ...
github
sunhongfu/scripts-master
nrms.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/nrms.m
1,109
utf_8
042ba79752bcb9662b4db291ca79144b
function n = nrms(x, xtrue, arg) %|function n = nrms(x, xtrue, arg) %| normalized rms error %| in %| x [[Nd] Nrep] multiple x's for one xtrue %| xtrue [[Nd]] %| arg use '2' to do along 2nd dim for same size %| out %| scalar %| vector if x and xtrue have same size and arg = 2 if nargin == 1 && streq(x, 'test'), nrms...
github
sunhongfu/scripts-master
fld_read.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/fld_read.m
12,334
utf_8
4d7e7ee0934f826d43db5b5fe965f388
function [data, coord, dims] = fld_read(file, varargin) %|function [data, coord, dims] = fld_read(file, options) %| Read data from AVS format .fld file. %| %| options %| 'raw' 0|1 1: return raw data class (default), 0: return doubles %| 'slice' int specify which slice to read from 3D file. (0 ... nz-1) %| 'chat' 0|1 ...
github
sunhongfu/scripts-master
outer_sum.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/outer_sum.m
1,339
utf_8
6fcbf93474fbbffdf7eb645159d64f36
function ss = outer_sum(xx,yy) %function ss = outer_sum(xx,yy) % compute an "outer sum" x + y' % that is analogous to the "outer product" x * y' % in % xx [nx,1] % yy [1,ny] % more generally: xx [(dim)] + yy [L,1] -> xx [(dim) LL] % out % ss [nx,ny] ss(i,j) = xx(i) + yy(j) % Copyright 2001, Jeff Fessler, The Universi...
github
sunhongfu/scripts-master
hist_bin_int.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/hist_bin_int.m
3,687
utf_8
2d4d4e6439eba6ef169ea21443b06188
function [nk center] = hist_bin_int(data, varargin) %|function [nk center] = hist_bin_int(data, varargin) %| %| fast histogram of multidimensional data into equally-spaced bins %| todo: time this vs accumarray %| %| in %| data [N M] data values to be binned (M-dimensional) %| must be integer valued >= 1 %| %| opt...
github
sunhongfu/scripts-master
stackpick.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/stackpick.m
1,177
utf_8
94edbe3b375bee1198ac10df6439e535
function y = stackpick(x, ii) %|function y = stackpick(x, ii) %| pick one (or more) of the last "slices" of a multi-dimensional array %| think x(:,:,...,:,ii) %| This is useful in conjunction with stackup(). %| Copyright 2005-6-18, Jeff Fessler, University of Michiga if nargin == 1 && streq(x, 'test'), stackpick_test...
github
sunhongfu/scripts-master
bspline_1d_interp.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/bspline_1d_interp.m
3,926
utf_8
0450bc0a6193efe6e03381d744ef3104
function ft = bspline_1d_interp(fn, ti, varargin) %|function ft = bspline_1d_interp(fn, ti, varargin) %| %| given f[n], the "unit spaced" samples of a continuous signal f(t), %| perform b-spline interpolation at sample locations t_i using the model: %| f(t) = \sum_{k=0}^{N-1} coef_k b(t - k) %| where the coefficients...
github
sunhongfu/scripts-master
ticker.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/ticker.m
3,188
utf_8
d37224bdcbb9b5731efdb04eb3ef9d42
function ticker(varargin) %|function ticker(varargin) %| %| This utility is used in functions that might take a long time %| to provide a status update so the user knows it is working. %| "ticker print" to make output print to command window (default) %| "ticker waitbar" to display using waitbar %| ticker(waittime) to...
github
sunhongfu/scripts-master
downsample3.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/downsample3.m
1,725
utf_8
3c07f350e6c231aa9b3ba83589194f0a
function y = downsample3(x, m) %|function y = downsample3(x, m) %| downsample by averaging by integer factors %| m can be a scalar (same factor for both dimensions) %| or a 3-vector %| in %| x [nx ny nz] %| m [1] or [1 3] %| out %| y [nx/m ny/m nz/m] %| function modified to 3D space by: Taka Masuda if nargin == 1 & ...
github
sunhongfu/scripts-master
embed.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/embed.m
2,247
utf_8
6120e062d8c154359dfcf977a07ce6eb
function ff = embed(x, mask, varargin) %|function ff = embed(x, mask, varargin) %| embed x in nonzero elements of (logical) mask %| in %| x [np (L)] the "nonzero" pixels (lexicographically stacked) %| mask [(Nd)] logical array, np = sum(mask) %| option %| '*dim' {0|1} 0: [(N) (L)] (default); 1: return [(N) *L] %| o...
github
sunhongfu/scripts-master
lloyd_max_hist.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/lloyd_max_hist.m
4,365
utf_8
7c6c53b0980357b7e0752258250dbca4
function centers = lloyd_max_hist(data, centers, MM, tol, max_iter, chat) %|function centers = lloyd_max_hist(data, centers, MM, tol, max_iter, chat) %| %| "improved" version of the lloyd-max algorithm for scalar quantizer design %| that saves computation by histogramming the data first. %| Before using this, try usi...
github
sunhongfu/scripts-master
num2list.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/num2list.m
390
utf_8
0076ebb4ee93b833462e21640099a15d
function varargout = num2list(x) %function varargout = num2list(x) % % convert a numeric vector input into a comma separated list of output values % DOES NOT WORK! if nargin < 1, num2list_test, help(mfilename), error(mfilename), end %nargout %nargout = numel(x) %varargout = cell(size(x)); for ii=1:numel(x) varargou...
github
sunhongfu/scripts-master
cpu.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/cpu.m
1,462
utf_8
9c3b3cf49d0fa8f7180049a943c9356b
function out = cpu(arg, varargin) %|function out = cpu(arg, varargin) %| %| cpu etic %| cpu etoc printarg %| tic/toc elapsed time %| %| cpu etic %| cpu tic %| cpu toc %| cpu toc printarg %| work like tic/toc except they use cpu time instead of wall time. %| %| also: %| If printarg begins with a ':' then caller_name p...
github
sunhongfu/scripts-master
kde_pmf1.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/kde_pmf1.m
4,806
utf_8
014fb3c9ec686832ebae267a27b3f9e7
function [pmf xs] = kde_pmf1(x, varargin) %|function [pmf xs] = kde_pmf1(x, varargin) %| %| Compute an empirical probability mass function (PMF) using interpolation %| that is similar to a kernel density estimate. %| This routine is useful for making PMFs (interpolated / smoothed) histograms %| for computing entropy ...
github
sunhongfu/scripts-master
poly_string.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/poly_string.m
1,452
utf_8
5efc7525a6d221ad41a8e377311fd06c
function [str, d1, d2] = poly_string(order, varargin) %function [str, d1, d2] = poly_string(order, [options]) % make a string with all the terms in a 2d polynomial % up to given order, e.g. [1+0*x x y ...] % also return partial derivatives w.r.t. x and y % in % order % options % maxdegree maximum of sum of degrees (de...
github
sunhongfu/scripts-master
run_mfile_local.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/run_mfile_local.m
1,861
utf_8
10ab734b28bb404cd05ded222b52fe5a
function run_mfile_local(arg, varargin) %|function run_mfile_local(arg) %| run an mfile in a local environment so that workspace variables %| are untouched. useful for tests. %| arg can be a cell with many mfiles to run %| options %| 'draw' 1|0 1 to draw after each test (default: 0) %| 'pause' 1|0 1 to pause after e...
github
sunhongfu/scripts-master
minmax.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/minmax.m
2,324
utf_8
1b60715426dbb9ffeb27f85aa09fff8a
function r = minmax(x, varargin) %function r = minmax(x, dim) % Return mininum and maximum of values of input x. % Default is to examine the entire array. % Specify a dimension dim otherwise. % If dim is a string, print... % Copyright 2003, Jeff Fessler, University of Michigan if nargin < 1, help(mfilename), error(mf...
github
sunhongfu/scripts-master
masker.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/masker.m
884
utf_8
de844e9fcd7044d558d79c5644951dc9
function y = masker(x, mask) %|function y = masker(x, mask) %| extract from x the nonzero elements within (logical) mask %| in %| x [(Nd) (L)] image(s) %| mask [(Nd)] logical array, np = sum(mask) %| out %| y [np (L)] concise columns %| %| See also: embed %| %| Copyright 2004-9-28, Jeff Fessler, University of Michig...
github
sunhongfu/scripts-master
truncate_precision.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/truncate_precision.m
924
utf_8
0f0d50a4e0af0fded1105d0ee262b6d8
function y = truncate_precision(x, digits, varargin) %|function y = truncate_precision(x, digits, [option]) %| %| truncate x to "digits" signficant digits of precision %| option %| 'type' floor (default) | round | ceil %| %| Copyright 2008-11-05, Jeff Fessler, University of Michigan if nargin == 1 && streq(x, 'test...
github
sunhongfu/scripts-master
jf.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/jf.m
4,286
utf_8
4e7f9a86f93ffea5dbd3ef927829d18a
function out = jf(varargin) %|function out = jf(varargin) %| various personalization routines %| 'mv var_old var_new' %| 'ncore' # of cores this machine has %| add optional 2nd argument to over-ride, e.g., jf('ncore', 4) %| 'whos' %| 'clf' %| 'nobar' preclude toolbar and menubar from figures to render faster! %| 'no...
github
sunhongfu/scripts-master
vararg_pair.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/vararg_pair.m
6,046
utf_8
6b4318d95d5b5332f4aaf0ed91d43a86
function [opt, extra] = vararg_pair(opt, varargs, varargin) %function [opt, extra] = vararg_pair(opt, varargs, [options]) % Process name / value pairs, replacing the "default" field values % of the opt structure with the user-specified values. % This allows flexible argument order and "named arguments" somewhat like I...
github
sunhongfu/scripts-master
reshapee.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/reshapee.m
1,254
utf_8
74240ee060a675b89895e56891c7460d
function y = reshapee(x, varargin) %|function y = reshapee(x, varargin) %| %| reshape function that allows possibly one null argument, and all %| other arguments can be vectors, unlike matlab that requires scalars. %| example: reshape(rand(2*3*5,7), [2 3], [], 7) will become [2 3 5 7] %| %| in %| x [(*dim)] %| vararg...
github
sunhongfu/scripts-master
sinc_periodic.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/sinc_periodic.m
1,401
utf_8
6ded04b3754f67a5d4372c05ed651386
function x = sinc_periodic(t, K) %|function x = sinc_periodic(t, K) %| periodic sinc function, obtained by replicates of a sinc: %| x(t) = \sum_l sinc(t - l K) = ... = sin(pi*t) / tan(pi*t/K) / K for K even. %| This function is bandlimited and its samples are an impulse train. %| It is closely related to the Dirichle...
github
sunhongfu/scripts-master
poisson2.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/poisson2.m
1,772
utf_8
3b7335e80615537c281d420af6cce9fa
function data = poisson2(xm, varargin) %|function data = poisson2(xm, [options]) %| %| in %| 'xm' float %| %| option %| 'seed' int seed for 'rand' %| 'factor' double a value < 1 for rejection method %| %| Generate Poisson random column vector with mean xm. %| Uses rejection method - good for large values of xm....
github
sunhongfu/scripts-master
min_cos_quad.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/min_cos_quad.m
3,173
utf_8
096e10676fa8af29d31a265aa6d3c2dc
function t = min_cos_quad(m, p, b, c, niter) %|function t = min_cos_quad(m, p, b, c, niter) %| %| find the minimizer of the sinusoid + quadratic form: %| f(t) = m * (1-cos(t-p)) + b*t + c/2 t^2 %| %| This is useful for certain phase-related optimization transfer problems. %| %| Copyright 2003-11-9, Jeff Fessler, Univ...
github
sunhongfu/scripts-master
kde_pmf2.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/kde_pmf2.m
6,301
utf_8
2d56a911549ea0f282371a9122e09d0f
function [pmf xs ys] = kde_pmf2(x, y, varargin) %|function [pmf xs ys] = kde_pmf2(x, y, varargin) %| %| Compute a 2D empirical joint probability mass function (PMF) %| using interpolation that is similar to a kernel density estimate. %| This joint PMF (interpolated / smoothed histogram) is useful for %| computing joi...
github
sunhongfu/scripts-master
rms.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/rms.m
728
utf_8
0d6bd4bfbbbaefcae75fe8279a34586a
function [rhat, s] = rms(x) %function [rhat, s] = rms(x) % function [r, s] = rms(err) % in: % x: NxM error vectors % out: % r: Mx1 estimate of rms error % s: Mx1 estimate of std. dev. of that estimate if streq(x, 'test'), rms_test, return, end N = nrow(x); if (N==1), error('ERROR: use column vector'), end bs = mean...
github
sunhongfu/scripts-master
stackup.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/stackup.m
1,652
utf_8
cb32cb88cf030cac059a98ae7524b920
function ss = stackup(varargin) %|function ss = stackup(x1, x2, ...) %| %| stack up 2D arrays to make 3D array %| or stack up 3D arrays to make 4D array %| This generalizes how [a; b] "stacks up" 1D vectors to make a 2D array. %| This is useful in conjunction with stackpick(). %| It is akin to cat(ndims(x1)+1, x1, x2...
github
sunhongfu/scripts-master
bspline_1d_synth.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/bspline_1d_synth.m
7,547
utf_8
22d198ab32dbead6b3027041488ae871
function ft = bspline_1d_synth(coef, ti, varargin) %|function ft = bspline_1d_synth(coef, ti, varargin) %| %| Given c[n], the b-spline coefficients for the following model: %| f(t) = \sum_{k=0}^{N-1} coef_k b(t - k), %| and given sorted sample locations ti, synthesize signal samples f(t_i). %| %| in %| coef [N,(L)] ...
github
sunhongfu/scripts-master
strum_test.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/strum_test.m
1,450
utf_8
5f9ccc49384242173e665bfc02436bde
function strum_test %function strum_test % test strum object % Copyright 2006-1-19, Jeff Fessler, University of Michigan dat.a = 'a'; dat.b = 'b'; h0 = @strum_test_fun0; h1 = @(st, arg) [st.a arg]; h2 = @(st, arg) sum(arg); % with comment st = strum(dat, {'fun0', h0, ''; 'fun1', h1, '(arg)'; 'fun2', h2, '(arg)'}) st...
github
sunhongfu/scripts-master
highrate_centers.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/highrate_centers.m
1,973
utf_8
fa074a06d856dfb3fc5ae1f1901a054a
function centers = highrate_centers(data, L, M) %|function centers = highrate_centers(data, L, M) %| According to high-rate scalar quantization theory (Gersho, T-IT, 1979), %| the density of MMSE quantization cell centroids should be f^{k/(k+2)}, %| for k-dimensional data distributed with pdf f. %| This m-file design...
github
sunhongfu/scripts-master
padn.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/padn.m
1,336
utf_8
4822bab375497160ba2c475697fec6a7
function out = padn(mat, newdim) %|function out = padn(mat, newdim) %| pad input matrix to newdim, preserving 'center point' %| todo: replace by matlab's "padarray" if nargin < 1, help(mfilename), error(mfilename), end if streq(mat, 'test'), padn_test, return, end % default: round to next up power of 2 if nargin < ...
github
sunhongfu/scripts-master
reale.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/reale.m
1,973
utf_8
d7514474903cc0261796237d78f5ae02
function y = reale(x, arg2, arg3) %| %| y = reale(x) %| y = reale(x, tol) %| y = reale(x, 'warn', 'message') %| y = reale(x, 'error') %| y = reale(x, 'report') %| y = reale(x, 'prompt') %| y = reale(x, 'disp') %| %| return real part of complex data (with error checking). %| checks that imaginary part is negligible (or ...
github
sunhongfu/scripts-master
equivs.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/equivs.m
1,610
utf_8
f9ca1bd1ae3239b4f775ac31f6874f9a
function out = equivs(var1, var2, varargin) %|function out = equivs(var1, var2, command) %| verify that var1 and var2 are equivalent to within single precision accuracy %| if not, print error message. an alternative to isequal(). %| See also: jf_equal %| option %| 'thresh' threshold (default: 1e-6) %| Copyright 2007...
github
sunhongfu/scripts-master
jf_rm_toolbox.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/private/jf_rm_toolbox.m
686
utf_8
97251af0ce7418ae4ee9e0a24ae04b72
function jf_rm_toolbox % remove matlab toolboxes from path % for testing my toolbox with vanilla matlab rm aero rm aeroblks rm bioinfo rm comm rm commblks rm compiler rm control rm curvefit rm database rm des rm distcomp rm dspblks rm eml rm emlcoder rm filterdesign rm finance rm fixedpoint rm fuzzy rm geoweb rm ident...
github
sunhongfu/scripts-master
jf_prctile.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/private/jf_prctile.m
1,066
utf_8
4f9221f4120fbff5aa6add943c5a1ac9
function y = jf_prctile(pn, x, p, dim) % mimic matlab's prctile which is in the "stats" toolbox if streq(x, 'test'), jf_prctile_test, y = []; return, end if nargin < 3, help(mfilename), error(mfilename), end % work with permuted dimensions if needed if nargin > 3 && ~isempty(dim) order = [dim:ndims(x) 1:dim-1]; x =...
github
sunhongfu/scripts-master
jf_color_order.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/private/jf_color_order.m
984
utf_8
009a5177b58c46e4e5ed781f43bdf930
function out = jf_color_order(pn, varargin) %function out = jf_color_order(pn, varargin) % set color order to start with yellow then cyan etc., for black background if ~length(varargin) out = jf_color_order_bw; return end out = []; switch varargin{1} case 'revert' set(0, 'DefaultAxesColorOrder', 'default') retu...
github
sunhongfu/scripts-master
jf_struct_recurse.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/private/jf_struct_recurse.m
1,824
utf_8
d7849c16991e5a735db1c20c9bfe3a79
function out = jf_struct_recurse(pn, st, varargin) %|function out = jf_struct_recurse(pn, st, varargin) %| %| Recursively descend a structure and examine its (numeric) members %| % Copyright 2010-04-05, Jeff Fessler, University of Michigan if nargin < 1, help(mfilename), error(mfilename), end arg.type = 'minmax_nan...
github
sunhongfu/scripts-master
display.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/@strum/display.m
1,036
utf_8
bf17c2af3d0e12d5ea0fb3c4ae23eeb8
function display(ob) %function display(ob) % "display" method for this class name = inputname(1); printm('"%s" is an object of class "%s":', name, class(ob)) ob = struct(ob); disp(ob) fnames = fieldnames(ob); for ii=1:length(fnames) fname = fnames{ii}; if isstruct(ob.(fname)) printf('%s.%s :', inputname(1), fnam...
github
sunhongfu/scripts-master
mat_write.m
.m
scripts-master/MRF/recon/_src/_NUFFT/utilities/arch/mat_write.m
2,626
utf_8
51f2b89c210296ee2a33b698ceaa1ab8
function mat_write(file, data, varargin) %function mat_write(file, data, % ['-check', '-nocheck', '-type', datatype, '-name', varname]) % % Save matlab "data" to "file", first checking if "file" exists! % If file suffix is .fld, then save as AVS .fld file in xdr_float. % % datatype can be 'xdr_float' 'xdr_int' ... % ...
github
sunhongfu/scripts-master
fftn_fast.m
.m
scripts-master/MRF/recon/_src/_NUFFT/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
sunhongfu/scripts-master
nufft_init.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/nufft_init.m
9,078
utf_8
8404dab6a378286f60e1ec96e8a03af3
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] "digi...
github
sunhongfu/scripts-master
dtft.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/dtft.m
2,364
utf_8
78368b81b43c5297ff33dc20d9dc0974
function X = dtft(x, omega, n_shift, useloop) %|function X = dtft(x, omega, n_shift, useloop) %| Compute d-dimensional DTFT of signal x at frequency locations omega %| in %| x [[Nd] L] signal values %| omega [M dd] frequency locations (radians) %| n_shift [dd 1] use [0:N-1]-n_shift (default [0 0]) %| useloop 1 to...
github
sunhongfu/scripts-master
newfft.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/newfft.m
18,090
utf_8
ebae560263354d06eae466d1a6dd77f9
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
sunhongfu/scripts-master
kaiser_bessel.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/kaiser_bessel.m
4,245
utf_8
eb663e2f74fb509c947663fb2c6d4b88
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) %| orde...
github
sunhongfu/scripts-master
kaiser_bessel_xray.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/kaiser_bessel_xray.m
2,169
utf_8
5d1893ab2d3217a9310948fe67ff7453
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
sunhongfu/scripts-master
kaiser_bessel_ft.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/kaiser_bessel_ft.m
2,914
utf_8
13471fc4abc2633a97527aa5e19431f1
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
sunhongfu/scripts-master
ifftn_fast.m
.m
scripts-master/MRF/recon/_src/_NUFFT/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
sunhongfu/scripts-master
nufft1_build.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/nufft1_build.m
6,859
utf_8
1cd441b39294fac147ef52f7458c84b7
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 DFT freque...
github
sunhongfu/scripts-master
nufft_scale.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/nufft_scale.m
1,781
utf_8
478adbf2f70bd98ff5d978defd79cdda
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
sunhongfu/scripts-master
nufft_sinc.m
.m
scripts-master/MRF/recon/_src/_NUFFT/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
sunhongfu/scripts-master
nufft_diric.m
.m
scripts-master/MRF/recon/_src/_NUFFT/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
sunhongfu/scripts-master
dtft_adj.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/dtft_adj.m
2,511
utf_8
6c948619bad55598699158ec924d0363
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
sunhongfu/scripts-master
interp1_table1_import.m
.m
scripts-master/MRF/recon/_src/_NUFFT/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
sunhongfu/scripts-master
nufft_interp_zn.m
.m
scripts-master/MRF/recon/_src/_NUFFT/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
sunhongfu/scripts-master
newfft_approx_for.m
.m
scripts-master/MRF/recon/_src/_NUFFT/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
sunhongfu/scripts-master
newfft_table_init.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/private/newfft_table_init.m
5,809
utf_8
7d5daa487f47227d1e7c4f7aa4d09e1f
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
sunhongfu/scripts-master
nufft_offset.m
.m
scripts-master/MRF/recon/_src/_NUFFT/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
sunhongfu/scripts-master
nufft2_bilinear.m
.m
scripts-master/MRF/recon/_src/_NUFFT/nufft/archive/nufft2_bilinear.m
3,187
utf_8
ea5b3bd8bd47648f7f1c97dcfd1dd051
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
sunhongfu/scripts-master
montager.m
.m
scripts-master/MRF/recon/_src/_NUFFT/graph/montager.m
1,486
utf_8
56c813a7853447d57d7757288a423902
function xo = montager(xi, varargin) %|function xo = montager(xi, varargin) %| %| Make montage or mosaic of set of images. %| %| in %| xi [3d or 4d] set of images %| %| options %| 'col' # of cols %| 'row' # of rows %| 'aspect' aspect ratio (default 1.2) %| %| out %| xo [2d] 3d or 4d images arrange a as a 2d rectan...
github
sunhongfu/scripts-master
slicer3.m
.m
scripts-master/MRF/recon/_src/_NUFFT/graph/slicer3.m
1,429
utf_8
f975ace030ccb2102007d5c425a50c64
function slicer3(vol, varargin) %function slicer3(vol, varargin) % show transaxial, coronal, and saggital slices of a 3D volume % in % vol [nx,ny,nz] 3d image volume % option % 'how' 'c|cent|center|max' % 'args' {} for im(..., args{:}) % 'clim' [2] color limits % % Copyright 2007-1-28, Jeff Fessler, The Universit...
github
sunhongfu/scripts-master
cbar.m
.m
scripts-master/MRF/recon/_src/_NUFFT/graph/cbar.m
5,199
utf_8
4a691eb6a64ad37fb694f841a53e44db
function hh = cbar(varargin) %|function hh = cbar(varargin) %| %| colorbar with options %| 'h' 'horiz' horizontal %| 'v' 'vert' vertical %| 'below' horizontal colorbar below current plot (jf) %| 'hide' make room for it, but hide it (invisible) %| 'fSIZE' font size %| 1d-array ytick %| 'notick' disable tick marks %...
github
sunhongfu/scripts-master
plot_cell.m
.m
scripts-master/MRF/recon/_src/_NUFFT/graph/plot_cell.m
1,135
utf_8
8109ef0ab7cf2160a09fa70e6cfc775a
function plot_cell(xc, yc, types, varargin) %function plot_cell(xc, yc, types, varargin) % plot several "y" curves against x curve(s) % in: % xc {N} or 1 cell array of x points % or a single vector if all x's are the same % yc {N} cell array of y points % types {N} cell array of line types % options: % 'use', fu...
github
sunhongfu/scripts-master
xaxis_pi.m
.m
scripts-master/MRF/recon/_src/_NUFFT/graph/xaxis_pi.m
1,997
utf_8
025f8ca74646acc95d1f5db9259358d0
function xaxis_pi(varargin) %function xaxis_pi(varargin) % label x axis with various forms of "pi" % the argument can be a string with p's in it, or fractions of pi: % [0 1/2 1] or '0 p/2 p' -> [0 pi/2 pi] % [-1 0 1] or '-p 0 p' -> [-pi 0 pi] % etc. % % There is one catch: this changes the axes font, so subsequent % c...
github
sunhongfu/scripts-master
plot_ellipse.m
.m
scripts-master/MRF/recon/_src/_NUFFT/graph/plot_ellipse.m
1,048
utf_8
2d49c04f3121cc0bb1ff3280612b457b
function [xo, yo] = plot_ellipse(cx, cy, rx, ry, theta, varargin) %|function [xo, yo] = plot_ellipse(cx, cy, rx, ry, theta, [options]) %| plot an ellipse %| option %| 'n' # of points for half of ellipse. default: 301 %| 'c' line type. default: 'b-' %| 'hold' 1|0 if 1, then add to current plot. default: 0 if nar...
github
sunhongfu/scripts-master
axis_pipi.m
.m
scripts-master/MRF/recon/_src/_NUFFT/graph/axis_pipi.m
1,908
utf_8
0f1812f505b6d839ee608755ac05f6d6
function axis_pipi(varargin) %function axis_pipi(['set',] xo, yo, omx, omy) % label x and y axes from -pi to pi for 2D DSFT if nargin <= 1 % trick: axes labels must *precede* the symbol font below xlabel '\omega_X' ylabel '\omega_Y' if nargin == 1 if streq(varargin{1}, 'set') axis([-pi pi -pi pi]) else ...
github
sunhongfu/scripts-master
savefig.m
.m
scripts-master/MRF/recon/_src/_NUFFT/graph/savefig.m
3,208
utf_8
31d7c12287268f8e357687e3cdea1dd3
function savefig(varargin) %|function savefig([rootdir,] base, ['c']) %| %| save current figure to eps file rootdir/base.eps with prompting. %| %| options: %| 'eps_c' save to color .eps file without inverting! %| 'cw' color .eps file for use in white paper %| 'c' save both color and b/w files (for talks) %| name.eps...