Linux & Mac OS Installation
Installation Steps
Download and install the latest stable Blender (2.7pb).
Create a folder named “mmvt_root”.
Go to the mmvt_root folder, and clone the MMVT code:
git clone https://github.com/pelednoam/mmvt.git
In case you want to reconstruct your own subjects or view your data also in slices mode, you should install the dev version of Freesurfer (look for Development Version). After that, source Freesurfer (if you have access to the Martinos center cluster, you should just source the dev version: source /usr/local/freesurfer/nmr-dev-env).
Before running the mmvt setup, be sure that by typing ‘python’ in the terminal you are running python 3.4 and above. You can also create an alias to python 3.
Run the mmvt setup from the project’s code folder:
python -m src.setup
Setup Script Steps
Installation of all the necessary python libraries.
If the script won’t find the Blender installation, it’ll ask you to locate it.
In default, the script will create all its folders under the mmvt_root folder, unless you set the -d flag to 0. If so, it will ask you where to create the following folders (in brackets the folder’s default name):
subjects: A folder with several files from the FreeSurfer recon-all files. The preprocessing steps write to this folder, so it’s recommended not to use your recon-all folder, rather than creating another subjects folder, and set the
–remote_subject_dir
flag to your original recon-all folder. The necessary files will be copied automatically.
mmvt (“mmvt_blend”): The folder where you all the MMVT files are going to be stored. The blender files (*.blend) will be placed in this folder. For each subject, a folder will be created and the output of the preprocessing scripts will be stored in that folder.
meg (“meg”) / eeg (“eeg”) / fMRI (“fMRI”) / electrodes (“electrodes”): Where you are going to store the different data files. For the modalities you aren’t going to use, just press cancel.
After Running the Setup Script
Create a script for running Blender from the terminal (and also source Freesurfer if you’ve installed it). You can find examples in misc/launch_mmvt for Linux and Mac. You can find more information about how to run Blender from the terminal here.
How to Create the Links Manually
In case you don’t want to use the gui for selecting your folders, before running the setup, run this command:
python -m src.setup -f create_links_csv
That will create the skeleton for the links.csv file in the links folder. Edit it manually, and run the setup.
Installing the Necessary Python Libraries
If you don’t have python (3.6 and above) installed, install python 3.6 from here.
You need to run the mmvt setup with the new python you’ve just installed (or with the python 3.6 and above you’ve already have installed). Usually, python 3 create an alias, python3.
Open the terminal, cd to the mmvt-code folder (mmvt-root/mmvt) and run the mmvt setup:
python3 -m src.setup
What you should do before installing MMVT (and FreeSurfer) on Ubuntu
Python3 is already installed on unubtu (at least on ubuntu18), here is what you should run before installing MMVT:
sudo apt install python3-distutils python3-testresources python3-tk
sudo python3 mmvt_root/mmvt_code/resources/get-pip.py
For FreeSurfer to work, you should:
sudo apt-get install csh tcsh
wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb
sudo dpkg -i /tmp/libpng12.deb
sudo rm /tmp/libpng12.deb
sudo apt-get install libjpeg62-dev
To create the MMVT launcher, you need to run:
sudo apt-get install –no-install-recommends gnome-panel
gnome-desktop-item-edit –create-new ~/Desktop
sudo chown -R user:user mmvt_root/
Help
First, you can find help by running the setup with the -h flag:
python -m src.setup -h
Here are the optional flags:
-f : If you wish to run a specific step (or steps), you can use the -f flag with one of more of these options: install_reqs, create_links, copy_resources_files and install_addon. If you set more than one, use commas without space (-f install_reqs,create_links for example).
-d : If you set it to 1 (default), the setup will use the default folders locations (see Links section). If not, you’ll be asked to set the folders locations.
-g : If 1 (default), and -d is 0, you’ll be able to choose the locations of the folders using a GUI. If not, you’ll be using the command prompt.This option won’t work without installing first the external libraries (install_reqs step).
Links
Under the mmvt_root folder, you can find the links folder. The setup will create all its folders under the mmvt_root folder (unless you set the -d flag to 0, and chose a different location) and set the links to those folders. Beside of creating the actual links, a links.csv file will be created, storing the links locations. When trying to find those folders, MMVT first tries to access the links. If a link is broken or doesn’t exist MMVT will try to read it from the csv file. Worse case scenario, you can delete all the links (if exist), and just manually set the links.csv and re-run setup with the -f install_addon flag:
python -m src.setup -f install_addon
Problems with Creating the Link to Blender
One of the links is to Blender folder, where the Blender executable file is placed. In such a case, you can finish the set, set this link manually (or just edit the links.csv file) and re-run the setup just to install the MMVT addon inside Blender:
python -m src.setup -f install_addon
Problems with Installing the External Python Libraries
That can happen usually because of a bad internet connection or a firewall. If you don’t install the external libraries you’ll be able only to open existing MMVT (blend) files. You also can’t use the GUI of the setup to choose the folders locations. Don’t set the -d flag to 0, run the setup, and after that, you can manually change the links or the links.csv.