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:
Karakuzu A., Boudreau M., Duval T.,Boshkovski T., Leppert I.R., Cabana J.F.,
Gagnon I., Beliveau P., Pike G.B., Cohen-Adad J., Stikov N. (2020), qMRLab:
Quantitative MRI analysis, under one umbrella doi: 10.21105/joss.02343

    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);
    
=============== qMRLab::Fit ======================
    Operation has been started: denoising_mppca
    Warning: undersampled noise map will be returned
    Elapsed time is 1.036394 seconds.
    Operation has been completed: denoising_mppca
    ==================================================
    

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.