Gadgetron prerequisites
These steps are required, if one wants to use the CS LAB C++ code or any Gadgetron code.
Linux
mkdir build cd build cmake ../ make
Windows
According to the instructions in here, this following sequential procedure worked out for us.
Assuming you are going to install Gadgetron to "D:\ProgramFiles\Gadgetron":
1.) Install Visual Studio 2010 with Service Pack 1
2.) CUDA (https://developer.nvidia.com/cuda-downloads)
– install cuda_5.5.20_winvista_win7_win8_general_64.exe
3.) CULA (http://www.culatools.com/downloads/dense/)
– install cula_dense_free_R16a-windows.exe
– add installation path to environment variable PATH (Control Panel → System → Advanced system setting → Environment Variables):
e.g. C:\Program\CULA\R16 and C:\Program Files\CULA\R16\bin64
4.) FFTW (http://www.fftw.org/install/windows.html)
– copy binaries from fftw-3.3.4-dll64.zip to D:\ProgramFiles\Gadgetron\Libraries\FFTW3
– open Visual Studio x64 Win64 Command Prompt and execute:
D:\ProgramFiles\Gadgetron\Libraries\FFTW3>lib /machine:x64 /def:libfftw3f−3.def
D:\ProgramFiles\Gadgetron\Libraries\FFTW3>lib /machine:x64 /def:libfftw3−3.def
D:\ProgramFiles\Gadgetron\Libraries\FFTW3>lib /machine:x64 /def:libfftw3l−3.def
– the *.lib files are created
– add D:\ProgramFiles\Gadgetron\Libraries\FFTW3 to PATH environment variable
– alternatively, follow the instructions on http://www.fftw.org/install/windows.html for compiling the FFTW library by yourself
5.) ACE (http://download.dre.vanderbilt.edu/)
– unzip ACE-6.2.0.zip to D:\ProgramFiles\Gadgetron\Libraries\ACE-6.2.0
– add file config.h to ..\ACE_wrappers\ace\
– open config.h and insert:
//We are on Windows
#include "ace/config − win32.h"
//This ensured that INLINE settings
//do not vary between Debug and Release modes
#define ACE_NO_INLINE
– open VS 2010 solution ACE_wrappers_vc10.sln in D:\ProgramFiles\Gadgetron\Libraries\ACE-6.2.0\ACE_wrappers\
– set build type to Release/x64 and start build
– add D:\ProgramFiles\Gadgetron\Libraries\ACE-6.2.0\ACE_wrappers\lib to PATH
6.) Python (optional - http://www.python.org/)
– install python-2.7.7.amd64.msi in C:\Python27 and add it to PATH
– install numpy-MKL-1.8.1.win-amd64-py2.7.exe, scipy-0.14.0.win-amd64-py2.7.exe and libxml2-python-2.9.1.win-amd64-py2.7.exe
7.) ACML (optional - http://developer.amd.com/tools-and-sdks/cpu-development/amd-core-math-library-acml/acml-archive-downloads/)
– install acml5.3.0-win64.exe
– add D:\ProgramFiles\Gadgetron\Libraries\acml5.3.0\win64_mp\lib and D:\ProgramFiles\Gadgetron\Libraries\acml5.3.0\win64\lib to PATH
8.) Boost Pro (http://www.boost.org/)
– unzip boost_1_55_0.zip to D:\ProgramFiles\Gadgetron\Libraries\boost\boost_1_55_0
– open Visual Studio x64 Win64 Command Prompt and execute:
cd D:\ProgramFiles\Gadgetron\Libraries\boost\boost_1_55_0
bootstrap
b2 address − model=64 −− build − type=complete stage
– add D:\ProgramFiles\Gadgetron\Libraries\boost\boost_1_55_0\stage\lib to PATH
9.) git (optional - http://code.google.com/p/msysgit)
– install Git-1.9.4-preview20140611.exe with git bash only and checkout Windows LF and commit Unix LF option
10.) CMake (http://www.cmake.org/cmake/resources/software.html)
– install cmake-2.8.12.2-win32-x86.exe
11.) HDF5 (http://www.hdfgroup.org/HDF5)
– install hdfview_install_win64.exe
– unzip hdf5-1.8.12-win64-vs10shared.zip and install HDF5-1.8.12-win64.exe
– add C:\Program Files\HDF Group\HDF5\1.8.12\bin to PATH
12.) CodeSynthesis XSD (http://www.codesynthesis.com/download/xsd/3.3/windows/i686/xsd-3.3.msi)
– install xsd-3.3.msi
– add C:\Program Files (x86)\CodeSynthesis XSD 3.3\bin\ and C:\Program Files (x86)\CodeSynthesis XSD 3.3\bin64\ to PATH
13.) ISMRMRD (http://ismrmrd.github.io/)
– optional (required for MATLAB Gadget or utilize XML parser): install JAVA (take MATLAB Jave version) jdk-7u11-windows-x64.exe
– download and copy source code to D:\ProgramFiles\Gadgetron\Libraries\ismrmrd-code
– create directory build in D:\ProgramFiles\Gadgetron\Libraries\ismrmrd-code
– open CMake and set source code to: D:\ProgramFiles\Gadgetron\Libraries\ismrmrd-code and build to: D:\ProgramFiles\Gadgetron\Libraries\ismrmrd-code\build
– hit configure
– set paths to: Boost, FFTW3, HDF5, JAVA, XERXESC, XSD in cmake file
BOOST_ROOT=D:/ProgramFiles/Gadgetron/Libraries/boost/boost_1_55_0 XSD_EXECUTABLE=C:/Program Files (x86)/CodeSynthesis XSD 3.3/bin/xsd.exe XSD_INCLUDE_DIR=C:/Program Files (x86)/CodeSynthesis XSD 3.3/include HDF5_DIR=C:/Program Files/HDF Group/HDF5/1.8.12/cmake/hdf5 HDF5_CXX_LIBRARY=C:/Program Files/HDF Group/HDF5/1.8.12/lib/hdf5_cppdll.lib HDF5_C_LIBRARY=C:/Program Files/HDF Group/HDF5/1.8.12/lib/hdf5dll.lib HDF5_C_INCLUDE_DIR=C:/Program Files/HDF Group/HDF5/1.8.12/include HDF5_CXX_INCLUDE_DIR=C:/Program Files/HDF Group/HDF5/1.8.12/include FFTW3F_LIBRARY=D:/ProgramFiles/Gadgetron/Libraries/FFTW3/libfftw3f-3.lib FFTW3_INCLUDE_DIR=D:/ProgramFiles/Gadgetron/Libraries/FFTW3 XERCESC_INCLUDE_DIR=C:/Program Files (x86)/CodeSynthesis XS D3.3/include/xercesc XERCESC_LIBRARIES=C:/Program Files (x86)/CodeSynthesis XSD 3.3/lib64/vc-10.0/xerces-c_3.lib
and change the install path to: D:\ProgramFiles\Gadgetron\Libraries\install
– hit configure
– if no error occurs, hit generate (in case of an error deal with the dependencies until all errors are gone)
– overwrite the file ismrmrd.cxx with the file from the linux solution
– open the Visual Studio solution ISMRMRD.sln and change the preprocessor definition in the project jismrmrd
from jismrmrd_EXPORTS
to ismrmrd_EXPORTS
– compile and install (build project INSTALL)
– if an error occurs,
∗ check the HDF5 libraries in Linker → Input and set the correct name in all projects
∗ check the entry in C/C++ → General → Additional Include Directories (..\HDFGroup\HDF5\1.8.12\include )
– add D:\ProgramFiles\Gadgetron\Libraries\install\ismrmrd\bin and D:\ProgramFiles\Gadgetron\Libraries\install\ismrmrd\lib to PATH
14.) Google Test (optional - https://code.google.com/p/googletest/downloads/detail?name=gtest-1.7.0.zip)
– unzip gtest-1.7.0.zip to D:\ProgramFiles\Gadgetron\Libraries\gtest-1.7.0
– create directory D:\ProgramFiles\Gadgetron\Libraries\gtest-1.7.0\vc10
– open CMake and set source code to: D:\ProgramFiles\Gadgetron\Libraries\gtest-1.7.0 and build to: D:\ProgramFiles\Gadgetron\Libraries\gtest-1.7.0\vc10
– hit configure and set BUILD_SHARED_LIBS, gtest_force_shared_crt and gtet_disable_pthreads
– hit generate
– open the Visual Studio solution gtest.sln and compile in debug and release version
15.) Armadillo C++ (http://arma.sourceforge.net/download.html)
– unzip armadillo-4.000.2.tar.gz to D:\ProgramFiles\Gadgetron\Libraries\armadillo-4.000.2
– create directory vc10 in ..\Libraries\armadillo-4.000.2\
– open CMake and set source code to: D:\ProgramFiles\Gadgetron\Libraries\armadillo-4.000.2 and build to: D:\ProgramFiles\Gadgetron\Libraries\armadillo-4.000.2\vc10
– open the file D:\ProgramFiles\Gadgetron\Libraries\armadillo-4.000.2\include\armadillo_bits\config.hpp
– change the following entries in the file to:
#define ARMA_USE_LAPACK
#define ARMA_USE_BLAS
#define ARMA_BLAS_CAPITALS
#define ARMA_BLAS_UNDERSCORE
#define ARMA_BLAS_LONG_LONG
– hit configure and generate (in CMake)
– open the Visual Studio solution armadillo.sln in ..\vc10
– compile and install (build project INSTALL)
– uncomment #define ARMA_BLAS_LONG_LONG
in the config.hpp again
– add D:\ProgramFiles\Gadgetron\Libraries\armadillo-4.000.2\include\lib to PATH
16.) xsltproc (http://xmlsoft.org/sources/win32)
– download and copy the directory xslt to D:\ProgramFiles\Gadgetron\Libraries\xslt
17.) install Gadgetron