Differences between revisions 14 and 15
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The [[https://surfer.nmr.mgh.harvard.edu/fswiki/BrainstemSubstructures|brainstem]] and [[https://surfer.nmr.mgh.harvard.edu/fswiki/HippocampalSubfields|hippocampal subfield]] modules in FreeSurfer 6.0 require the Matlab R2012 runtime. This runtime is free, and therefore '''NO MATLAB LICENSES ARE REQUIRED TO USE THESE PACKAGES'''. The [[https://surfer.nmr.mgh.harvard.edu/fswiki/BrainstemSubstructures|brainstem]] and [[https://surfer.nmr.mgh.harvard.edu/fswiki/HippocampalSubfields|hippocampal subfield]] modules in FreeSurfer 6.0 require the Matlab R2012b (v8.0) runtime (note that development versions from January 2018 onwards require the Matlab R2014b - v8.4 - runtime instead). This runtime is free, and therefore '''NO MATLAB LICENSES ARE REQUIRED TO USE THESE PACKAGES'''.
Line 5: Line 5:
The runtime is installed as follows (note that some commands might require root permissions, if FreeSurfer 6.0 is installed in a system directory such as /usr/local/): The runtime is installed as follows (note that some commands might require root permissions - i.e., prepend them by '''sudo''' - if FreeSurfer is installed in a system directory such as /usr/local/):
Line 16: Line 16:
 * Second, change directory to your FreeSurfer 6.0 directory:  * Second, change directory to your FreeSurfer directory:
Line 23: Line 23:
In linux: In linux, for FreeSurfer 6.0 or development versions from 2017:
Line 25: Line 25:
curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bLinux.tar.gz" -o "runtime2012b.tar.gz" curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bLinux.tar.gz" -o "runtime.tar.gz"
}}}
or for development versions from January
2018 onwards:
{{{
curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime
2014bLinux.tar.gz" -o "runtime.tar.gz"
Line 28: Line 32:
In MAC: In MAC, for FreeSurfer 6.0 or development versions from 2017:
Line 30: Line 34:
curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bMAC.tar.gz" -o "runtime2012b.tar.gz" curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bMAC.tar.gz" -o "runtime.tar.gz"
}}}
or for development versions from January
2018 onwards:
{{{
curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime
2014bMAC.tar.gz" -o "runtime.tar.gz"
Line 35: Line 43:
tar xvf runtime2012b.tar.gz tar xvf runtime.tar.gz
Line 40: Line 48:
rm $FREESURFER_HOME/runtime2012b.tar.gz rm $FREESURFER_HOME/runtime.tar.gz
Line 46: Line 54:
 * '''I already have Matlab 2012b installed on my system. Do I really need to download and install the runtime?'''  * '''I already have Matlab 2012b/2014b installed on my system. Do I really need to download and install the runtime?'''
Line 48: Line 56:
If you already have Matlab 2012b installed on your system, there is no need to dowload the runtime. '''Note that it has to be this specific version of Matlab'''; if it is not 2012b, you need to download the runtime as described above. If it is indeed 2012b, all you need to do is to create a symbolic link named MCVv80 in your FreeSurfer directory that points to the main Matlab directory. If you already have the right version of Matlab installed on your system, there is no need to dowload the runtime. '''Note that it has to be the specific version of Matlab, depending on your FreeSurfer version: Matlab R2012b for FreeSurfer 6.0 or dev versions from 2017, and Matlab R2014b for dev versions from 2018 on'''; if it is not 2012b, you need to download the runtime as described above. If it is indeed 2012b/2014b, all you need to do is to create a symbolic link named MCRv80/MCRv84 in your FreeSurfer directory that points to the main Matlab directory.
Line 59: Line 67:
Second, change directory to your FreeSurfer 6.0 directory: Second, change directory to your FreeSurfer directory:
Line 64: Line 72:
Finally, create the symbolic link: Finally, create the symbolic link. For FreeSurfer 6.0 and dev versions from 2017:
Line 68: Line 76:
where the matlab root directory can be easily obtained by executing the command "matlabroot" in Matlab R2012b. It typically looks like "/Applications/MATLAB_R2012b.app/" in MAC, and "/usr/local/matlab/8.0" in Linux. And, for dev versions from 2018:
{{{
ln -s <MatlabRootDirectory> ./MCRv84
}}}
The matlab root directory can be easily obtained by executing the command "matlabroot" in Matlab. It typically looks like "/Applications/MATLAB_R201Xb.app/" in MAC, and "/usr/local/matlab/8.X" in Linux.

Matlab Runtime

The brainstem and hippocampal subfield modules in FreeSurfer 6.0 require the Matlab R2012b (v8.0) runtime (note that development versions from January 2018 onwards require the Matlab R2014b - v8.4 - runtime instead). This runtime is free, and therefore NO MATLAB LICENSES ARE REQUIRED TO USE THESE PACKAGES.

The runtime is installed as follows (note that some commands might require root permissions - i.e., prepend them by sudo - if FreeSurfer is installed in a system directory such as /usr/local/):

  • First, we will define the environment variable FREESURFER_HOME the same way as above. For example, in tcsh or csh:

setenv FREESURFER_HOME /usr/local/freesurfer 

Or, in bash:

export FREESURFER_HOME=/usr/local/freesurfer
  • Second, change directory to your FreeSurfer directory:

cd $FREESURFER_HOME
  • Next, download the runtime as follows:

In linux, for FreeSurfer 6.0 or development versions from 2017:

curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bLinux.tar.gz" -o "runtime.tar.gz"

or for development versions from January 2018 onwards:

curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2014bLinux.tar.gz" -o "runtime.tar.gz"

In MAC, for FreeSurfer 6.0 or development versions from 2017:

curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bMAC.tar.gz" -o "runtime.tar.gz"

or for development versions from January 2018 onwards:

curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2014bMAC.tar.gz" -o "runtime.tar.gz"
  • Finally, unpack it with:

tar xvf runtime.tar.gz

You are now done! The brainstem and/or hippocampal subfield modules should now work fine. If that is the case, you can delete the packed runtime file with:

rm $FREESURFER_HOME/runtime.tar.gz

Frequently asked questions (FAQ)

  • I already have Matlab 2012b/2014b installed on my system. Do I really need to download and install the runtime?

If you already have the right version of Matlab installed on your system, there is no need to dowload the runtime. Note that it has to be the specific version of Matlab, depending on your FreeSurfer version: Matlab R2012b for FreeSurfer 6.0 or dev versions from 2017, and Matlab R2014b for dev versions from 2018 on; if it is not 2012b, you need to download the runtime as described above. If it is indeed 2012b/2014b, all you need to do is to create a symbolic link named MCRv80/MCRv84 in your FreeSurfer directory that points to the main Matlab directory.

First, we will define the environment variable FREESURFER_HOME. In tcsh or csh:

setenv FREESURFER_HOME /usr/local/freesurfer 

Or, in bash:

export FREESURFER_HOME=/usr/local/freesurfer

Second, change directory to your FreeSurfer directory:

cd $FREESURFER_HOME

Finally, create the symbolic link. For FreeSurfer 6.0 and dev versions from 2017:

ln -s <MatlabRootDirectory> ./MCRv80

And, for dev versions from 2018:

ln -s <MatlabRootDirectory> ./MCRv84

The matlab root directory can be easily obtained by executing the command "matlabroot" in Matlab. It typically looks like "/Applications/MATLAB_R201Xb.app/" in MAC, and "/usr/local/matlab/8.X" in Linux.

MatlabRuntime (last edited 2021-03-06 11:56:05 by AndrewHoopes)