Difference between revisions of "NiftyReg install"

From CMIC
Jump to: navigation, search
(Linux / MacOs)
Line 25: Line 25:
 
::Probably you'll want to add the install folder to your system path.
 
::Probably you'll want to add the install folder to your system path.
  
==Linux / MacOs==
+
==Linux==
 +
 
 +
 
 +
==MacOs==
  
 
TEMP
 
TEMP
 
::<code>ccmake -D CMAKE_C_COMPILER=/opt/local/bin/gcc-mp-4.4 -D CMAKE_CXX_COMPILER=/opt/local/bin/g++-mp-4.4 -D BUILD_ALL_DEP=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/Users/mmodat/Code/Install/niftyreg_install -D USE_CUDA=ON -D CUDA_HOST_COMPILER=/usr/bin/clang  -D CMAKE_CXX_FLAGS="-lcudart -lcuda -L/usr/local/cuda/lib -stdlib=libstdc++ -m64 -arch x86_64" -D CMAKE_C_FLAGS="-lcudart -lcuda -L/usr/local/cuda/lib -stdlib=libstdc++ -m64 -arch x86_64" ~/Dropbox/niftyreg</code>
 
::<code>ccmake -D CMAKE_C_COMPILER=/opt/local/bin/gcc-mp-4.4 -D CMAKE_CXX_COMPILER=/opt/local/bin/g++-mp-4.4 -D BUILD_ALL_DEP=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/Users/mmodat/Code/Install/niftyreg_install -D USE_CUDA=ON -D CUDA_HOST_COMPILER=/usr/bin/clang  -D CMAKE_CXX_FLAGS="-lcudart -lcuda -L/usr/local/cuda/lib -stdlib=libstdc++ -m64 -arch x86_64" -D CMAKE_C_FLAGS="-lcudart -lcuda -L/usr/local/cuda/lib -stdlib=libstdc++ -m64 -arch x86_64" ~/Dropbox/niftyreg</code>

Revision as of 17:00, 30 October 2014

Requirements

  • CMake is a open-source cross-platform build system. You can download it from here.
  • A Compiler. Using MacOS, you can install XCode, downloadable from here. For windows, Visual Studio 2008 or 2010 Professional Edition (if you want to enable OpenMP on Windows then you must have VS-PRO installed)
  • Currently NiftyReg can use GPU accelerated computing through CUDA from NVIDIA which can be downloaded from here

Source

  • You can download the latest release from the project SourceForge page here.
  • Alternatively, you can download the latest version from the git repository on SourceForge, using:
git clone git://git.code.sf.net/p/niftyreg/git niftyreg-git

Windows

The building process is the following:

  1. Get the source
  2. You'll then need to create a new directory for the build: "niftyreg-build"
  3. You launch CMake-Gui, you set the source path to "niftyreg" and the build path to "niftyreg-build" then hit configure
  4. Cmake will prompt you to select the generator, which means you'll need to select the Visual Studio version you have installed earlier
  5. CMake will run for about a minute, then it will present you with some configuration options. Make sure the following ones are enabled:
Use OpenMP
Use SSE
Set the CMAKE_INSTALL_PREFIX to the folder where you want to install NiftyReg.
Note, that if you want to install NiftyReg under Program Files, you'll need to create the folder yourself and explicitly apply full permissions to write for your user. Once the flags are set then hit configure and generate. Cmake will generate you the Visual Studio project files.
Go to "niftyreg-build", and launch NiftyReg.sln. Consequently Visual Studio will start up.
In Visual Studio select build type, for generic use select Release and build the project (hit F7). VS will run for a couple minutes.
Once the build 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.
Probably you'll want to add the install folder to your system path.

Linux

MacOs

TEMP

ccmake -D CMAKE_C_COMPILER=/opt/local/bin/gcc-mp-4.4 -D CMAKE_CXX_COMPILER=/opt/local/bin/g++-mp-4.4 -D BUILD_ALL_DEP=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/Users/mmodat/Code/Install/niftyreg_install -D USE_CUDA=ON -D CUDA_HOST_COMPILER=/usr/bin/clang -D CMAKE_CXX_FLAGS="-lcudart -lcuda -L/usr/local/cuda/lib -stdlib=libstdc++ -m64 -arch x86_64" -D CMAKE_C_FLAGS="-lcudart -lcuda -L/usr/local/cuda/lib -stdlib=libstdc++ -m64 -arch x86_64" ~/Dropbox/niftyreg