denoising_mppca : 4d image denoising and noise map estimation by exploitingΒΆ

https://mybinder.org/badge_logo.svg

Contents

% This m-file has been automatically generated using qMRgenBatch(denoising_mppca)
% Command Line Interface (CLI) is well-suited for automatization
% purposes and Octave.
%
% Please execute this m-file section by section to get familiar with batch
% processing for denoising_mppca on CLI.
%
% Demo files are downloaded into denoising_mppca_data folder.
%
% Written by: Agah Karakuzu, 2017
% =========================================================================

I- DESCRIPTION

qMRinfo('denoising_mppca'); % Describe the model
  denoising_mppca :  4d image denoising and noise map estimation by exploiting
data redundancy in the PCA domain using universal properties
of the eigenspectrum of random covariance matrices,
i.e. Marchenko Pastur distribution

Assumptions:
Noise follows a rician distribution
image bounderies are not processed

Inputs:
Data4D              4D data (any modality)
(Mask)                Binary mask with region-of-interest

Outputs:
Data4D_denoised     denoised 4D data
sigma_g               standard deviation of the rician noise

Options:
sampling
'full'          sliding window
'fast'          block processing (warning: undersampled noise map will be returned)
kernel              window size, typically in order of [5 x 5 x 5]

Example of command line usage:
Model = denoising_mppca;  % Create class from model
data.Data4D = load_nii_data('Data4D.nii.gz');  % Load data
FitResults = FitData(data,Model,1);  % Fit each voxel within mask
FitResultsSave_nii(FitResults,'Data4D.nii.gz');  % Save in local folder: FitResults/

Author: Tanguy Duval, 2016

References:
Please cite the following if you use this module:
Veraart, J.; Fieremans, E.  Novikov, D.S. Diffusion MRI noise mapping using random matrix theory Magn. Res. Med., 2016, early view, doi:10.1002/mrm.26059
In addition to citing the package:
Cabana J-F, Gu Y, Boudreau M, Levesque IR, Atchia Y, Sled JG, Narayanan S, Arnold DL, Pike GB, Cohen-Adad J, Duval T, Vuong M-T and Stikov N. (2016), Quantitative magnetization transfer imaging made easy with qMTLab: Software for data simulation, analysis, and visualization. Concepts Magn. Reson.. doi: 10.1002/cmr.a.21357

Reference page in Doc Center
doc denoising_mppca


II- MODEL PARAMETERS

a- create object

Model = denoising_mppca;

b- modify options

         |- This section will pop-up the options GUI. Close window to continue.
|- Octave is not GUI compatible. Modify Model.options directly.
Model = Custom_OptionsGUI(Model); % You need to close GUI to move on.

III- FIT EXPERIMENTAL DATASET

a- load experimental data

         |- denoising_mppca object needs 2 data input(s) to be assigned:
|-   Data4D
|-   Mask
data = struct();
% Data4D.nii.gz contains [70   70    4  197] data.
data.Data4D=double(load_nii_data('denoising_mppca_data/Data4D.nii.gz'));

b- fit dataset

           |- This section will fit data.
FitResults = FitData(data,Model,0);
Warning: undersampled noise map will be returned
...done

c- show fitting results

         |- Output map will be displayed.
|- If available, a graph will be displayed to show fitting in a voxel.
|- To make documentation generation and our CI tests faster for this model,
we used a subportion of the data (40X40X40) in our testing environment.
|- Therefore, this example will use FitResults that comes with OSF data for display purposes.
|- Users will get the whole dataset (384X336X224) and the script that uses it for demo
via qMRgenBatch(qsm_sb) command.
FitResults_old = load('FitResults/FitResults.mat');
qMRshowOutput(FitResults_old,data,Model);

d- Save results

         |-  qMR maps are saved in NIFTI and in a structure FitResults.mat
that can be loaded in qMRLab graphical user interface
|-  Model object stores all the options and protocol.
It can be easily shared with collaborators to fit their
own data or can be used for simulation.
FitResultsSave_nii(FitResults, 'denoising_mppca_data/Data4D.nii.gz');
Model.saveObj('denoising_mppca_Demo.qmrlab.mat');
Warning: Directory already exists.

V- SIMULATIONS

   |- This section can be executed to run simulations for denoising_mppca.

a- Single Voxel Curve

         |- Simulates Single Voxel curves:
(1) use equation to generate synthetic MRI data
(2) add rician noise
(3) fit and plot curve
% Not available for the current model.

b- Sensitivity Analysis

         |-    Simulates sensitivity to fitted parameters:
(1) vary fitting parameters from lower (lb) to upper (ub) bound.
(2) run Sim_Single_Voxel_Curve Nofruns times
(3) Compute mean and std across runs
% Not available for the current model.