Overview
Atlassian Sourcetree is a free Git and Mercurial client for Windows.
Atlassian Sourcetree is a free Git and Mercurial client for Mac.
DTI code
Written 20122014 by Tuomo Valkonen tuomov@iki.fi, University of Graz & University of Cambridge.
This repository includes code for TGV^2 and TV denoising and reconstruction from sparse kspace data. For problems with linear operators, the ChambollePock [3] modified primal dual hybrid gradientn method (PDHGM) is used. For problems with nonlinear, the nonlinear PHDHGM of [5] and the GaussNewton method are supported. Optional Bregman iterations may be applied to many problems. The code is parallelised using OpenMP. There is also OpenACC GPU support, but at the moment it is not actively maintained.
The included programs and cases covered are the following.

denoise: basic colour or grayscale image denoising.

tensorreg: Diffusion tensor denoising per [2]. This solves the optionally positivityconstrained problem
min_{u >= 0} FID(fAu) + REG(u)
for tensor fields u and f. For u, tensors of order 0 (scalar functions), 1 (vector fields), and 2 are supported. A is a pointwise operator, and FID either the L1 fidelity or the squared L2 fidelity. The regulariser REG is one of TGV^2, TD (TGV^1), or TV.
Small subproblems in the positivityconstrained case with A!=I are solved with the primaldual interior point method of [4].

ksreg: Sparse reconstruction from Kspace data. This solves the problem
min_u fSFu^2 + REG(u)
for complex image u, and sparse Kspace data f. Here S is the sparse sampling operator and F the (discrete) Fourier transform.

ksregnl: The same as ksreg, but with individual regularisation of the phase and magnitude of u, and nonlinear reconstruction of u from these.
Contents
doc/ Documentation, include a user guide to the tensorreg program, and quick developer introduction to the C code. examples/ Multiple usecase examples, and miscellaneous Matlab code. src/ Source code. matlab/ Auxiliary Matlab code. (Plotting, NIFTI import, ...) See README.matlab for information. mex/ Auxiliary Mex routines for Matlab. Necessary for the plotting routine!
Dependencies
GNU make http://www.gnu.org/ Other variants of make may not work. pgcc http://www.pgroup.com/ Or any other OpenACC compiler for the GPU implementation. FFTW3 http://www.fftw.org/ For Fast Fourier Transform. NFFT3 http://wwwuser.tuchemnitz.de/~potts/nfft/ Nonuniform Fast Fourier Transform.
Compilation
To compile the code, follow the following steps

Download install the libtu utility library from

Copy local.mk.in as local.mk

Edit local.mk to suit your system and choices.

Run make
Thirdparty code
This package includes NIFTI code by Jimmy Shen (matlab/NIFTI_code), and Rice distribution code by Ged Ridgway (matlab/rician).
License
This work is published under GNU GPLv3. See the attached LICENSE.txt.
References
[1] K. Bredies and K. Kunisch and T. Pock, Total generalised variation, SIAM Journal on Imaging Sciences 3 (2011), 492526. DOI:10.1137/090769521
http://dx.doi.org/10.1137/090769521
[2] T. Valkonen, K. Bredies, and F. Knoll, Total generalised variation in diffusion tensor imaging, SIAM Journal on Imaging Sciences 6 (2013), 487–525, DOI:10.1137/120867172
http://dx.doi.org/10.1137/120867172 http://iki.fi/tuomov/mathematics/dtireg.pdf
[3] A. Chambolle and T. Pock, A firstorder primaldual algorithm for convex problems with applications to imaging, Journal of Mathematical Imaging and Vision 40 (2011), 120145. DOI:10.1007/s1085101002511
http://dx.doi.org/10.1007/s1085101002511
[4] T. Valkonen, A method for weighted projections to the positive definite cone, SFBReport 2012016, KarlFranzens University of Graz (2012).
http://math.unigraz.at/mobis/publications/SFBReport2012016.pdf http://iki.fi/tuomov/mathematics/scaleproj.pdf
[5] T. Valkonen, A primaldual hybrid gradient method for nonlinear operators with applications to MRI (2013). Submitted.
http://iki.fi/tuomov/mathematics/nlpdhgm.pdf