augimeri
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: 'MRPI Project Documentation' disqus: hackmd --- MRPI Automatic Software === ## Table of Contents [TOC] ## Disclaimer Copyright 2022 - UNIVERSITY MAGNA GRAECIA OF CATANZARO Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED FOR RESEARCH PURPOSES ONLY, DO NOT USE ANY OUTPUT OF THE SOFTWARE FOR ANY OTHER DIAGNOSTIC AIMS. ## Overview This manual is intended to help the user to perform the automated measurements of MRPI and MRPI 2.0 indexes. The GUI (Graphical User Interface) is organized in sections to show each step of the automated measurements. The proposed automated segmentation approach to calculate the MRPI and MRPI 2.0, developed in MATLAB, is based on the combination of a "revised landmark-based approach" which incorporates information about tissue class, structure, and position, together with a “thresholding-based approach”. The input data consists of high-resolution (1-mm) volumetric T1-weighted structural MR images. As preprocessing step, the MRI scan must be rigidly registered (using a 6-parameter affine registration) to the standard space (MNI) based on the mutual information metric using the software FSL and resampling the registered T1 using cubic spline interpolation. Then, the volume must be corrected for fluctuations in intensity using the software FREESURFER. To use the software, please follow the instructions about preprocessing. Subsequently, an input matrix in “.mat” must be created to proceed with the automated measurement. Eventually, software fails a manual section is provided to help clinical in obtain a medical report. # Prerequisites for Deployment SW_MRPI Executable 1. Prerequisites for Deployment Verify that version 9.11 (R2021b) of the MATLAB Runtime is installed. If not, you can run the MATLAB Runtime installer. To find its location, enter >>mcrinstaller at the MATLAB prompt. NOTE: You will need administrator rights to run the MATLAB Runtime installer. Alternatively, download and install the Windows version of the MATLAB Runtime for R2021b from the following link on the MathWorks website: https://www.mathworks.com/products/compiler/mcr/index.html For more information about the MATLAB Runtime and the MATLAB Runtime installer, see "Distribute Applications" in the MATLAB Compiler documentation in the MathWorks Documentation Center. 2. Files to Deploy and Package Files to Package for Standalone ================================ -SW_MRPI.exe -MCRInstaller.exe Note: if end users are unable to download the MATLAB Runtime using the instructions in the previous section, include it when building your component by clicking the "Runtime included in package" link in the Deployment Tool. -This readme file 3. Definitions For information on deployment terminology, go to https://www.mathworks.com/help and select MATLAB Compiler > Getting Started > About Application Deployment > Deployment Product Terms in the MathWorks Documentation Center. # Usage ## INPUT PREPROCESSING The GUI use a matrix preprocessed with [FLS]() and [FREESURFER]() since MR IMAGES need to be rigidly registered using a 6-parameter affine registration to standard space (MNI). The step are reported below: 1. convert Dicom files to `nii.gz` using [dcm2niix](https://github.com/rordenlab/dcm2niix). For example, the following command try convert all dicom images in `/dicom` and put the output `nii.gz` volume in the folder `/nifti` ```bash dcm2niix -z Y -x Y -f target_%i -o ./nifti ./dicom ``` Depending on the input volume, `dcm2niix` can output different `nii.gz` files. Select the *cropped* volume that should be named as `target_Crop_1.nii.gz` 2. remove neck and lower head using [FSL robustfov](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSL) tool (assuming your input volume is INPUT.nii.gz) ``` robustfov --debug -i INPUT -r T1 ``` 3. then execute [FLS bet](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/BET/UserGuide) for simple brain extraction including the following options ``` bet T1 T1_BRAIN -B -f 0.1 -g 0 ``` At this point, your input is ready for the spatial registration. 4. [FSL flirt](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT) registration (two-step process): ```bash ### Brain vs MNI flirt -in T1_BRAIN.nii.gz \ -ref $FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz \ -out T1_BRAIN_reg.nii.gz -omat T1_BRAIN_reg.mat -bins 256 -cost corratio -searchrx -90 90 -searchry - 90 -searchrz -90 90 -dof 6 -interp trilinear ``` ```bash ### T1 vs MNI flirt -in T1.nii.gz -applyxfm -init T1_BRAIN_reg.mat -out T1_reg.nii.gz -paddingsize 0.0 -interp trilinear -ref T1_BRAIN_reg.nii.gz ``` 5. Turn `nii.gz` volume in `mgz` format using [Freesurfer mri_convert](https://surfer.nmr.mgh.harvard.edu/fswiki/mri_convert). Let's assume your Freesurfer subject's dir is `$SUBJECTS`, first create a folder for your input (ex: sub1) with the following sub-tree: ```bash mkdir -p $SUBJECTS/sub1/mri/orig ``` then convert and output your `mgz` by running: ```bash mri_convert T1_reg.nii.gz $SUBJECTS/sub1/mri/orig/001.mgz ``` 6. Run [Freesurfer recon-all](https://surfer.nmr.mgh.harvard.edu/fswiki/recon-all) to perform correction of fluctuations. ```bash recon-all -s sub1 -motioncor -talairach -nuintensitycor -normalization -no-isrunning ``` 7. Turn back `mgz` to `nii` ```bash mri_convert $SUBJECTS/sub1/mri/T1.mgz T1.nii ``` 8. Resample the volume with FSL to 256x256x512 space ```bash ### generating an nifti header fslcreatehd 512 256 256 1 0.5 1 1 1 0 0 0 2 vf_tmp.nii.gz ### resampling flirt -in T1.nii -applyxfm -init $FSLDIR/etc/flirtsch/ident.mat -out final.nii -paddingsize 0.0 -interp trilinear -ref vf_tmp.nii.gz` ``` ## CREATE INPUT MATLAB The following script can be used to import a `nii` volume within MATLAB and save it as `.mat` file, so that it is easily reusable without relying on the nifti format anymore. At the MATLAB prompt enter the following commands: ```matlab= volume=load_nii(‘final.nii.gz’); v2=volume.img; A=permute(v2, [3 2 1]); B=flipdim(A,1); C=flipdim(B,2); volume_finale=C; save(‘input_matlab’,’volume_finale’) ``` Finally, the matrix saved in `input_matlab.mat` can be user as input for automatic measurements of MRPI and MRPI 2.0 with the Automatic Software ## AUTOMATED MRPI SOFTWARE 1. Open `SW_MRPI` and click on `LOAD SUBJECT`. Choose input_matlab and the scanner field strength (1.5T or 3T). ![](https://i.imgur.com/3JQR9tO.png) 2. *Automated Measurement of the Third Ventricle and Frontal Horns*: click on Measure and the gui `segmentazionemanu_ventricoli` will open. Click ok `LOAD IMAGES` `AUTOMATED SELECTION` `AUTOMATED MEASURMENT`, after a couple of seconds the slice where the software perform measures will be showed with the proper value. Close this GUI. ![](https://i.imgur.com/c7Wnixn.png) 2. *Automated Measurement of Pons and Midbrain*: Click on `MEASURE` and the gui `pontemensencefalomisura` will open. Click on `PONS AND MIDBRAIN MEASURMENT` and wait to visualize the value in the white boxes. In red is reported the Midbrain value, in green the Pons. ![](https://i.imgur.com/JPihaEx.png) 3. *Automated Measurement of Middle Cerebellar Peduncles*: Click on `Measure` and the GUI `misurapedmedio` will open. Click on `MIDDLE CEREBELLAR PEDUNCLE` and wait. The values measured in different slices are shown. Please consider that a reliable final MCP width value requires at least two measurements on each side. ![](https://i.imgur.com/bx3r3GA.png) 4. *Automated Measurement of Superior Cerebellar Peduncles*: click on `MEASURE` and the GUI `misurapeduncolosuperiore` will open. Click on `SUPERIOR CEREBELLAR PEDUNCLE` and wait. The values measured in different slices are shown. ![](https://i.imgur.com/h8CdIZp.png) **Automated values of MRPI and MRPI 2.0 will be showed at the end of each automated sub-section.** ![](https://i.imgur.com/4izobQU.png) In case of failure of the automated tool in providing the measurement of a brain structure, it can be manually measured using the gui (on the right side of the interface). The slices can be selected using arrows and the measurement can be performed clicking on the specific commands and then on the selected slices. The manual measurement should be performed in accordance to: > Quattrone A, Nicoletti G, Messina D, Fera F, Condino F, Pugliese P, Lanza P, Barone P, Morgante L, Zappia M, Aguglia U, Gallo O. MR imaging index for differentiation of progressive supranuclear palsy from Parkinson disease and the Parkinson variant of multiple system atrophy. Radiology. 2008 Jan;246(1):214-21. doi: 10.1148/radiol.2453061703” for midbrain area, pons area, MCP width and SCP width. > Quattrone A, Morelli M, Nigro S, Quattrone A, Vescio B, Arabia G, Nicoletti G, Nisticò R, Salsone M, Novellino F, Barbagallo G, Le Piane E, Pugliese P, Bosco D, Vaccaro MG, Chiriaco C, Sabatini U, Vescio V, Stanà C, Rocca F, Gullà D, Caracciolo M. A new MR imaging index for differentiation of progressive supranuclear palsy-parkinsonism from Parkinson's disease. Parkinsonism Relat Disord. 2018 Sep;54:3-8. doi: 10.1016/j.parkreldis.2018.07.016.” for the third ventricle width and frontal horns width ## Appendix and FAQ :::info **FOR ANY PROBLEM please contact support: mrpiunicz@gmail.com ::: https://mrpi.unicz.it/

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully