====== Life Plugin ======
===== Testing =====
These instructions work with [[http://hdl.handle.net/2022/20995|this]] dataset from Franco Pestilli. Try the directory STN/sub-FP.
- **Set mlrPath** First make sure that you have mrTools in your path and then run mlrPath to make sure it does not conflict with vistasoftmlrPath mrTools+vista
This will make it so only mrTools is in your path as well as a few vistasoft paths that do not conflict. You will also need to have mba in your path.
- **Install Plugin** You need to first setup the mlrLife and mlrAnatomy plugins by doing mlrPlugin('altPlugins');
and selecting mlrLife and mlrAnatomy. This should be done before starting mrLoadRet.
- **Create empty MLR session** Make an empty MLR session for loading the anatomiesmakeEmptyMLRDir('mlr')
- **Start MLR** Start MLR by switching to the directory you just created and run mrLoadRet
- **Import fascicles** Import fascicles by going to File/Base Anatomy/Import Fascicles
- **Choose dwi** Choose the original DWI nifti file from which the tracts were created. This file is opened just to get the header information.
- **Choose tck** Next choose the tractography file you want to load
- **Choose subset number** For now the code is slow, so choose the number of random fibers that you are going to load - a number like 5000 works ok.
- **Fix T1 header** All the headers have sform and qform codes set to 2 - which is not recognized by MLR - so fix the T1 header to have qform and sform code set to 1.
cd Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/STN/sub-FP/anatomy
[d h] = mlrImageLoad('t1.nii.gz');
h.hdr.qform_code = 1;
h.hdr.sform_code = 1;
mlrImageSave('t1_sform_code_fix.nii',d,h);
- **Load T1** Now go to File/Base Anatomy/Load and load the t1_sform_code_fix nifti file you just created.Select the 3D radio button and rotate the anatomy so that you can see it.
- **Set multidisplay** Go to View/Multi Base Display and select it. Then in the panel to the right, select the tract base and click MultiDisplay. You may also want to change the Overlay to a color that is easily viewable. Should look like the following:{{:mrtools:tracttest.png|tract test image}}