+ 1. Download VTK source code from http://www.vtk.org, copy the downloaded
+ zip/tar.gz file to your work directory (say ~/sources), uncompress the
+ source file and create an empty folder (say ~/sources/vtk-build)
+ 2. Execute cmake taking care to put two directories: the source dir (where
+ the VTK source code is after decompression) and the build dir (the new
+ empty folder you just created).
+ 3. On linux/mac, it is easier to execute from a command line console:
+ $ cd ~/sources/vtk-build
+ *** WARNING: IF YOU INSTALLED QT ***
+ $ cmake -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+ -DBUILD_DOCUMENTATION:BOOL=OFF \
+ -DBUILD_EXAMPLES:BOOL=OFF \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DBUILD_TESTING:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE:STRING=MinSizeRel \
+ -DModule_vtkGUISupportQt:BOOL=ON \
+ -DModule_vtkGUISupportQtOpenGL:BOOL=ON \
+ -DModule_vtkGUISupportQtSQL:BOOL=OFF \
+ -DModule_vtkGUISupportQtWebkit:BOOL=OFF \
+ -DCMAKE_INSTALL_PREFIX:PATH=~/local \
+ ~/source/the_folder_where_vtk_was_decompressed
+ *** WARNING: IF YOU DIDN'T INSTALLED QT ***
+ $ cmake -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+ -DBUILD_DOCUMENTATION:BOOL=OFF \
+ -DBUILD_EXAMPLES:BOOL=OFF \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DBUILD_TESTING:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE:STRING=MinSizeRel \
+ -DModule_vtkGUISupportQt:BOOL=OFF \
+ -DModule_vtkGUISupportQtOpenGL:BOOL=OFF \
+ -DModule_vtkGUISupportQtSQL:BOOL=OFF \
+ -DModule_vtkGUISupportQtWebkit:BOOL=OFF \
+ -DCMAKE_INSTALL_PREFIX:PATH=~/local \
+ ~/source/the_folder_where_vtk_was_decompressed
+ $ make
+ ... WAIT A FEW MINUTES ...
+ $ make install
+ 4. On windows, make sure that the following cmake variables are configured as:
+ BUILD_DOCUMENTATION:BOOL=OFF
+ BUILD_EXAMPLES:BOOL=OFF
+ BUILD_SHARED_LIBS:BOOL=ON
+ BUILD_TESTING:BOOL=OFF
+ CMAKE_BUILD_TYPE:STRING=MinSizeRel
+ Module_vtkGUISupportQt:BOOL=[OFF/ON] ** "ON", IF YOU INSTALLED Qt
+ Module_vtkGUISupportQtOpenGL:BOOL=[OFF/ON] ** "ON", IF YOU INSTALLED Qt
+ Module_vtkGUISupportQtSQL:BOOL=OFF \
+ Module_vtkGUISupportQtWebkit:BOOL=OFF \
+ NOTE: Normally, windows compilers already support c++11.
+
+ 3. Insight Toolkit -ITK- (>=4.6.0)
+ 1. Download ITK source code from http://www.itk.org, copy the downloaded
+ zip/tar.gz file to your work directory (say ~/sources), uncompress the
+ source file and create an empty folder (say ~/sources/itk-build)
+ 2. Execute cmake taking care to put two directories: the source dir (where
+ the ITK source code is after decompression) and the build dir (the new
+ empty folder you just created).
+ 3. On linux/mac, it is easier to execute from a command line console:
+ $ cd ~/sources/itk-build
+ $ cmake -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+ -DBUILD_DOCUMENTATION:BOOL=OFF \
+ -DBUILD_EXAMPLES:BOOL=OFF \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DBUILD_TESTING:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE:STRING=MinSizeRel \
+ -DModule_ITKReview:BOOL=ON \
+ -DModule_ITKVtkGlue:BOOL=OFF \
+ -DCMAKE_INSTALL_PREFIX:PATH=~/local \
+ ~/source/the_folder_where_itk_was_decompressed
+ $ make
+ ... WAIT A FEW MINUTES ...
+ $ make install
+ 4. On windows, make sure that the following cmake variables are configured as:
+ BUILD_DOCUMENTATION:BOOL=OFF
+ BUILD_EXAMPLES:BOOL=OFF
+ BUILD_SHARED_LIBS:BOOL=ON
+ BUILD_TESTING:BOOL=OFF
+ CMAKE_BUILD_TYPE:STRING=MinSizeRel
+ Module_ITKReview:BOOL=ON
+ Module_ITKVtkGlue:BOOL=OFF
+ NOTE: Normally, windows compilers already support c++11.
+
+ 4. WARNING: Notes on compilation on MS-Windows
+ As the time being (circa dec 2014), I've been using MSVC-2013 (compiler
+ version 12). As expected, weird behavior is related to this config. Please
+ take into account the following in order to have a successful compilation:
+ 4.1 If you want to build the Qt-based code, please be sure that
+ it was compiled with EXACTLY the same compiler you are using.
+ 4.2 Since the dll load-unload procedure in MSWin is kind of magic,
+ VTK and ITK should be compiled as shared libraries. This allows a
+ correct execution of the SmartPointer's thus preventing anoying crashes.
+ 4.3 If you found more problems in any MSWin config, please let us know at
+ florez-l@javeriana.edu.co
+
+@compilation
+ The project uses CMake as project manager. You can use the CMake GUI to configure
+ it on your box. Please take into account the following variables:
+ USE_QT4:BOOL -> It allows you to compile the Qt support
+ BUILD_EXAMPLES:BOOL -> Do you want to compile the examples?
+ BUILD_SHARED_LIBRARIES -> Put this allways "ON". "OFF" is still experimental
+ CMAKE_BUILD_TYPE -> Compilation type. Possible values: Debug, Release,
+ MinSizeRel, RelWithDebInfo, None
+ ITK_DIR -> Where ITK was intalled. If you followed this list,
+ it should be on: ~/local/lib/cmake/ITK-X.Y (X and Y are
+ the version numbers)
+ VTK_DIR -> Where VTK was intalled. If you followed this list,
+ it should be on: ~/local/lib/cmake/vtk-X.Y (X and Y are
+ the version numbers)