Skip to content

install

Marc Modat edited this page May 11, 2017 · 12 revisions

Requirements


  • 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

Install from source

Download the source

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.

Compile and install the source on Windows

  • Create a folder to build the code and another one to install the code, e.g. niftyreg_build and niftyreg_install respectively.

  • Launch CMake-Gui. Set the source path to niftyreg (where you copied/cloned the source files) and the build path to niftyreg-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:

CMake-gui

  • Go to the niftyreg_build folder. You can see below the files that are generated by CMake-gui in the niftyreg_build folder:

niftyreg_build

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.
Clone this wiki locally