{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# I- DESCRIPTION" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "qMRinfo('noise_level'); % Describe the model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# II- MODEL PARAMETERS\n", "## a- Create object" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "Model = noise_level;" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Download sample data from OSF\n", "> The current `Model` is an instance of `noise_level` class.\n", " \n", "You can manually download the sample data for `noise_level` [by clicking here](https:\/\/osf.io\/ve3xy\/download?version=4)." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "dataDir = downloadData(Model,pwd);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## b- Set protocol\n", "> Protocol is set according to the example data\n", " \n", "% |- noise_level object needs 0 protocol field(s) to be assigned:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# III- FIT EXPERIMENTAL DATASET\n", "## a- Load experimental data\n", "% |- noise_level object needs 2 data input(s) to be assigned:\n", "% |- Data4D\n", "% |- NoiseMask" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "% Data4D.nii.gz contains [70 70 4 197] data.\n", "data.Data4D=double(load_nii_data('noise_level_data\/Data4D.nii.gz'));\n", "% NoiseMask.nii.gz contains [70 70 4] data.\n", "data.NoiseMask=double(load_nii_data('noise_level_data\/NoiseMask.nii.gz'));\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## b- Fit experimental data\n", "> This section will fit data." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "FitResults = FitData(data,Model,0);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## c- Show fitting results\n", "> * Output map will be displayed.\n", " \n", "> * If available, a graph will be displayed to show fitting in a voxel." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "qMRshowOutput(FitResults,data,Model);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## d- Save results\n", "> * qMR maps are saved in NIFTI and in a structure `FitResults.mat` that can be loaded in qMRLab graphical user interface.\n", "> * Model object stores all the options and protocol\n", "> * These objects can be easily shared or be used for simulation." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "FitResultsSave_nii(FitResults, 'noise_level_data\/Data4D.nii.gz');" ] } ], "metadata": { "kernelspec": { "display_name": "Octave", "language": "octave", "name": "octave" }, "language_info": { "file_extension": ".m", "help_links": [ { "text": "GNU Octave", "url": "https:\/\/www.gnu.org\/software\/octave\/support.html" }, { "text": "Octave Kernel", "url": "https:\/\/github.com\/Calysto\/octave_kernel" }, { "text": "MetaKernel Magics", "url": "https:\/\/github.com\/calysto\/metakernel\/blob\/master\/metakernel\/magics\/README.md" } ], "mimetype": "text\/x-octave", "name": "octave", "version": "4.2.1" }, "toc": { "nav_menu": null, "number_sections": true, "sideBar": false, "skip_h1_title": false, "toc_cell": false, "toc_position": null, "toc_section_display": "block", "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }