|
Size: 5628
Comment:
|
← Revision 78 as of 2020-03-04 14:59:29 ⇥
Size: 6456
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| = FreeSurfer Mac OS X Installation and Setup = This page details how to install !FreeSurfer on a Mac OS X machine, from download to set up. The full installation package provided by MGH includes support libraries and a sample data set. |
'''Index''' <<TableOfContents>> |
| Line 6: | Line 5: |
| '''Prerequisite:''' The Max OS X machine must have [[http://xquartz.macosforge.org/landing|XQuartz]] installed before you can run !FreeSurfer. To check if you already have [[http://xquartz.macosforge.org/landing|XQuartz]], open a Finder window and it would appear in the Finder under '''Applications -> Utilities -> XQuartz'''. If it does not show up, please download and install [[http://xquartz.macosforge.org/landing|XQuartz]] first. *NOTE:* Major upgrades to you Mac system (e.g. Mountain Lion -> Mavericks) will require a reinstallation of [[http://xquartz.macosforge.org/landing|XQuartz]]. | = Installation = '''''Important Note for macOS users:''' macOS machines require the installation of [[http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.6.dmg|XQuartz 2.7.6]].'' ---- |
| Line 8: | Line 9: |
| {{attachment:XQuartz_screencapture.png}} | === Installing XQuartz === |
| Line 10: | Line 11: |
| The !FreeSurfer software is distributed through the [[Download|NMR download site]]. It contains the !FreeSurfer binaries, support software, and a sample data set, and may take a few minutes to download even on a fast connection. | |
| Line 12: | Line 12: |
| Once the '''dmg''' has been downloaded, double click on it in the Finder to expand the package, which will result in the following: | To see what version of macOS you have, click '''Apple -> About This Mac'''. You should see something similar to the image below: |
| Line 14: | Line 14: |
| {{attachment:install-4mpkg.jpg}} | {{attachment:macversion.png}} |
| Line 16: | Line 16: |
| Double click on the '''mpkg''' and the installation wizard will launch as a guide through the set up. If you get an error with the following window popup: | To see what version of XQuartz you have, click '''Applications -> Utilities -> XQuartz'''. Then '''X11 -> About X11''' {{attachment:xqfinder.png}} {{attachment:xqversion.png}} If necessary, download the XQuartz installation package and double click it to install. * [[http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.5.dmg|XQuartz 2.7.5]] (macOS versions 10.6 - 10.9) * [[http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.6.dmg|XQuartz 2.7.6]] (macOS versions 10.10 and higher) ---- === Installing FreeSurfer === Download the !FreeSurfer installation package from [[DownloadAndInstall|this page]]. Double click the dmg then double click the '''freesurfer-Darwin-full.pkg''' to launch the installation wizard: {{attachment:install-5mpkg.png}} If you get this error: |
| Line 20: | Line 40: |
| Then you need to adjust your security settings to allow applications from 3rd party developers to be installed. To do this go to '''System Preferences -> Security & Privacy -> General'''. Click the lock on the bottom left to make changes and under '''Allow applications downloaded from:''' select '''Anywhere'''. | Then you need to adjust your security settings to allow applications from 3rd party developers to be installed. To do this go to '''Apple -> System Preferences -> Security & Privacy -> General'''. Click the lock on the bottom left to make changes and under '''Allow applications downloaded from:''' select '''Anywhere'''. |
| Line 25: | Line 45: |
| Line 28: | Line 47: |
| After the package integrity has been verified, the introductory screen will appear. | After the package integrity has been verified, the introductory screen will appear. Click on '''Continue''': |
| Line 32: | Line 51: |
| Click on '''Continue''', and read the explanatory text on the '''Read Me''' screen, as it contains information useful during the next stage of the installation: | Next is the Read Me window. Click on '''Continue''': |
| Line 34: | Line 53: |
| {{attachment:install-6readme.jpg}} | {{attachment:readme1.png}} |
| Line 36: | Line 55: |
| Regardless of what the instructions in the '''Read Me''' screen say, the best way so automatically load !FreeSurfer whenever a terminal window is opened is to add the following lines to the '''.profile''' file in your home directory (If you don't already have a '''.profile''' file in your home directory, you can go ahead and create one using pico or a text editor): | Next is the Software License Agreement window. Click on '''Continue''': {{attachment:SLA.png}} Next is the Destination Select window. Click '''Change Install Location...''' to change the default installation disk and folder (/Applications/freesurfer). Or click '''Install''' to go with default: {{attachment:install_location.png}} You may need to enter you password. The installation process will begin to write files and will take a few minutes to complete. {{attachment:successful.png}} ----- = Setup and Configuration = To begin using freesurfer, open a terminal window. The Terminal application is found under '''Applications -> Utilities -> Terminal''': {{attachment:terminal.png}} Type the following lines in the terminal window to source the freesurfer environment: |
| Line 41: | Line 80: |
| }}} | }}} |
| Line 43: | Line 82: |
| Click on '''Continue''', and read the end user license agreement, scrolling down using the bar along the right side of the window. | After you source freesurfer you should see some output similar to the window below: |
| Line 45: | Line 84: |
| ## attachment:install-7license.jpg | {{attachment:source_freesurfer.png}} |
| Line 47: | Line 86: |
| Click on '''Continue''' and a window will appear with the option to agree or disagree to the license. | If you use freesurfer frequently and want to avoid typing the above lines of code every time you open a terminal window, you can create a file called '''.profile''' in your home directory which contains those two line. This will cause the terminal window to automatically source freesurfer every time it is opened. |
| Line 49: | Line 88: |
| ## attachment:install-8licenseclick.jpg | At this point you are ready to begin using the freesurfer software. If you haven't done so already, [[https://surfer.nmr.mgh.harvard.edu/registration.html|obtain a license]], and copy the license.txt file into your $FREESURFER_HOME (Applications/freesurfer) directory. |
| Line 51: | Line 90: |
| Click on '''Agree''', and the next screen will appear. Select where to install the software. The directory /Applications on the selected disk will be used. If you wish to install to a different directory, click on '''Choose''' and select an alternate installation location. | ----- |
| Line 53: | Line 92: |
| {{attachment:install-9selectdestination.jpg}} | = Testing Freesurfer = |
| Line 55: | Line 94: |
| If it is not already highlighted, click on the hard drive on which to install the software. | See the [[DownloadAndInstall#TestyourFreeSurferInstallation|this page]] for some example commands to test that !FreeSurfer is installed and running properly. |
| Line 57: | Line 96: |
| ## attachment:install-10destinationselected.jpg | = For Mac OS systems running freesurfer 6.0.0 = |
| Line 59: | Line 98: |
| Click on '''Continue''' to confirm the disk selection. | If you receive the following error when running the test_commands.sh.15 script: |
| Line 61: | Line 100: |
| {{attachment:install-11easyinstall.jpg}} | {{{ + cd /users/hippo/lcn/tutorial_data/tutorial_data_20190918_1558/buckner_data/tutorial_subjs/group_analysis_tutorial + mris_anatomical_stats -l lh.supramarg.label -t lh.thickness -b -f 004/stats/lh.supramarg.stats 004 lh dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib |
| Line 63: | Line 107: |
| ## To customize the installation, click on '''Customize''' and this screen will appear, allowing selection of packages to install: | dyld: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib |
| Line 65: | Line 111: |
| ## attachment:install-12custominstall.jpg | ./test_commands.sh.15: line 368: 87124 Abort trap: 6 mris_anatomical_stats -l lh.supramarg.label -t lh.thickness -b -f 004/stats/lh.supramarg.stats 004 lh }}} |
| Line 67: | Line 114: |
| ## If not all of the packages are selectable, check in the directory /Library/Receipts for directories matching the package names. The operating system will compare the ## new installation against any old installations, and will prevent upgrades if the version of the package being installed is older than the one currently installed. Remove ## the receipt directory to reinstall a new version of the desired software packages and restart the installer by double clicking on the mpkg. | Then, you need to install a Freeview patch to have this work with your Mac OS version. Download the patch (~33 MB) from /autofs/cluster/pubftp/dist/freesurfer/6.0.0-patch/Freeview_6_0_0_MacOS_patch.zip follow the following instructions: |
| Line 69: | Line 116: |
| Click on '''Install''' and the package will begin to be installed on the designated hard drive. | 1)To download the patch, follow instructions on using the ftp file exchange from [[https://surfer.nmr.mgh.harvard.edu/fswiki/FtpFileExchange|this]] wiki page. |
| Line 71: | Line 118: |
| ## attachment:install-13procfsbins.jpg ## attachment:install-14procfssupport.jpg ## attachment:install-15procdata.jpg ## attachment:install-16procminc.jpg ## attachment:install-17procfullinst.jpg |
2) Remove your existing Freeview.app application bundle by sending it to the trash (and then emptying the trash).You can also do this from the terminal by cd'ing to the top-level ./freesurfer subdirectory and then doing {{{ rm -rf Freeview.app }}} |
| Line 77: | Line 123: |
| The installer may then optimize the hard drive for performance. | 3) Copy the new Freeview.app.zip to where your old Freeview.app was located and uncompress it (so it becomes the replacement Freeview.app in your current FreeSurfer installation). |
| Line 79: | Line 125: |
| ## attachment:install-18optimisinghd.jpg | 4) Remove ./freesurfer/lib/gcc/lib/libgomp.1.dylib from your existing freesurfer installation. |
| Line 81: | Line 127: |
| Once the optimization is finished, the installation process is successfully concluded: | 5) Copy the ./freesurfer/lib/gcc/lib/libgomp.1.dylib from the patch archive to /freesurfer/lib/gcc/lib in your current freesurfer installtion. |
| Line 83: | Line 129: |
| {{attachment:install-19success.jpg}} | 6) Try running the Freeview.app and loading a volume with it. |
| Line 85: | Line 131: |
| If you encounter errors during the installation, while still in the Installer, and Installer is still the primary application, click the '''Window -> Installer Log''' menu item to show the error log to see why installation failed. | |
| Line 87: | Line 132: |
| Otherwise, click on '''Close''' to exit the installer. | |
| Line 89: | Line 133: |
| Lastly, if you intend to run recon-all (the processing script which can run for 24 hours) on your mac, we recommend setting your Power Adapter Energy Settings to 'Never' sleep, otherwise recon-all will only run when you are logged-in. This is done under '''System Preferences -> Energy Saver'''. | |
| Line 91: | Line 134: |
| {{attachment:no_sleep.png}} | |
| Line 93: | Line 135: |
| [[SetupConfiguration_Mac|Setup and configuration of the environment is described next.]] | ## Lastly, if you intend to run recon-all (the processing script which can run for 24 hours) on your mac, we recommend setting your Power Adapter Energy Settings to 'Never' sleep, otherwise recon-all will only run when you are logged-in. This is done under '''System Preferences -> Energy Saver'''. ## {{attachment:no_sleep.png}} ## If you came from the Quick Install page, return to that [[QuickInstall|here]].<<BR>> ## Otherwise, setup and configuration of the environment is described [[SetupConfiguration_Mac|next.]] |
Index
Contents
Installation
Important Note for macOS users: macOS machines require the installation of XQuartz 2.7.6.
Installing XQuartz
To see what version of macOS you have, click Apple -> About This Mac. You should see something similar to the image below:
To see what version of XQuartz you have, click Applications -> Utilities -> XQuartz. Then X11 -> About X11
If necessary, download the XQuartz installation package and double click it to install.
XQuartz 2.7.5 (macOS versions 10.6 - 10.9)
XQuartz 2.7.6 (macOS versions 10.10 and higher)
Installing FreeSurfer
Download the FreeSurfer installation package from this page. Double click the dmg then double click the freesurfer-Darwin-full.pkg to launch the installation wizard:
If you get this error:
Then you need to adjust your security settings to allow applications from 3rd party developers to be installed. To do this go to Apple -> System Preferences -> Security & Privacy -> General. Click the lock on the bottom left to make changes and under Allow applications downloaded from: select Anywhere.
After the package integrity has been verified, the introductory screen will appear. Click on Continue:
Next is the Read Me window. Click on Continue:
Next is the Software License Agreement window. Click on Continue:
Next is the Destination Select window. Click Change Install Location... to change the default installation disk and folder (/Applications/freesurfer). Or click Install to go with default:
You may need to enter you password. The installation process will begin to write files and will take a few minutes to complete.
Setup and Configuration
To begin using freesurfer, open a terminal window. The Terminal application is found under Applications -> Utilities -> Terminal:
Type the following lines in the terminal window to source the freesurfer environment:
export FREESURFER_HOME=/Applications/freesurfer source $FREESURFER_HOME/SetUpFreeSurfer.sh
After you source freesurfer you should see some output similar to the window below:
If you use freesurfer frequently and want to avoid typing the above lines of code every time you open a terminal window, you can create a file called .profile in your home directory which contains those two line. This will cause the terminal window to automatically source freesurfer every time it is opened.
At this point you are ready to begin using the freesurfer software. If you haven't done so already, obtain a license, and copy the license.txt file into your $FREESURFER_HOME (Applications/freesurfer) directory.
Testing Freesurfer
See the this page for some example commands to test that FreeSurfer is installed and running properly.
For Mac OS systems running freesurfer 6.0.0
If you receive the following error when running the test_commands.sh.15 script:
+ cd /users/hippo/lcn/tutorial_data/tutorial_data_20190918_1558/buckner_data/tutorial_subjs/group_analysis_tutorial + mris_anatomical_stats -l lh.supramarg.label -t lh.thickness -b -f 004/stats/lh.supramarg.stats 004 lh dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib ./test_commands.sh.15: line 368: 87124 Abort trap: 6 mris_anatomical_stats -l lh.supramarg.label -t lh.thickness -b -f 004/stats/lh.supramarg.stats 004 lh
Then, you need to install a Freeview patch to have this work with your Mac OS version. Download the patch (~33 MB) from /autofs/cluster/pubftp/dist/freesurfer/6.0.0-patch/Freeview_6_0_0_MacOS_patch.zip follow the following instructions:
1)To download the patch, follow instructions on using the ftp file exchange from this wiki page.
2) Remove your existing Freeview.app application bundle by sending it to the trash (and then emptying the trash).You can also do this from the terminal by cd'ing to the top-level ./freesurfer subdirectory and then doing
rm -rf Freeview.app
3) Copy the new Freeview.app.zip to where your old Freeview.app was located and uncompress it (so it becomes the replacement Freeview.app in your current FreeSurfer installation).
4) Remove ./freesurfer/lib/gcc/lib/libgomp.1.dylib from your existing freesurfer installation.
5) Copy the ./freesurfer/lib/gcc/lib/libgomp.1.dylib from the patch archive to /freesurfer/lib/gcc/lib in your current freesurfer installtion.
6) Try running the Freeview.app and loading a volume with it.
