Install NiftyRec

From NiftyRec
Jump to: navigation, search

Contents

Download

There are two ways to install NiftyRec:

  • Install binary package: Installing from the binary package is as easy ad double clicking on the installer, however it is only supported on MAC OSx, Windows and Linux Debian (including Ubuntu).
  • Build from source: If the binary installer for your platform is not available on the NiftyRec website, then you need to build NiftyRec from source. Building and installing from source is simple thanks to the cross platform build system CMake.

Download the latest stable release binary or source from the Download section of the NiftyRec website and follow the instructions below.


Install Binary Package

Linux

The binary installer can be used in all Linux distributions that support .deb packages (Debian, Ubuntu, KNOPPIX, ..). Download the .deb package, double click to install.

To install the Matlab Toolbox, open Matlab add the path to the NiftyRec Matlab Toolbox, e.g.

>> addpath('/usr/local/niftyrec/matlab/');

The default path is '/usr/local/niftyrec/matlab/', however the path may differ in your installation depending on the CMake configuration. The parameter CMAKE_INSTALL_PREFIX sets the location of the NiftyRec installation folder, the Matlab toolbox is located in the subfolder 'matlab'.

To install the Python Module, launch the Terminal (type 'Terminal' in Spotlight), change the current directory to the directory where NiftyRec is installed (e.g. '/usr/local/niftyrec/'), then change directory to the subdirectory 'python/' and build and install the Python module with setup.py:

cd /usr/local/niftyrec/
cd python
python setup.py build 
sudo python setup.py install


MAC OSx

Download the dmg installer, double click to install.

To install the Matlab Toolbox, open Matlab add the path to the NiftyRec Matlab Toolbox, e.g.

>> addpath('/usr/local/niftyrec/matlab/');

The default path is '/usr/local/niftyrec/matlab/', however the path may differ in your installation depending on the CMake configuration. The parameter CMAKE_INSTALL_PREFIX sets the location of the NiftyRec installation folder, the Matlab toolbox is located in the subfolder 'matlab'.

To install the Python Module, launch the Terminal (type 'Terminal' in Spotlight), change the current directory to the directory where NiftyRec is installed (e.g. '/usr/local/niftyrec/'), then change directory to the subdirectory 'python/' and build and install the Python module with setup.py:

cd /usr/local/niftyrec/
cd python
python setup.py build 
sudo python setup.py install


Windows

Download the self-extracting binary installer, double click to install.

To install the Matlab Toolbox, open Matlab add the path to the NiftyRec Matlab Toolbox, e.g.

>> addpath('/usr/local/niftyrec/matlab/');

The default path is 'C:/Program Files/NiftyRec/matlab/', however a different install path may be optionally specified when installing NiftyRec with the self-extracting binary package.

Build from source

NiftyRec makes use of the CMake cross platform build system. In order to build NiftyRec, start by downloading and installing CMake for your platform.

Linux

Configure with CMake

Download NiftyRec, uncompress and cd to the uncompressed folder. Here create a new folder 'build', cd into it and run cmake. There are three versions of CMake: cmake, ccmake and cmake-gui. Possibly use cmake-gui or ccmake as they are slightly easier to use than cmake:

tar xvzf nifty_rec-x.x.tar.gz
cd nifty_rec-x.x
mkdir build
cd build
cmake-gui ..

This brings up the CMake GUI. Click on the 'Configure' button and on 'Finish'. Now CMake might display error messages if it did not find some of the libraries necessary to build NiftyRec (typically the Matlab libraries and the CUDA SDK). Compiler related error messages are displayed if g++ is not installed, in which case install it from the software repository for your Linux distribution or from source. Now configure NiftyRec:

Error creating thumbnail: File seems to be missing: /srv/disk9/1048969/www/niftyrec.scienceontheweb.net/wiki/images/a/aa/Nifty_rec_build.jpg
  1. Set CMAKE_BUILD_TYPE to Release
  2. Set CMAKE_INSTALL_PREFIX to the path where you want to install NiftyRec. E.g. /usr/local/ or /home/yourhome/
  3. Set MATLAB_INCLUDE to the Matlab include path, typically /usr/local/matlab/extern/include/
  4. Set MATLAB_LIBS_DIR to the MAtlab libraries path, typically /usr/local/matlab/bin/glnx86/
  5. Enable other options, typically NiftyRec_USE_CUDA (GPU acceleration) and NiftyRec_INCLUDE_DATA
    • If you enabled NiftyRec_USE_CUDA, then CMake might ask for the location of the CUDA SDK: this is typically /home/yourhome/NVIDIA_GPU_Computing_SDK/C/

Now click on 'Configure' and then 'Generate'. If there are no error messages, NiftyRec is ready to be built. Close CMake.

Build

Build NiftyRec by typing 'make' in the command line while in the 'build' path

make

Install

You can now install NiftyRec in the system

make install

This installs NiftyRec to the path that you specified in the CMake configuration (CMAKE_INSTALL_PREFIX). Use 'sudo make install' if you need superuser privileges for the install path.

Generate .deb Package

Optionally you can create a binary .deb package. (Email it to us if it is not yet available on the NiftyRec website!)

make package


Install Matlab Toolbox

To install the Matlab Toolbox, open Matlab and add the path to the NiftyRec Matlab Toolbox, e.g.

>> addpath('/usr/local/niftyrec/matlab/');

The default path is '/usr/local/niftyrec/matlab/', however the path may differ in your installation depending on the CMake configuration. The parameter CMAKE_INSTALL_PREFIX sets the location of the NiftyRec installation folder, the Matlab toolbox is located in the subfolder 'matlab'.

To add the path permanently, click on File->Set Path->Add Folder.

Install Python Module

To install the Python Module, launch the Terminal, change the current directory to the directory where NiftyRec is installed (e.g. '/usr/local/niftyrec/'), then change directory to the subdirectory 'python/' and build and install the Python module with setup.py:

cd /usr/local/niftyrec/
cd python
python setup.py build 
sudo python setup.py install

MAC OSx

Instructions to build and install from source under MAC OSx are identical to Linux. The only difference is the location of the paths of the Matlab and CUDA libraries and includes. The actual locations depend on your installation of Matlab and CUDA; typical locations are:

  • MATLAB_INCLUDE: /Applications/MATLAB_R20xxx.app/extern/include/
  • MATLAB_LIBS_DIR: /Applications/MATLAB_R20xxx.app/bin/maci64 (or maci32 depending on the architecture)
  • CUDA_SDK_ROOT_DIR: /Developer/GPU_Computing/C
  • CUDA_TOOLKIT_ROOT_DIR: /usr/local/cuda/

'make package' generates a self installing .rpm package for MAC.


Windows - Microsoft Visual Studio

Configure with CMake

Install cmake. Download and uncompress source. Open the source directory with the files browser and create here a new folder 'build'. Launch CMake (Programs->CMake) and open CMakeLists.txt from the main directory of NiftyRec. Select the version of Visual Studio that you intend to use and click on 'Configure'.

Select options, set the BUILD_TYPE to Release or to Debug and set all the required paths for additional dependencies if you selected any of the options. Configure and Generate. Browse the 'build' directory and double click on the Visual Studio project file. Click Compile button in Visual Studio. Create self-extracting installer by compiling the corresponding target in Visual Studio. Now CMake might display error messages if it did not find some of the libraries necessary to build NiftyRec (typically the Matlab libraries and the CUDA SDK). Now configure NiftyRec:

File:Nifty rec build win.jpg

  1. Set CMAKE_BUILD_TYPE to Release
  2. Set CMAKE_INSTALL_PREFIX to the path where you want to install NiftyRec. E.g. /usr/local/ or /home/yourhome/
  3. Set MATLAB_INCLUDE to the Matlab include path, typically /usr/local/matlab/extern/include/
  4. Set MATLAB_LIBS_DIR to the MAtlab libraries path, typically /usr/local/matlab/bin/glnx86/
  5. Enable other options, typically NiftyRec_USE_CUDA (GPU acceleration) and NiftyRec_INCLUDE_DATA
    • If you enabled NiftyRec_USE_CUDA, then CMake might ask for the location of the CUDA SDK: this is typically /home/yourhome/NVIDIA_GPU_Computing_SDK/C/

Now click on 'Configure' and then 'Generate'. If there are no error messages, NiftyRec is ready to be built. The Visual Studio project has been generated in the 'build' folder.

Build

Launch Visual Studio and open the project generated by CMake in the 'build' directory. Select the build type (typically Release) and click on Build.

Install

In Visual Studio, select the 'Install' target and click on Build. Otherwise generate a self extracting binary package and install it by double clicking on it.

Generate Self Extracting Binary Installer

Optionally you can create a self extracting package. NSIS needs to be installed before proceeding. Once NSIS is installed, select the 'Package' target in Visual Studio and click on Build.

Install Matlab Toolbox

To install the Matlab Toolbox, open Matlab and add the path to the NiftyRec Matlab Toolbox, e.g.

>> addpath('C:/Program Files/nifty_rec/matlab/');

The default path is 'C:/Program Files/nifty_rec/matlab/', however the path may differ in your installation depending on the CMake configuration.

To add the path permanently, click on File->Set Path->Add Folder.

Install Python Module

To install the Python Module, launch the Terminal, change the current directory to the directory where NiftyRec is installed (e.g. 'C:/Program Files/nifty_rec/matlab/'), then change directory to the subdirectory 'python/' and build and install the Python module with setup.py:

cd C:/Program Files/nifty_rec/matlab/
cd python
python setup.py build 
python setup.py install
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox