<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Neuro Software | Greydon Gilmore</title><link>https://www.greydongilmore.com/tag/neuro-software/</link><atom:link href="https://www.greydongilmore.com/tag/neuro-software/index.xml" rel="self" type="application/rss+xml"/><description>Neuro Software</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><copyright>© 2025 Greydon Gilmore</copyright><lastBuildDate>Mon, 28 Sep 2020 00:00:00 +0000</lastBuildDate><image><url>https://www.greydongilmore.com/media/icon_hu5403136dfb5484a5cb3dfe5767696fab_109253_512x512_fill_lanczos_center_2.png</url><title>Neuro Software</title><link>https://www.greydongilmore.com/tag/neuro-software/</link></image><item><title>ANTs (Advanced Normalization Tools) Install</title><link>https://www.greydongilmore.com/post/wsl_docs/ants/</link><pubDate>Mon, 28 Sep 2020 00:00:00 +0000</pubDate><guid>https://www.greydongilmore.com/post/wsl_docs/ants/</guid><description>&lt;h2 id="get-the-latest-ants-code">Get the latest ANTs code&lt;/h2>
&lt;p>You will need to install the ZLIB libraries:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo apt install zlib1g-dev
&lt;/code>&lt;/pre>
&lt;p>Obtain the newest version of &lt;a href="https://github.com/ANTsX/ANTs/releases/latest" target="_blank" rel="noopener">ANTs&lt;/a> by running the following:&lt;/p>
&lt;pre>&lt;code class="language-console">mkdir -p ~/Documents/code/ants_source
cd ~/Documents/code/ants_source
git clone https://github.com/ANTsX/ANTs.git .
&lt;/code>&lt;/pre>
&lt;h2 id="run-cmakemake">Run CMake/Make&lt;/h2>
&lt;p>Make the build directory.&lt;/p>
&lt;p>The default install location is &lt;code>/opt/ANTs&lt;/code>, which falls on your PATH. This is the easiest location to install. If you want to install somewhere else then specify the path in the &lt;code>CMAKE_INSTALL_PREFIX&lt;/code> variable.&lt;/p>
&lt;pre>&lt;code class="language-console">mkdir -p ~/bin/ants
cd ~/bin/ants
ccmake ~/Documents/code/ants_source
&lt;/code>&lt;/pre>
&lt;p>Hit &lt;strong>&amp;lsquo;c&amp;rsquo;&lt;/strong> to do an initial configuration. CMAKE will do some checking and then present options for review. Hit &lt;strong>&amp;lsquo;c&amp;rsquo;&lt;/strong> again to do another round of configuration. If there are no errors, you&amp;rsquo;re ready to generate the make files by pressing &lt;strong>&amp;lsquo;g&amp;rsquo;&lt;/strong>.&lt;/p>
&lt;p>Now you are back at the command line, it&amp;rsquo;s time to compile:&lt;/p>
&lt;pre>&lt;code class="language-console">make -j
&lt;/code>&lt;/pre>
&lt;pre>&lt;code class="language-console">cd ~/bin/ants/ANTS-build
sudo make install
&lt;/code>&lt;/pre>
&lt;h2 id="post-install-configuration">Post-install Configuration&lt;/h2>
&lt;p>You will need to edit your &lt;code>.bashrc&lt;/code> or &lt;code>.zshrc&lt;/code> file by adding the following lines:&lt;/p>
&lt;pre>&lt;code class="language-console">export PATH=$PATH:/opt/ANTs/bin
&lt;/code>&lt;/pre>
&lt;p>Now check this worked correctly:&lt;/p>
&lt;pre>&lt;code class="language-console">which antsRegistration
&lt;/code>&lt;/pre></description></item><item><title>NiftyReg Install</title><link>https://www.greydongilmore.com/post/wsl_docs/niftyreg/</link><pubDate>Sun, 28 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.greydongilmore.com/post/wsl_docs/niftyreg/</guid><description>&lt;h2 id="download-niftyreg">Download NiftyReg&lt;/h2>
&lt;p>Obtain the newest version of &lt;a href="https://sourceforge.net/projects/niftyreg/files/latest/download" target="_blank" rel="noopener">NiftyReg&lt;/a> or by running the following:&lt;/p>
&lt;pre>&lt;code class="language-console">mkdir -p ~/Documents/code/niftyreg_source
cd ~/Documents/code/niftyreg_source
git clone https://github.com/SuperElastix/niftyreg.git .
&lt;/code>&lt;/pre>
&lt;h2 id="run-cmakemake">Run CMake/Make&lt;/h2>
&lt;p>Make the build directory.&lt;/p>
&lt;p>The default install location is &lt;code>/usr/local&lt;/code>, which falls on your PATH. This is the easiest location to install. If you want to install somwhere else then specify the path in the &lt;code>CMAKE_INSTALL_PREFIX&lt;/code> variable.&lt;/p>
&lt;pre>&lt;code class="language-console">mkdir -p ~/bin/niftyreg
cd ~/bin/niftyreg
ccmake ~/Documents/code/niftyreg_source
&lt;/code>&lt;/pre>
&lt;p>The following options will be displayed, ensure you change &lt;code>CMAKE_INSTALL_PREFIX&lt;/code> variable to the install directory path if you don&amp;rsquo;t want to use default:&lt;/p>
&lt;p>To avoid compiling errors, turn &lt;code>USE_OPENMP&lt;/code> OFF.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:left">Parameter&lt;/th>
&lt;th style="text-align:left">Value&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:left">BUILD_ALL_DEP&lt;/td>
&lt;td style="text-align:left">Set to ON if you want to build All the dependencies&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">BUILD_SHARED_LIBS&lt;/td>
&lt;td style="text-align:left">Build the libraries as shared build the libraries as shared&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">BUILD_TESTING&lt;/td>
&lt;td style="text-align:left">Set to ON if you want to build the unit tests&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">CMAKE_BUILD_TYPE&lt;/td>
&lt;td style="text-align:left">Compiling options: Debug Release RelWithDebInfo MinSizeRel&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">CMAKE_INSTALL_PREFIX&lt;/td>
&lt;td style="text-align:left">Set the path where the final install will be copied&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">M_LIBRARY&lt;/td>
&lt;td style="text-align:left">Path to a library.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">PNG_INCLUDE_DIR&lt;/td>
&lt;td style="text-align:left">Set if you want NiftyReg to support the PNG file format for 2D images. Note that CMake will try to find the libpng on your system and will build it automatically if it does not find it.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">USE_CUDA&lt;/td>
&lt;td style="text-align:left">Set to ON if you want to build the GPU code. The CUDA toolkit must be install otherwise CMake will return an error message&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">USE_OPENCL&lt;/td>
&lt;td style="text-align:left">Set to ON to use OpenCL for multi-CPU implementation.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">USE_OPENMP&lt;/td>
&lt;td style="text-align:left">Set to ON to use OpenMP for multi-CPU implementation.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">USE_SSE&lt;/td>
&lt;td style="text-align:left">Set to ON to use SIMD based implementation, mostly for cubic B-Spline related computation. Note that SIMD implementation has only be done for single precision.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Press &lt;strong>&amp;lsquo;c&amp;rsquo;&lt;/strong> to configure the NiftyReg project, press &lt;strong>&amp;lsquo;c&amp;rsquo;&lt;/strong> to configure the project. Once the project is correctly configured, press the &lt;strong>&amp;lsquo;g&amp;rsquo;&lt;/strong> key to generate the Makefiles. You can then build and install the project:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo make -j
sudo make install
&lt;/code>&lt;/pre>
&lt;h2 id="post-install-configuration">Post-Install Configuration&lt;/h2>
&lt;p>The project should then be installed into the &lt;code>CMAKE_INSTALL_PREFIX&lt;/code> directory you previously created.&lt;/p>
&lt;p>If you changed the install prefix directory, to one not on your PATH, you will need to add NiftyReg to your PATH. In order to use NiftyReg in any terminal, you will need to edit your &lt;code>.bashrc&lt;/code> or &lt;code>.profile&lt;/code> file by adding the following lines:&lt;/p>
&lt;pre>&lt;code>NREG=&amp;lt;path_to_your_niftyreg_install&amp;gt;
export PATH=$PATH:$NREG/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NREG/lib
&lt;/code>&lt;/pre>
&lt;p>Close and re-open the linux terminal then run:&lt;/p>
&lt;pre>&lt;code class="language-console">reg_f3d
&lt;/code>&lt;/pre></description></item><item><title>FSL (FMRIB Software Library) Install</title><link>https://www.greydongilmore.com/post/wsl_docs/fsl/</link><pubDate>Mon, 28 Oct 2019 00:00:00 +0000</pubDate><guid>https://www.greydongilmore.com/post/wsl_docs/fsl/</guid><description>&lt;h2 id="installing-on-pop_os">Installing on Pop_OS!&lt;/h2>
&lt;p>You will first need to run the following steps prior to installing FSL.&lt;/p>
&lt;p>The following steps were originally written here &lt;a href='https://forums.linuxmint.com/viewtopic.php?p=1531616&amp;sid=eca87543f47ece83994a3e3b656447c3#p1531616' target="_blank"> &lt;strong>here&lt;/strong> &lt;/a>.&lt;/p>
&lt;p>Make sure you run a backup prior to performing this hack&amp;hellip; just in case.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>move your current OS information files into a temporary location:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo mv /etc/os-release /etc/os-release.pop &amp;amp;&amp;amp; sudo mv /etc/lsb-release /etc/lsb-release.pop
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>write a new &lt;code>os-release&lt;/code> file:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo gedit /etc/os-release
&lt;/code>&lt;/pre>
&lt;p>copy the following into this file:&lt;/p>
&lt;pre>&lt;code>NAME=&amp;quot;Ubuntu&amp;quot;
VERSION=&amp;quot;20.04 LTS (Focal Fossa)&amp;quot;
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=&amp;quot;Ubuntu 20.04 LTS&amp;quot;
VERSION_ID=&amp;quot;20.04&amp;quot;
HOME_URL=&amp;quot;https://www.ubuntu.com/&amp;quot;
SUPPORT_URL=&amp;quot;https://help.ubuntu.com/&amp;quot;
BUG_REPORT_URL=&amp;quot;https://bugs.launchpad.net/ubuntu/&amp;quot;
PRIVACY_POLICY_URL=&amp;quot;https://www.ubuntu.com/legal/terms-and-policies/privacy-policy&amp;quot;
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>write a new lsb-release file:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo gedit /etc/lsb-release
&lt;/code>&lt;/pre>
&lt;p>copy the following into this file:&lt;/p>
&lt;pre>&lt;code>DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION=&amp;quot;Ubuntu 20.04 LTS&amp;quot;
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>now run the fslinstaller.py script in the below section and return here to Step 5 to return your OS information.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>after running the FSL install steps, remove the files you wrote:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo rm /etc/os-release &amp;amp;&amp;amp; sudo rm /etc/lsb-release
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>move the original files back:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo mv /etc/os-release.pop /etc/os-release &amp;amp;&amp;amp; sudo mv /etc/lsb-release.pop /etc/lsb-release
&lt;/code>&lt;/pre>
&lt;/li>
&lt;/ol>
&lt;h2 id="download-fsl">Download FSL&lt;/h2>
&lt;p>The easiest method is to download this &lt;a href="https://fsl.fmrib.ox.ac.uk/fsldownloads_registration/" target="_blank" rel="noopener">python script&lt;/a>.&lt;/p>
&lt;p>You will need to register. On the subsequent page you will download the &lt;code>fslinstaller.py&lt;/code> file.&lt;/p>
&lt;p>Run the following in a linux terminal (the install will take awhile):&lt;/p>
&lt;pre>&lt;code class="language-console">python /mnt/c/Users/*[your_username]*/Downloads/fslinstaller.py
&lt;/code>&lt;/pre>
&lt;p>You will also need to install the package &lt;code>wxpython&lt;/code>:&lt;/p>
&lt;pre>&lt;code class="language-console">pip install wxpython
&lt;/code>&lt;/pre>
&lt;p>If that does not work then run:&lt;/p>
&lt;pre>&lt;code class="language-console">pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython
&lt;/code>&lt;/pre>
&lt;h2 id="libraries-you-may-need-to-install">Libraries you may need to install&lt;/h2>
&lt;h3 id="multiple-image-network-graphics-library-libmng">Multiple-image Network Graphics library (libmng)&lt;/h3>
&lt;pre>&lt;code class="language-console">sudo apt-get install libmng2
sudo apt-get install libmng-dev
&lt;/code>&lt;/pre>
&lt;h3 id="png-library---development-libpng-dev">PNG library - development (libpng-dev)&lt;/h3>
&lt;pre>&lt;code class="language-console">sudo apt-get install libpng-dev
&lt;/code>&lt;/pre>
&lt;h3 id="optimized-blas-linear-algebra-library-libopenblas-base">Optimized BLAS (linear algebra) library (libopenblas-base)&lt;/h3>
&lt;pre>&lt;code class="language-console">sudo apt-get install libopenblas-base
export LD_LIBRARY_PATH=/usr/lib/openblas-base/
&lt;/code>&lt;/pre>
&lt;h3 id="libmngso1-error">libmng.so.1 Error&lt;/h3>
&lt;p>You will need to create a symbolic link for the library dll &lt;code>libmng.so.1&lt;/code>:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo ln -s /usr/lib/x86_64-linux-gnu/libmng.so.2 /usr/lib/x86_64-linux-gnu/libmng.so.1
&lt;/code>&lt;/pre>
&lt;h3 id="independent-jpeg-groups-jpeg-runtime-library-libjpeg62">Independent JPEG Group&amp;rsquo;s JPEG runtime library (libjpeg62)&lt;/h3>
&lt;pre>&lt;code class="language-console">sudo apt-get install libjpeg62
&lt;/code>&lt;/pre>
&lt;h3 id="png-library---runtime-libpng12deb">PNG library - runtime (libpng12.deb)&lt;/h3>
&lt;pre>&lt;code class="language-console">wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \
&amp;amp;&amp;amp; sudo dpkg -i /tmp/libpng12.deb \
&amp;amp;&amp;amp; rm /tmp/libpng12.deb
&lt;/code>&lt;/pre>
&lt;h3 id="gtk-graphical-user-interface-library-gtk20">GTK+ graphical user interface library (gtk2.0)&lt;/h3>
&lt;pre>&lt;code class="language-console">sudo apt-get install gtk2.0
&lt;/code>&lt;/pre>
&lt;h2 id="pulseaudio-for-other-random-libraries">Pulseaudio for other random libraries&lt;/h2>
&lt;pre>&lt;code class="language-console">sudo apt-get install pulseaudio
&lt;/code>&lt;/pre>
&lt;h2 id="you-may-also-receive-an-error-no-d-bus-daemon-running-run-the-following">You may also receive an error &lt;code>No D-BUS daemon running&lt;/code>, run the following:&lt;/h2>
&lt;pre>&lt;code class="language-console">sudo chown -R *[your username]*:admin ~/.dbus
&lt;/code>&lt;/pre></description></item><item><title>ART (Automatic Registration Toolbox) Install</title><link>https://www.greydongilmore.com/post/wsl_docs/art/</link><pubDate>Thu, 28 Jun 2018 00:00:00 +0000</pubDate><guid>https://www.greydongilmore.com/post/wsl_docs/art/</guid><description>&lt;h2 id="download-art">Download ART&lt;/h2>
&lt;p>Download the newest version of &lt;a href="https://www.nitrc.org/projects/art/" target="_blank" rel="noopener">ART&lt;/a>&lt;/p>
&lt;p>Make a new directory for the install and extract the tar package into it:&lt;/p>
&lt;pre>&lt;code class="language-console">mkdir ~/Applications/ART
cd ~/Applications/ART
tar -xvzf /mnt/c/Users/*[your_username]*/Downloads/acpcdetect2.0*.tar.gz
&lt;/code>&lt;/pre>
&lt;h2 id="post-configuration">Post Configuration&lt;/h2>
&lt;p>Set the &lt;code>ARTHOME&lt;/code> environment variable and add the binary directory to your PATH by editing your &lt;code>~/.bashrc&lt;/code> file:&lt;/p>
&lt;pre>&lt;code class="language-console">vim ~/.basrc
&lt;/code>&lt;/pre>
&lt;p>Add these lines to the end:&lt;/p>
&lt;pre>&lt;code>export ARTHOME=/path/to/ART
export PATH=$ARTHOME/bin:$PATH
&lt;/code>&lt;/pre>
&lt;h2 id="confirm-installation">Confirm Installation&lt;/h2>
&lt;p>Execute &lt;code>acpcdetect&lt;/code> by running command in terminal&lt;/p>
&lt;p>You may get an error when executing &lt;code>acpcdetect&lt;/code>:&lt;/p>
&lt;pre>&lt;code class="language-console">acpcdetect: error while loading shared libraries: liblapack.so.3: cannot open shared object file: No such file or directory
&lt;/code>&lt;/pre>
&lt;p>If you get this error, run the following:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo apt-get install libatlas-base-dev
&lt;/code>&lt;/pre>
&lt;p>You will also need to install &lt;code>pnmtopng&lt;/code>&lt;/p>
&lt;pre>&lt;code class="language-console">sudo apt-get install -y pnmtopng
&lt;/code>&lt;/pre></description></item><item><title>Make and CMake Install</title><link>https://www.greydongilmore.com/post/wsl_docs/cmake/</link><pubDate>Thu, 28 Jun 2018 00:00:00 +0000</pubDate><guid>https://www.greydongilmore.com/post/wsl_docs/cmake/</guid><description>&lt;h2 id="install-make">Install Make&lt;/h2>
&lt;p>Install build essentials and Make first:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo apt-get install make
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install build-essential
&lt;/code>&lt;/pre>
&lt;h2 id="install-cmake">Install CMake&lt;/h2>
&lt;p>Download the latest version of the &lt;a href="https://cmake.org/download/#latest" target="_blank" rel="noopener">CMake executable&lt;/a>.&lt;/p>
&lt;p>In your linux shell run (replacing VERSION with the version you downloaded):&lt;/p>
&lt;pre>&lt;code class="language-console">VERSION=4.1.1
cd ~/Downloads
chmod +x cmake-$VERSION-linux-x86_64.sh
sudo ./cmake-$VERSION-linux-x86_64.sh
sudo mv cmake-$VERSION-linux-x86_64 ~/bin/cmake
&lt;/code>&lt;/pre>
&lt;p>Then add the following line to your &lt;code>.basrc&lt;/code> or &lt;code>.zshrc&lt;/code>, replacing the path with the path to cmake install on your system:&lt;/p>
&lt;pre>&lt;code>export PATH=$PATH:$HOME/bin/cmake/bin
&lt;/code>&lt;/pre></description></item><item><title>Dcm2niix Install</title><link>https://www.greydongilmore.com/post/wsl_docs/dcm2niix/</link><pubDate>Sun, 28 May 2017 00:00:00 +0000</pubDate><guid>https://www.greydongilmore.com/post/wsl_docs/dcm2niix/</guid><description>&lt;h2 id="run-install">Run Install&lt;/h2>
&lt;p>Run the following code in a linux terminal:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo apt-get install dcm2niix
&lt;/code>&lt;/pre>
&lt;h2 id="install-dependencies">Install Dependencies&lt;/h2>
&lt;p>There are a few packages that allow dcm2niix to run faster:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo apt-get install python-gdcm
sudo apt-get install pigz
&lt;/code>&lt;/pre></description></item><item><title>Freesurfer Installation</title><link>https://www.greydongilmore.com/post/wsl_docs/freesurfer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.greydongilmore.com/post/wsl_docs/freesurfer/</guid><description>&lt;h2 id="download-software">Download software&lt;/h2>
&lt;p>Download the &lt;code>.deb&lt;/code> file for &lt;a href="https://surfer.nmr.mgh.harvard.edu/fswiki/rel7downloads" target="_blank" rel="noopener">Freesurfer&lt;/a>.&lt;/p>
&lt;p>Run the following command (replacing the filename with the one you downloaded):&lt;/p>
&lt;pre>&lt;code class="language-console">cd ~/Downloads
sudo dpkg -i freesurfer_ubuntu22-8.1.0_amd64.deb
&lt;/code>&lt;/pre>
&lt;p>You will also need to install some dependancies:&lt;/p>
&lt;pre>&lt;code class="language-console">sudo apt-get install tcsh
sudo apt-get install libglu1
sudo apt-get install libxss1
&lt;/code>&lt;/pre>
&lt;h2 id="post-install-configurations">Post-Install Configurations&lt;/h2>
&lt;p>Add Freesurfer to your path:&lt;/p>
&lt;pre>&lt;code class="language-console">echo &amp;quot;FREESURFER_HOME=/usr/local/freesurfer&amp;quot; &amp;gt;&amp;gt; ~/.bashrc
echo 'source $FREESURFER_HOME/SetUpFreeSurfer.sh' &amp;gt;&amp;gt; ~/.bashrc
&lt;/code>&lt;/pre>
&lt;p>If you have run the install correctly you will see this output when you close and open a new terminal window:&lt;/p>
&lt;pre>&lt;code class="language-console">Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME /usr/local/freesurfer
FSFAST_HOME /usr/local/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii
SUBJECTS_DIR /usr/local/freesurfer/subjects
MNI_DIR /usr/local/freesurfer/mni
&lt;/code>&lt;/pre>
&lt;h2 id="define-subjects_dir">Define subjects_dir&lt;/h2>
&lt;p>FreeSurfer requires an environment variable called &lt;code>SUBJECTS_DIR&lt;/code>. This is the directory where subject data is stored, put this in your &lt;code>~/.bashrc&lt;/code> or &lt;code>~/.zshrc&lt;/code>:&lt;/p>
&lt;pre>&lt;code class="language-console">export SUBJECTS_DIR=&amp;lt;path to subject data&amp;gt;
&lt;/code>&lt;/pre>
&lt;h2 id="obtain-license">Obtain license&lt;/h2>
&lt;p>You will need to obtain a &lt;a href="https://surfer.nmr.mgh.harvard.edu/registration.html" target="_blank" rel="noopener">license key&lt;/a>.&lt;/p>
&lt;p>Once you obtain the &lt;code>license.txt&lt;/code> key file, copy it to your FreeSurfer installation directory. This is also the location defined by the &lt;code>FREESURFER_HOME&lt;/code> environment variable.&lt;/p>
&lt;pre>&lt;code class="language-console">sudo mv ~/Downloads/license.txt $FREESURFER_HOME
&lt;/code>&lt;/pre></description></item></channel></rss>