-
Notifications
You must be signed in to change notification settings - Fork 40
install
- CMake is an open-source cross-platform build system. You can download it from here.
- Compiler.
- Using MacOS, you can install XCode, downloadable from this page. Note that in order to take advantage of OpenMP, gcc will also have to be installed. One popular way to install it is to use homebrew.
- For windows, Visual Studio 2008, 2010 or 2013 has to be installed. OpenMP here requires the professional version.
- NiftyReg can use GPU accelerated computing through CUDA or OpenCL from NVIDIA, which can be downloaded from here
The source files can be downloaded from the SourceForge project page.
Alternatively the source files can be downloaded using git from this repository using:
git clone git://git.code.sf.net/p/niftyreg/git niftyreg
or that one with the following command:
git clone [email protected]:mmodat/niftyreg.git niftyreg
Note that the cmiclab repository is the main repository while the sourceforge only contains the master branch.
-
Create a folder to build the code and another one to install the code, e.g.
niftyreg_build
andniftyreg_install
respectively. -
Launch CMake-Gui. Set the source path to
niftyreg
(where you copied/cloned the source files) and the build path toniftyreg-build
then hit configure. CMake-Gui will prompt you to select the generator, which means you'll need to select a version of Visual Studio that have been installed on your computer. CMake-Gui will present you with some configuration options. Once you have selected your desired options and set the CMAKE_INSTALL_PREFIX option to the folder where you want to install NiftyReg (e.g.niftyreg_install
), press configure and then generate. CMake-gui will generate the Visual Studio project files. Below is an example of selected options:
- Go to the
niftyreg_build
folder. You can see below the files that are generated by CMake-gui in theniftyreg_build
folder:
Double click on the file NiftyReg.sln
and Visual Studio will start up. In Visual Studio select build type, for generic use select Release and build the project (hit F7). Once the build is finished select and run the install task (Right Click on Install > Project Only > Build only Install). This will install NiftyReg to the folder you selected earlier.
- You could then install the
niftyreg_install
folder to your system path.